Jar finalName to m2 repository

2010-08-18 Thread fhomasp

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.

...
artifactIdcommon/artifactId
packagingjar/packaging
...
build
finalNameedp/finalName
...
plugin
artifactIdmaven-jar-plugin/artifactId
version2.3.1/version
configuration
finalNameedp/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



Re: Jar finalName to m2 repository

2010-08-18 Thread Anders Hammar
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.comwrote:


 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.

 ...
 artifactIdcommon/artifactId
 packagingjar/packaging
 ...
 build
finalNameedp/finalName
 ...
 plugin
artifactIdmaven-jar-plugin/artifactId
version2.3.1/version
configuration
finalNameedp/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




Re: Jar finalName to m2 repository

2010-08-18 Thread fhomasp

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.comwrote:
 

 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.

 ...
 artifactIdcommon/artifactId
 packagingjar/packaging
 ...
 build
finalNameedp/finalName
 ...
 plugin
artifactIdmaven-jar-plugin/artifactId
version2.3.1/version
configuration
finalNameedp/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



Re: Jar finalName to m2 repository

2010-08-18 Thread Anders Hammar
Sure, change the artifactId to edp. It's that simple!

/Anders

On Wed, Aug 18, 2010 at 14:28, fhomasp thomas.peet...@realdolmen.comwrote:


 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.comwrote:
 
 
  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.
 
  ...
  artifactIdcommon/artifactId
  packagingjar/packaging
  ...
  build
 finalNameedp/finalName
  ...
  plugin
 artifactIdmaven-jar-plugin/artifactId
 version2.3.1/version
 configuration
 finalNameedp/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




Re: Jar finalName to m2 repository

2010-08-18 Thread Martin Höller
On Wednesday 18 August 2010 fhomasp wrote:
 I can change it if I use the assembly plugin instead of the
 maven-jar-plugin

You can change the name of the JAR in the local or remote repository with 
the assembly plugin? I doubt this!

You can change the name of the JAR in your targt folder, but that's 
something completely different and you did this already with the 
finalName option.

Changing the internal data storage of maven (the repository) is a bad idea 
and therefore not easy to achieve!

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: Jar finalName to m2 repository

2010-08-18 Thread fhomasp

Well that's out of the question.  But ok, at least I'll be able to tell them
why it is the way it is ^^

Thanks
-- 
View this message in context: 
http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639309.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



Re: Jar finalName to m2 repository

2010-08-18 Thread fhomasp

No, I build the jar using an xml script and call it whatever I want.  What
and how I insert it into the repository is another thing :-)


Martin Höller wrote:
 
 On Wednesday 18 August 2010 fhomasp wrote:
 I can change it if I use the assembly plugin instead of the
 maven-jar-plugin
 
 You can change the name of the JAR in the local or remote repository with 
 the assembly plugin? I doubt this!
 
 You can change the name of the JAR in your targt folder, but that's 
 something completely different and you did this already with the 
 finalName option.
 
 Changing the internal data storage of maven (the repository) is a bad idea 
 and therefore not easy to achieve!
 
 hth,
 - martin
 
  
 

-- 
View this message in context: 
http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639323.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



Re: Jar finalName to m2 repository

2010-08-18 Thread Martin Höller
Hi again!

On Wednesday 18 August 2010 fhomasp wrote:
 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.

Eventually you could find some solution with the maven-dependency-plugins' 
goal dependency:copy-dependencies in combination with the antrun-plugin. 
However, it seems you are doing something strange here, which is likely to 
cause more problems later on.

- martin


signature.asc
Description: This is a digitally signed message part.


Re: Jar finalName to m2 repository

2010-08-18 Thread fhomasp

Actually I didn't say i was going to do any of that.  It would be a
solution, but not nearly good enough.

Nah, I'll see if they can live with a different artifactId or with the
current name of the jar in the repo and in the lib folder of the wars.




Martin Höller wrote:
 
 Hi again!
 
 On Wednesday 18 August 2010 fhomasp wrote:
 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.
 
 Eventually you could find some solution with the maven-dependency-plugins' 
 goal dependency:copy-dependencies in combination with the antrun-plugin. 
 However, it seems you are doing something strange here, which is likely to 
 cause more problems later on.
 
 - martin
 
  
 

-- 
View this message in context: 
http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639374.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