This is an automated email from the ASF dual-hosted git repository. rec pushed a commit to branch refactoring/UIMA-6458-Spurious-parsedVersion-osgiVersion-in-file-names-in-target in repository https://gitbox.apache.org/repos/asf/uima-parent-pom.git
commit 8b9624911a642a98f4162d45d2927904707c35c3 Author: Richard Eckart de Castilho <[email protected]> AuthorDate: Wed May 18 17:00:17 2022 +0200 [UIMA-6458] Spurious "parsedVersion.osgiVersion" in file names in target - Remove "finalName" from the Eclipse/OSGi modules - maven-bundle-plugin 5.1.5 -> 5.1.5 - Add calculation and attachment of SHA512 checksum to the POM --- pom.xml | 92 +++++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 25 deletions(-) diff --git a/pom.xml b/pom.xml index 6894b32..d020988 100644 --- a/pom.xml +++ b/pom.xml @@ -420,17 +420,15 @@ <artifactId>maven-antrun-plugin</artifactId> <version>3.1.0</version> <dependencies> + <dependency> + <groupId>org.apache.ant</groupId> + <artifactId>ant</artifactId> + <version>1.10.12</version> + </dependency> <dependency> <!-- for ant extension supporting "if" --> <groupId>ant-contrib</groupId> <artifactId>ant-contrib</artifactId> <version>20020829</version> - <scope>runtime</scope> - <exclusions> - <exclusion> <!-- is dragging in ant 1.5 --> - <groupId>ant</groupId> - <artifactId>ant</artifactId> - </exclusion> - </exclusions> </dependency> <!-- <containsregexp> form for filesets --> <dependency> @@ -444,7 +442,7 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <version>5.1.5</version> + <version>5.1.6</version> <extensions>true</extensions> <executions> <execution> @@ -795,16 +793,27 @@ </fixcrlf> </then> </if> - + </target> + </configuration> + </execution> + <execution> + <id>copy-pom-to-target</id> + <phase>pre-integration-test</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> <!-- FIXME: Why do the checksum on the POM? I think this can be removed --> <!-- copy to target so checksum-maven-plugin can sha512 checkum it --> - <property name="pom-file-tgt" location="${project.build.directory}/${project.build.finalName}.pom" /> - <property name="pom-file-src" location="${project.build.directory}/../pom.xml" /> + <property name="pom-file-tgt" + location="${project.build.directory}/${project.artifactId}-${project.version}.pom" /> + <property name="pom-file-src" + location="${project.build.directory}/../pom.xml" /> <copy file="${pom-file-src}" tofile="${pom-file-tgt}" /> </target> </configuration> </execution> - <execution> <id>sign and checksum source-release.zip</id> <phase>verify</phase> <!-- after source-release is built --> @@ -814,12 +823,14 @@ <configuration> <target> <taskdef name="if" classname="net.sf.antcontrib.logic.IfTask" /> - <property name="source-release" location="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip" /> + <property name="source-release" + location="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip" /> <if> <available file="${source-release}" /> <then> <echo message="Generating checksums for source-release.zip" /> - <checksum format="MD5SUM" forceoverwrite="yes" algorithm="SHA-512" fileext=".sha512" file="${source-release}" /> + <checksum format="MD5SUM" forceoverwrite="yes" algorithm="SHA-512" + fileext=".sha512" file="${source-release}" /> <echo message="Generating gpg signatures for source-release.zip" /> <exec executable="gpg" failonerror="true"> <arg value="--detach-sign" /> @@ -878,6 +889,48 @@ </algorithms> </configuration> </execution> + <execution> + <id>pom-checksum</id> + <goals> + <goal>files</goal> + </goals> + <configuration> + <appendFilename>true</appendFilename> + <algorithms> + <algorithm>SHA-512</algorithm> + </algorithms> + <fileSets> + <fileSet> + <directory>${project.build.directory}</directory> + <includes> + <include>${project.artifactId}-${project.version}.pom</include> + </includes> + </fileSet> + </fileSets> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <id>attach-artifacts</id> + <phase>verify</phase> + <goals> + <goal>attach-artifact</goal> + </goals> + <configuration> + <artifacts> + <artifact> + <file>${project.build.directory}/${project.artifactId}-${project.version}.pom.sha512</file> + <type>pom.sha512</type> + </artifact> + </artifacts> + </configuration> + </execution> </executions> </plugin> </plugins> @@ -1290,16 +1343,6 @@ </file> </activation> <build> - <!-- The final name is typically overridden in the individual project - to follow the Eclipse naming rules. Rather than just the artifactId, - Eclipse wants this name to be the same as the Bundle-SymbolicName, - which typically starts with org.apache.uima, and isn't the same as - the artifact name. - examples: - uimaj-ep-jcasgen - org.apache.uima.jcas.jcasgenp - uimaj-ep-configurator - org.apache.uima.desceditor --> - <finalName>${project.artifactId}_${parsedVersion.osgiVersion}</finalName> - <!-- resources are "merged" --> <!-- needed to copy resources, icons, and the plugin.xml to the result --> <resources> @@ -1424,7 +1467,6 @@ </file> </activation> <build> - <finalName>${project.artifactId}_${parsedVersion.osgiVersion}</finalName> <!-- turn on filtering for these resources --> <resources> <resource>
