I can change it if I use the assembly plugin instead of the maven-jar-plugin :-)
However it would be nice to be able to actually do this using the jar plugin. I know my client is going to want this library to be called "edp-<version>.jar". Anders Hammar wrote: > > Don't fight Maven! Maven uses its convention for naming artifacts in > repositories (i.e. Maven repositories). You cannot change that. > > /Anders > > On Wed, Aug 18, 2010 at 10:58, fhomasp > <thomas.peet...@realdolmen.com>wrote: > >> >> Hey, >> >> I am trying to get a jar to be uploaded in the maven repository (local as >> well as our online repo) under a different name than its default >> ${project.build.finalName}. I tried changing the finalName under the >> <build> tag as well as under the configuration of the maven-jar-plugin. >> >> These attempts did change the name of the jar in my project/target >> directory, however when it's being uploaded it gets its default name >> again. >> >> ... >> <artifactId>common</artifactId> >> <packaging>jar</packaging> >> ... >> <build> >> <finalName>edp</finalName> >> ... >> <plugin> >> <artifactId>maven-jar-plugin</artifactId> >> <version>2.3.1</version> >> <configuration> >> <finalName>edp</finalName> >> </configuration> >> </plugin> >> ... >> >> output in consule when doing the install/deploy phase: >> ... >> Installing C:\projectsmaven\common\target\edp.jar to >> C:\...\.m2\repository\...\common\0.0.1\common-0.0.1.jar >> ... >> >> >> When I build wars which depend on this artifact I need the jar to be >> called >> edp-0.0.1.jar in WEB-INF/libs. Now it's still called common-0.0.1.jar >> >> I don't want to use the assembly plugin with descriptor file for this. >> My >> client doesn't know a lot about Maven and they are going to get confused. >> >> >> Thanks >> >> -- >> View this message in context: >> http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639096.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >> > > -- View this message in context: http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639278.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org