Rather than using the jar plugin,
you should override:
<finalName>${artifactId}</finalName>
That way, everything (e.g. source jars)
will have consistent names.
On Thu, 2006-09-21 at 14:07 -0700, Scott M Stark wrote:
By adding a jar plugin with the following config to each project:
<!-- Drop the version info from the jar name -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<jarName>${project.artifactId}</jarName>
</configuration>
</plugin>
everything builds correctly:
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
------------------------------------------------------------------------
[INFO] JBoss Logging Programming Interface ................... SUCCESS
[1.643s]
[INFO] JBoss Common Classes .................................. SUCCESS
[4.028s]
[INFO] JBoss Logging Log4j ................................... SUCCESS
[0.663s]
[INFO] JBoss Logging JDK ..................................... SUCCESS
[0.910s]
[INFO] JBoss Common Build .................................... SUCCESS
[0.545s]
[INFO]
------------------------------------------------------------------------
and the target output has a simple jar name:
[starksm@succubus 2.0.0]$ ls common-core/target/
classes/ jboss-common-core-2.0.0-sources.jar
exported-pom.xml jboss-common-core.jar
[starksm@succubus 2.0.0]$ ls common-logging-spi/target/
classes/ jboss-logging-spi-2.0.0-sources.jar
exported-pom.xml jboss-logging-spi.jar
but the local repository still has the full version info:
/home/starksm/.m2/repository/jboss
[starksm@succubus jboss]$ ls -R
.:
common/ logging/
./common:
core/
./common/core:
jboss-common-core/
./common/core/jboss-common-core:
2.0.0/ maven-metadata-local.xml
./common/core/jboss-common-core/2.0.0:
jboss-common-core-2.0.0.jar jboss-common-core-2.0.0-sources.jar
jboss-common-core-2.0.0.pom
./logging:
jboss-logging-spi/ jdk/ log4j/
./logging/jboss-logging-spi:
2.0.0/ maven-metadata-local.xml
./logging/jboss-logging-spi/2.0.0:
jboss-logging-spi-2.0.0.jar jboss-logging-spi-2.0.0-sources.jar
jboss-logging-spi-2.0.0.pom
./logging/jdk:
jboss-logging-jdk/
./logging/jdk/jboss-logging-jdk:
2.0.0/ maven-metadata-local.xml
./logging/jdk/jboss-logging-jdk/2.0.0:
jboss-logging-jdk-2.0.0.jar jboss-logging-jdk-2.0.0-sources.jar
jboss-logging-jdk-2.0.0.pom
./logging/log4j:
jboss-logging-log4j/
./logging/log4j/jboss-logging-log4j:
2.0.0/ maven-metadata-local.xml
./logging/log4j/jboss-logging-log4j/2.0.0:
jboss-logging-log4j-2.0.0.jar jboss-logging-log4j-2.0.0-sources.jar
jboss-logging-log4j-2.0.0.pom
Ryan Campbell wrote:
> Well, removing the versioned jars will break the maven builds
> depending on this module, such as security, with more to come.
> Maven is expecting the jars to have the version info in them.
>
>
_______________________________________________
jboss-development mailing list
jboss-development(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-development --
xxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxx