Re: [m2] finalName not working
Doug, thanks for your reply. Yes that's true, Maven has no knowledge of projet A. But it knows that A is a dependency. So it should include A as a reference in module B using the finalName: is it completly non sens? Moreover I found dangerous that the behavior is not the same when building projet B alone or when building within a multimodule. finalName is not used for the repository which is perfect. But the finalName doesn't only effect the name of the artifact but also references in ClassPath entry of the manifest file, references in application.xml for EAR or references in WEB-INF/lib for web module... Yann Doug Douglass wrote: Yann, This is to be expected. When running maven in your B project, maven has no knowledge of project A as a module to be built and referenced, only as a dependency that needs to be retrieved from a repository and added to the classpath. In addition, finalName only effects the name of the artifact generated in the target directory. If you install/deploy the same artifact it will (should) have the standard naming of ${artifactId}-${version}. This is A Good Thing, as it prevents ambiguity in the repository. HTH, Doug On 10/12/06, Yann Albou [EMAIL PROTECTED] wrote: Hi, I try to use the finalName in my parent pom as following: finalName${artifactId}/finalName (without the version number) If I run maven from the parent pom everything works fine: all my artifacts are generated without the version number. and also the classpath entry of the manifest.mf file is correctly set. For instance I get : parent --- A module --- B module (with a dependency on A) So it generates B.jar with a Manifest containning ClassPath: A.Jar Now If I run maven from B module it generates a B.jar but with a manifest containing ClassPath: A-1.2.1.Jar for instance. I get exactly the same behaviour with an EAR module that generate the application.xml = module are not generated with the correct name... If I run maven from the parent pom then the application.xml is generated correctly Did I miss something ? Yann. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] finalName not working
In the last couple of months, this same discussion has come up once or twice. I believe someone even suggested adding another node to dependency to allow you to change the name of the artifact when it was brought into your project/jar/war. There might even be a JIRA already posted as an enchancement request, something along these lines: dep groupId/ artifactId/ version/ scope/ finalNameblah.jar/finalName /dep Ultimately, arguing over how this should work in Maven 2.0 is an exercise in futility. Your time will be better spent convincing the Maven Dev team to somehow make it work and add it to M2.1. You will need a fairly strong business case to make this happen I would think, as it seems to go against many of the Maven best practices in my mind. Additionally... you **could** make this work today in M2.0 by using System scope and specifying the path to the dependency as ../projectA/target/finalName.jar. But I am generally anti-system-scope (due to various unintended consequences w/it), so please don't complain if this screws some other things up... Wayne On 10/15/06, Yann Albou [EMAIL PROTECTED] wrote: Doug, thanks for your reply. Yes that's true, Maven has no knowledge of projet A. But it knows that A is a dependency. So it should include A as a reference in module B using the finalName: is it completly non sens? Moreover I found dangerous that the behavior is not the same when building projet B alone or when building within a multimodule. finalName is not used for the repository which is perfect. But the finalName doesn't only effect the name of the artifact but also references in ClassPath entry of the manifest file, references in application.xml for EAR or references in WEB-INF/lib for web module... Yann Doug Douglass wrote: Yann, This is to be expected. When running maven in your B project, maven has no knowledge of project A as a module to be built and referenced, only as a dependency that needs to be retrieved from a repository and added to the classpath. In addition, finalName only effects the name of the artifact generated in the target directory. If you install/deploy the same artifact it will (should) have the standard naming of ${artifactId}-${version}. This is A Good Thing, as it prevents ambiguity in the repository. HTH, Doug On 10/12/06, Yann Albou [EMAIL PROTECTED] wrote: Hi, I try to use the finalName in my parent pom as following: finalName${artifactId}/finalName (without the version number) If I run maven from the parent pom everything works fine: all my artifacts are generated without the version number. and also the classpath entry of the manifest.mf file is correctly set. For instance I get : parent --- A module --- B module (with a dependency on A) So it generates B.jar with a Manifest containning ClassPath: A.Jar Now If I run maven from B module it generates a B.jar but with a manifest containing ClassPath: A-1.2.1.Jar for instance. I get exactly the same behaviour with an EAR module that generate the application.xml = module are not generated with the correct name... If I run maven from the parent pom then the application.xml is generated correctly Did I miss something ? Yann. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] finalName not working
Yann, This is to be expected. When running maven in your B project, maven has no knowledge of project A as a module to be built and referenced, only as a dependency that needs to be retrieved from a repository and added to the classpath. In addition, finalName only effects the name of the artifact generated in the target directory. If you install/deploy the same artifact it will (should) have the standard naming of ${artifactId}-${version}. This is A Good Thing, as it prevents ambiguity in the repository. HTH, Doug On 10/12/06, Yann Albou [EMAIL PROTECTED] wrote: Hi, I try to use the finalName in my parent pom as following: finalName${artifactId}/finalName (without the version number) If I run maven from the parent pom everything works fine: all my artifacts are generated without the version number. and also the classpath entry of the manifest.mf file is correctly set. For instance I get : parent --- A module --- B module (with a dependency on A) So it generates B.jar with a Manifest containning ClassPath: A.Jar Now If I run maven from B module it generates a B.jar but with a manifest containing ClassPath: A-1.2.1.Jar for instance. I get exactly the same behaviour with an EAR module that generate the application.xml = module are not generated with the correct name... If I run maven from the parent pom then the application.xml is generated correctly Did I miss something ? Yann. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] finalName not working
Hi, I try to use the finalName in my parent pom as following: finalName${artifactId}/finalName (without the version number) If I run maven from the parent pom everything works fine: all my artifacts are generated without the version number. and also the classpath entry of the manifest.mf file is correctly set. For instance I get : parent --- A module --- B module (with a dependency on A) So it generates B.jar with a Manifest containning ClassPath: A.Jar Now If I run maven from B module it generates a B.jar but with a manifest containing ClassPath: A-1.2.1.Jar for instance. I get exactly the same behaviour with an EAR module that generate the application.xml = module are not generated with the correct name... If I run maven from the parent pom then the application.xml is generated correctly Did I miss something ? Yann. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]