[java-libglom] Use a hand-written .pom file instead of a generated one.



commit 12e6c4b14f8cb0e0cc80fa179116ec6c77e74d10
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Dec 22 11:56:53 2011 +0100

    Use a hand-written .pom file instead of a generated one.
    
    * configure.ac:
    * Makefile.am:
    * java-libglom.pom.in: Generate the .pom file (with the
    version number in the name) from this new .pom.in template,
    instead of asking mvn install:install-file to generate it.
    This allows us to have a more complete .pom file such as the one
    here: http://maven.apache.org/guides/mini/guide-central-repository-upload.html

 ChangeLog           |   12 ++++++++++++
 Makefile.am         |    6 ++++--
 configure.ac        |    3 ++-
 java-libglom.pom.in |    9 +++++++++
 4 files changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 98a9bec..8e073f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-12-22  Murray Cumming  <murrayc murrayc com>
+
+	Use a hand-written .pom file instead of a generated one.	
+
+	* configure.ac:
+	* Makefile.am:
+	* java-libglom.pom.in: Generate the .pom file (with the 
+	version number in the name) from this new .pom.in template,
+	instead of asking mvn install:install-file to generate it.
+	This allows us to have a more complete .pom file such as the one 
+	here: http://maven.apache.org/guides/mini/guide-central-repository-upload.html
+
 2011-12-14  Murray Cumming  <murrayc murrayc com>
 
 	Ignore some new or removed methods in Glom from git master.
diff --git a/Makefile.am b/Makefile.am
index daf26a5..7ce6a98 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -138,11 +138,13 @@ $(jarfile): classdist_noinst.stamp
 
 all-local: tests-and-examples.stamp
 
+# This uses mvn to install the .jar file in the local .m2 directory.
+# and install our .pom file alongside it.
+pomfile = java-libglom- PACKAGE_VERSION@.pom
 install-data-local:
 	test -z "$(jardir)" || $(MKDIR_P) "$(DESTDIR)$(jardir)"
 	$(INSTALL_DATA) $(jarfile) "$(DESTDIR)$(jardir)"
-	test -z $(MVN) || $(MVN) install:install-file -Dfile=$(jarfile) -DgroupId=org.glom.libglom \
-	  -DartifactId=java-libglom -Dversion= PACKAGE_VERSION@ -Dpackaging=jar
+	test -z $(MVN) || $(MVN) install:install-file -Dfile=$(jarfile) -DpomFile=$(pomfile) -DgeneratePom=false
 
 uninstall-local:
 	rm -f "$(DESTDIR)$(jardir)/$(jarfile)"
diff --git a/configure.ac b/configure.ac
index 8cf8166..4828fa6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,5 +141,6 @@ DK_ARG_ENABLE_WARNINGS([JAVA_LIBGLOM_WARNING_FLAGS],
 AC_CONFIG_FILES([Makefile
                  src/glom_constants.i
                  tools/ExampleDocumentLoad
-                 tools/JUnitTests])
+                 tools/JUnitTests
+                 java-libglom-${PACKAGE_VERSION}.pom:java-libglom.pom.in])
 AC_OUTPUT
diff --git a/java-libglom.pom.in b/java-libglom.pom.in
new file mode 100644
index 0000000..ca23ff5
--- /dev/null
+++ b/java-libglom.pom.in
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"; xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.glom.libglom</groupId>
+  <artifactId>java-libglom</artifactId>
+  <version>@PACKAGE_VERSION@</version>
+  <description>A Java API for libglom</description>
+</project>
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]