Emmanuel Bourg pushed to branch master at Debian Java Maintainers / eclipse-debian-helper
Commits: 266ca1b8 by Emmanuel Bourg at 2018-07-12T09:43:16Z Set the source encoding to UTF-8 when compiling - - - - - 05b4f8d8 by Emmanuel Bourg at 2018-07-14T19:33:33Z Added eclipse-osgi.jar to the default classpath - - - - - d843793f by Emmanuel Bourg at 2018-07-14T21:45:32Z Make the targeted Java release configurable - - - - - cd25acfc by Emmanuel Bourg at 2018-07-16T12:54:11Z Improved the comments - - - - - da906642 by Emmanuel Bourg at 2018-07-16T21:51:11Z Fixed the classpath when the bundles are in the root directory - - - - - 7737fee8 by Emmanuel Bourg at 2018-08-15T21:56:40Z Added a macro to assign the version of a bundle to a property - - - - - 5cdd683c by Emmanuel Bourg at 2018-08-15T21:57:12Z Upload to unstable - - - - - 2 changed files: - debian/changelog - src/ant/build-eclipse-bundle.xml Changes: ===================================== debian/changelog ===================================== --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,12 @@ -eclipse-debian-helper (1.0.1) UNRELEASED; urgency=medium +eclipse-debian-helper (1.1) unstable; urgency=medium * Fixed the classpath when depending on other bundles * Include the resources from all source directories and not only src/ + * Set the source encoding to UTF-8 when compiling + * Added eclipse-osgi.jar to the default classpath + * Make the targeted Java release configurable - -- Emmanuel Bourg <[email protected]> Wed, 11 Jul 2018 19:55:47 +0200 + -- Emmanuel Bourg <[email protected]> Wed, 15 Aug 2018 23:57:04 +0200 eclipse-debian-helper (1.0) unstable; urgency=medium ===================================== src/ant/build-eclipse-bundle.xml ===================================== --- a/src/ant/build-eclipse-bundle.xml +++ b/src/ant/build-eclipse-bundle.xml @@ -7,6 +7,7 @@ <attribute name="name" description="The name of the bundle (for example org.eclipse.foo.bar)"/> <attribute name="depends" default="" description="The comma separated list of local bundles used as dependencies"/> <attribute name="basedir" default="bundles" description="The base directory holding all the bundles"/> + <attribute name="release" default="8" description="The version of Java targeted"/> <element name="bundle-classpath" optional="true" implicit="true" description="The classpath elements required to build the bundle"/> <sequential> <if> @@ -18,23 +19,31 @@ <property file="${bundle.dir.@{name}}/plugin.properties" prefix="@{name}"/> <!-- Extract and clean the bundle version from the manifest --> - <property file="${bundle.dir.@{name}}/META-INF/MANIFEST.MF" prefix="manifest.@{name}"/> - <propertyregex property="bundle.version.@{name}" input="${manifest.@{name}.Bundle-Version}" regexp="(.*)\.qualifier" select="\1"/> + <bundle-version name="@{name}" basedir="@{basedir}" property="bundle.version.@{name}"/> <propertyregex property="bundle.desc.@{name}" input="${@{name}.pluginName}${@{name}.bundleName}" regexp="\$\{.*\}" replace="" global="true" override="true"/> <echo>Building bundle '${bundle.desc.@{name}}' (@{name}:${bundle.version.@{name}})</echo> - <!-- Build the sources --> + <!-- Prepare the dependencies classpath --> <mkdir dir="${bundle.dir.@{name}}/target/classes"/> <touch file="${bundle.dir.@{name}}/target/dependencies"/> <concat destfile="${bundle.dir.@{name}}/target/dependencies" append="true">non/existent/path/${line.separator}</concat> <for list="@{depends}" param="dependency"> <sequential> - <concat destfile="${bundle.dir.@{name}}/target/dependencies" append="true">@{basedir}/@{dependency}/target/@{dependency}.jar${line.separator}</concat> + <if> + <equals arg1="@{basedir}" arg2="." /> + <then> + <concat destfile="${bundle.dir.@{name}}/target/dependencies" append="true">@{dependency}/target/@{dependency}.jar${line.separator}</concat> + </then> + <else> + <concat destfile="${bundle.dir.@{name}}/target/dependencies" append="true">@{basedir}/@{dependency}/target/@{dependency}.jar${line.separator}</concat> + </else> + </if> </sequential> </for> + <!-- Copy the source files to target/sources. Source directories are defined in build.properties --> <var name="sourcedirs.@{name}" value=""/> <for list="${@{name}.source..}" param="srcdir"> <sequential> @@ -48,8 +57,10 @@ <multirootfileset basedirs="${sourcedirs.@{name}}" includes="**/*.java"/> </copy> - <javac srcdir="${bundle.dir.@{name}}/target/sources" destdir="${bundle.dir.@{name}}/target/classes" debug="yes" release="8" includeantruntime="false"> + <!-- Compile the source files to target/classes --> + <javac srcdir="${bundle.dir.@{name}}/target/sources" destdir="${bundle.dir.@{name}}/target/classes" debug="yes" release="@{release}" includeantruntime="false" encoding="UTF-8"> <classpath> + <pathelement path="/usr/share/java/eclipse-osgi.jar"/> <pathelement path="/usr/share/java/org.eclipse.osgi.jar"/> <pathelement path="/usr/share/java/osgi.compendium.jar"/> <fileset dir="." includesfile="${bundle.dir.@{name}}/target/dependencies"/> @@ -57,7 +68,7 @@ </classpath> </javac> - <!-- Copy the resources --> + <!-- Copy the resources to target/classes --> <copy todir="${bundle.dir.@{name}}/target/classes" quiet="true"> <multirootfileset basedirs="${sourcedirs.@{name}}" excludes="**/*.java,**/package.html"/> <fileset dir="${bundle.dir.@{name}}" includes="${@{name}.bin.includes}"/> @@ -93,7 +104,7 @@ </sequential> </macrodef> - <!-- Macro turning a bundle name into a short name (org.eclipse.foo.bar -> eclipse-foo-bar) --> + <!-- Macro turning a bundle name into a short name (org.eclipse.foo.bar -> eclipse-foo-bar) --> <macrodef name="bundle2shortname"> <attribute name="bundle"/> <attribute name="property"/> @@ -104,4 +115,15 @@ </sequential> </macrodef> + <!-- Macro setting the version of the bundle to the specified property --> + <macrodef name="bundle-version"> + <attribute name="name" description="The name of the bundle (for example org.eclipse.foo.bar)"/> + <attribute name="basedir" default="bundles"/> + <attribute name="property"/> + <sequential> + <property file="@{basedir}/@{name}/META-INF/MANIFEST.MF" prefix="manifest.@{name}"/> + <propertyregex property="@{property}" input="${manifest.@{name}.Bundle-Version}" regexp="(.*)\.qualifier" select="\1"/> + </sequential> + </macrodef> + </project> View it on GitLab: https://salsa.debian.org/java-team/eclipse-debian-helper/compare/c601ee4b1b18e1530cf155e9805bb3ac4f81c044...5cdd683c994682236c485f7f5a314b7c466bc962 -- View it on GitLab: https://salsa.debian.org/java-team/eclipse-debian-helper/compare/c601ee4b1b18e1530cf155e9805bb3ac4f81c044...5cdd683c994682236c485f7f5a314b7c466bc962 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ pkg-java-commits mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits

