Pom generating a jar with extra string at the end
Posted: Wed Nov 23, 2022 2:09 am
Hello and good day
My team and i are currently working on a project that generates a jar for one of our frameworks, but we are experiencing some issues.
The download site expects a jar with a certain name "porject.jar", however the build its generating a jar called 'project-plugin.jar', we have gone over the pom file and we have not been able to determine what could be changing the name, this is the content of our pom file:
The local build shows that the jar generated is indeed being created as "${project.artifactId}-${project.version}-plugin", but I haven't found a reason for this.
Is there something that I'm missing in the pom or could this be caused by another reason?
Thanks and Regards,
Frank
My team and i are currently working on a project that generates a jar for one of our frameworks, but we are experiencing some issues.
The download site expects a jar with a certain name "porject.jar", however the build its generating a jar called 'project-plugin.jar', we have gone over the pom file and we have not been able to determine what could be changing the name, this is the content of our pom file:
Code: Select all
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>"groupId"</groupId>
<artifactId>"ProjectName"</artifactId>
<version>1.0-SNAPSHOT</version>
<name>"ProjectName"</name>
<description>"ProjectName"</description>
<repositories>
<repository>
<id>public</id>
<name>oXygen public artifacts</name>
<url>https://www.oxygenxml.com/maven</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>RepoId</id>
<name>RepoName</name>
<url>RepoURL</url>
</repository>
</repositories>
<dependencies>
...
</dependencies>
<distributionManagement>
<repository>
<id>Repoid</id>
<name>RepoName</name>
<url>RepoURL
</url>
</repository>
<snapshotRepository>
<id>RepoId</id>
<name>RepoName</name>
<url>RepoUrl
</url>
</snapshotRepository>
</distributionManagement>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>dd-MM-yyyy HH:mm</maven.build.timestamp.format>
</properties>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<archive>
<manifestEntries> <Build-Time>${maven.build.timestamp}</Build-Time></manifestEntries>
</archive>
<outputDirectory>${project.build.directory}/build</outputDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archiveBaseDirectory>${project.basedir}</archiveBaseDirectory>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
<configuration>
<archive>
<manifestEntries> <Build-Time>${maven.build.timestamp}</Build-Time></manifestEntries>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>libs/</classpathPrefix>
<mainClass>"MainClass".ContentManager</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef> <!--This is an intended extra jar we also need-->
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}</directory>
<includes>
<include>addon.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Is there something that I'm missing in the pom or could this be caused by another reason?
Thanks and Regards,
Frank