[Git][java-team/eclipse-debian-helper][master] Generate a pom.xml file for the pomless bundles
Emmanuel Bourg
gitlab at salsa.debian.org
Wed Jul 17 14:28:34 BST 2019
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / eclipse-debian-helper
Commits:
d98ec1fd by Emmanuel Bourg at 2019-07-17T13:19:24Z
Generate a pom.xml file for the pomless bundles
- - - - -
2 changed files:
- debian/changelog
- src/ant/build-eclipse-bundle.xml
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+eclipse-debian-helper (1.7) unstable; urgency=medium
+
+ * Generate a pom.xml file for the pomless bundles
+
+ -- Emmanuel Bourg <ebourg at apache.org> Wed, 17 Jul 2019 15:19:13 +0200
+
eclipse-debian-helper (1.6) unstable; urgency=medium
* Mount the bundle dependencies before the default dependencies
=====================================
src/ant/build-eclipse-bundle.xml
=====================================
@@ -101,9 +101,32 @@
<concat destfile="debian/bundles.properties" append="true">@{name} ${bundle.version.@{name}} ${shortname.@{name}} lib${shortname.@{name}}-java ${bundle.depends.@{name}} @{basedir}${line.separator}</concat>
<!-- Prepare the pom to be installed in the package -->
- <copy file="${bundle.dir.@{name}}/pom.xml" todir="${bundle.dir.@{name}}/target"/>
- <replace file="${bundle.dir.@{name}}/target/pom.xml" token="-SNAPSHOT" value=""/>
- <replace file="${bundle.dir.@{name}}/target/pom.xml" token="<packaging>eclipse-plugin</packaging>" value="<packaging>jar</packaging>"/>
+ <if>
+ <resourceexists>
+ <file file="${bundle.dir.@{name}}/pom.xml"/>
+ </resourceexists>
+ <then>
+ <!-- bundle with a pom, adjust the version and the packaging type -->
+ <copy file="${bundle.dir.@{name}}/pom.xml" todir="${bundle.dir.@{name}}/target"/>
+ <replace file="${bundle.dir.@{name}}/target/pom.xml" token="-SNAPSHOT" value=""/>
+ <replace file="${bundle.dir.@{name}}/target/pom.xml" token="<packaging>eclipse-plugin</packaging>" value="<packaging>jar</packaging>"/>
+ </then>
+ <else>
+ <!-- pomless bundle, let's generate one -->
+ <propertyregex property="groupId.@{name}" input="@{name}" regexp="([^\.]+\.[^\.]+\.[^\.]+).*" select="\1" defaultValue="@{name}" global="true" override="true"/>
+ <property name="artifactId.@{name}" value="@{name}"/>
+ <echo>Generating pom.xml for @{name} (${groupId.@{name}}:${artifactId.@{name}})</echo>
+ <echoxml file="${bundle.dir.@{name}}/target/pom.xml">
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>${groupId.@{name}}</groupId>
+ <artifactId>${artifactId.@{name}}</artifactId>
+ <version>${bundle.version.@{name}}</version>
+ <packaging>jar</packaging>
+</project>
+ </echoxml>
+ </else>
+ </if>
<property name="@{name}.done" value="true"/>
</then>
View it on GitLab: https://salsa.debian.org/java-team/eclipse-debian-helper/commit/d98ec1fd23169f8a9e804107a29c5620ee40239e
--
View it on GitLab: https://salsa.debian.org/java-team/eclipse-debian-helper/commit/d98ec1fd23169f8a9e804107a29c5620ee40239e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190717/95c8ae87/attachment.html>
More information about the pkg-java-commits
mailing list