Refactoring question
I use maven 2.0.9, jdk 1.6.0_10 to build my project. Now I encounter a dilemma. I have source code e.g. example/ioc/MyIoc.java, example/ioc/tapestry5/MyIocWrapper.java and related Test files. They are located in different folders at the beginning. Now I want to reorganize/ refactor the source code. So the structure may become example/ioc/MyIoc.java, example/ioc/MyIocWrapper.java. However, there are many classes which has similar situation. That means they may just be located in different folders. As I understand, in eclipse a developer can simply right-click and choose refactoring after modifying the source, then related source code in other classes would be changed as well. So I would like to know is there any chance this can be achieve using maven plugin? Or generally people who use maven (but don't use eclipse) would recommend the best approach? I appreciate any suggestion. Thank you very much. -- View this message in context: http://old.nabble.com/Refactoring-question-tp26464173p26464173.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
how to copy jar (also) to target installation dir
I want to config the pom project to copy the final jar file to an installation dir and bind it to the 'install' phase. meaning, when i just build the project, the jar will be built into the default target/project.jar. but when i install it should be also should be copied to /usr/local/application/project.jar. i tried adding OutputDirectory in the 'jar' plugin, but it just changed the default target. -- Eyal Edri
Re: Refactoring question
I find intellij has great refactoring support... and there is now a free (as in apache licensed) version available in intellij you just go file | open project, point it at your pom.xml and it will open your project with everything just configured. then just drag and drop your java sources into the packages you want committing as you go and you're done (netbeans and eclipse have similar support, but in my experience intellij is best for refactoring) -Stephen Sent from my [rhymes with tryPod] ;-) On 22 Nov 2009, at 13:41, neo anderson javadeveloper...@yahoo.co.uk wrote: I use maven 2.0.9, jdk 1.6.0_10 to build my project. Now I encounter a dilemma. I have source code e.g. example/ioc/ MyIoc.java, example/ioc/tapestry5/MyIocWrapper.java and related Test files. They are located in different folders at the beginning. Now I want to reorganize/ refactor the source code. So the structure may become example/ioc/MyIoc.java, example/ioc/MyIocWrapper.java. However, there are many classes which has similar situation. That means they may just be located in different folders. As I understand, in eclipse a developer can simply right-click and choose refactoring after modifying the source, then related source code in other classes would be changed as well. So I would like to know is there any chance this can be achieve using maven plugin? Or generally people who use maven (but don't use eclipse) would recommend the best approach? I appreciate any suggestion. Thank you very much. -- View this message in context: http://old.nabble.com/Refactoring-question-tp26464173p26464173.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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: how to copy jar (also) to target installation dir
your best bet is to bind an execution of the antrun plugin to the install phase and use the ant copy task to copy the file for you Sent from my [rhymes with tryPod] ;-) On 22 Nov 2009, at 13:43, eyal edri eyal.e...@gmail.com wrote: I want to config the pom project to copy the final jar file to an installation dir and bind it to the 'install' phase. meaning, when i just build the project, the jar will be built into the default target/project.jar. but when i install it should be also should be copied to /usr/local/application/project.jar. i tried adding OutputDirectory in the 'jar' plugin, but it just changed the default target. -- Eyal Edri - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: how to copy jar (also) to target installation dir
It should work with the antrun plugin ( and ant's copy task. ) ( configure an antrun plugin execution to attach to install phase ) --sony On Sun, Nov 22, 2009 at 8:43 AM, eyal edri eyal.e...@gmail.com wrote: I want to config the pom project to copy the final jar file to an installation dir and bind it to the 'install' phase. meaning, when i just build the project, the jar will be built into the default target/project.jar. but when i install it should be also should be copied to /usr/local/application/project.jar. i tried adding OutputDirectory in the 'jar' plugin, but it just changed the default target. -- Eyal Edri
Re: [WARNING] POM is invalid. error messages in Maven 2.2.1 but not in 2.0.10
Hi Brian, Could you please clarify what's actually plain wrong about it? Going back to the example I posted: dependency groupIdcom.sun/groupId artifactIdrt/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/lib/rt.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/weblogic.jar/systemPath /dependency Do you mean the first one, referencing ${java.home} is correct and the one referencing ${env.WL_HOME} is wrong? So what should we do to make it work? thanks, Ellecer On Sat, Nov 21, 2009 at 4:33 AM, Brian E. Fox bri...@infinity.nu wrote: Maybe 2.2.2 will fix it. =) Not likely. The pom is plain wrong an it was a bug in 2.x which allowed it to go unnoticed. On Fri, Nov 20, 2009 at 3:42 PM, Brett Randall javabr...@gmail.com wrote: http://jira.codehaus.org/browse/MNG-4379 ... or did your team log that :). On Fri, Nov 20, 2009 at 2:59 PM, Ellecer Valencia elle...@gmail.com wrote: Hi Brett, Thanks for the suggestion. I may have found the issue. Would it be this: Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] [DEBUG] mypackage:myartifact:jar:1.0.2:compile (selected for compile) [DEBUG] Skipping disabled repository central [DEBUG] myartifact: using locally installed snapshot [WARNING] POM for 'mypackage:myartifact:pom:1.0.2-SNAPSHOT:test' is invalid. Its dependencies (if any) will NOT be available to the current build. [DEBUG] Reason: Failed to validate POM for project mypackage:myartifact at Artifact [mypackage:myartifact:pom:1.0.2-SNAPSHOT:test] [DEBUG] Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=webservices, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=webservices, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] Now in this project, we are inheriting from a parent POM (standardised for our department) with entries like this: (WL_HOME is Weblogic install directory) dependency groupIdcom.sun/groupId artifactIdtools/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/../lib/tools.jar/systemPath /dependency dependency groupIdcom.sun/groupId artifactIdrt/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/lib/rt.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/weblogic.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdwebservices/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/webservices.jar/systemPath /dependency Now it only fails on the Weblogic related entries. With the Java system dependencies it seems to do fine. Has the handling of this changed from 2.0.* to 2.2.*? If so, what should we replace it with? And will these settings also work for people still using maven 2.0.10? Ellecer On Fri, Nov 20, 2009 at 1:01 PM, Brett Randall javabr...@gmail.com wrote: Hi Ellecer What is the output of mvn -e -X ... Brett On Fri, Nov 20, 2009 at 11:41 AM, Ellecer Valencia elle...@gmail.com wrote: Hi, How come when I try a build using Maven 2.2.1 I get multiple messages like this: [WARNING] POM for 'mypackage.artifact:pom:1.0.2-SNAPSHOT:compile' is invalid. Its dependencies (if any) will NOT be available to the current build. These errors weren't displaying when I was using Maven 2.0.10 I'm trying to use the newer version of Maven but I can't proceed with these error messages. How can I find out what are the actual errors it's referring to? I didn't come across any mention of relevant POM format changes going from Maven 2.0.* to 2.1.* or 2.2.* - if anyone has any info on this it would be a great help! Is there a way to validate the pom and get
[ANN] Signatures of Java Runtimes for use with Animal Sniffer released
The Mojo team is pleased to announce the release of a number of signatures of various versions of the Java Runtime for use with the Animal Sniffer set of utilities. The following signatures have been released: Generic Signatures (only includes public API classes) * Java 1.3 (http://mojo.codehaus.org/signatures/java13/) Signatures including Sun implementation classes: * Sun Java 1.3 (http://mojo.codehaus.org/signatures/java13-sun/) Signatures including IBM implementation classes: * IBM Java 1.4 (http://mojo.codehaus.org/signatures/java14-ibm/) Signatures including Oracle JRockit implementation classes: * Oracle JRockit Java 1.4 (http://mojo.codehaus.org/signatures/java14-jrockit/) Animal Sniffer provides three tools that can use these signatures: * A Maven Plugin (http://mojo.codehaus.org/animal-sniffer-maven-plugin/index.html) * ANT Tasks (http://mojo.codehaus.org/animal-sniffer/animal-sniffer-ant-tasks/index.html) * A Maven Enforcer Rule (http://mojo.codehaus.org/animal-sniffer/animal-sniffer-enforcer-rule/index.html) The artifacts have been deployed to the codehaus repository and have been/will be mirrored to central. The Mojo Team. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: [WARNING] POM is invalid. error messages in Maven 2.2.1 but not in 2.0.10
Well Maven sees it just like the message: [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. So since the first one works and the second one doesn't, that leads me to believe that WL_HOME isn't defined in your environment. On Sun, Nov 22, 2009 at 9:06 AM, Ellecer Valencia elle...@gmail.com wrote: Hi Brian, Could you please clarify what's actually plain wrong about it? Going back to the example I posted: dependency groupIdcom.sun/groupId artifactIdrt/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/lib/rt.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/weblogic.jar/systemPath /dependency Do you mean the first one, referencing ${java.home} is correct and the one referencing ${env.WL_HOME} is wrong? So what should we do to make it work? thanks, Ellecer On Sat, Nov 21, 2009 at 4:33 AM, Brian E. Fox bri...@infinity.nu wrote: Maybe 2.2.2 will fix it. =) Not likely. The pom is plain wrong an it was a bug in 2.x which allowed it to go unnoticed. On Fri, Nov 20, 2009 at 3:42 PM, Brett Randall javabr...@gmail.com wrote: http://jira.codehaus.org/browse/MNG-4379 ... or did your team log that :). On Fri, Nov 20, 2009 at 2:59 PM, Ellecer Valencia elle...@gmail.com wrote: Hi Brett, Thanks for the suggestion. I may have found the issue. Would it be this: Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] [DEBUG] mypackage:myartifact:jar:1.0.2:compile (selected for compile) [DEBUG] Skipping disabled repository central [DEBUG] myartifact: using locally installed snapshot [WARNING] POM for 'mypackage:myartifact:pom:1.0.2-SNAPSHOT:test' is invalid. Its dependencies (if any) will NOT be available to the current build. [DEBUG] Reason: Failed to validate POM for project mypackage:myartifact at Artifact [mypackage:myartifact:pom:1.0.2-SNAPSHOT:test] [DEBUG] Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=webservices, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=webservices, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] Now in this project, we are inheriting from a parent POM (standardised for our department) with entries like this: (WL_HOME is Weblogic install directory) dependency groupIdcom.sun/groupId artifactIdtools/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/../lib/tools.jar/systemPath /dependency dependency groupIdcom.sun/groupId artifactIdrt/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/lib/rt.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/weblogic.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdwebservices/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/webservices.jar/systemPath /dependency Now it only fails on the Weblogic related entries. With the Java system dependencies it seems to do fine. Has the handling of this changed from 2.0.* to 2.2.*? If so, what should we replace it with? And will these settings also work for people still using maven 2.0.10? Ellecer On Fri, Nov 20, 2009 at 1:01 PM, Brett Randall javabr...@gmail.com wrote: Hi Ellecer What is the output of mvn -e -X ... Brett On Fri, Nov 20, 2009 at 11:41 AM, Ellecer Valencia elle...@gmail.com wrote: Hi, How come when I try a build using Maven 2.2.1 I get multiple messages like this: [WARNING] POM for 'mypackage.artifact:pom:1.0.2-SNAPSHOT:compile' is invalid. Its dependencies (if any) will NOT be available to the current build. These
Re: [WARNING] POM is invalid. error messages in Maven 2.2.1 but not in 2.0.10
But that's exactly the problem - it *is* defined in the environment. :( $ls -l $WL_HOME/server/lib/webservices.jar -rwxr-xr-x. 1 dev dev 1696324 2009-10-30 16:55 /usr/java/weblogic/server/lib/webservices.jar $echo $WL_HOME /usr/java/weblogic The Maven project I am trying to build has a pom.xml with a parent pom parent artifactIdsuper_pom/artifactId groupIdmypackage/groupId version1.0.2-SNAPSHOT/version /parent and it's in super_pom where the weblogic dependency is declared. On Mon, Nov 23, 2009 at 9:18 AM, Brian Fox bri...@infinity.nu wrote: Well Maven sees it just like the message: [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. So since the first one works and the second one doesn't, that leads me to believe that WL_HOME isn't defined in your environment. On Sun, Nov 22, 2009 at 9:06 AM, Ellecer Valencia elle...@gmail.com wrote: Hi Brian, Could you please clarify what's actually plain wrong about it? Going back to the example I posted: dependency groupIdcom.sun/groupId artifactIdrt/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/lib/rt.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/weblogic.jar/systemPath /dependency Do you mean the first one, referencing ${java.home} is correct and the one referencing ${env.WL_HOME} is wrong? So what should we do to make it work? thanks, Ellecer On Sat, Nov 21, 2009 at 4:33 AM, Brian E. Fox bri...@infinity.nu wrote: Maybe 2.2.2 will fix it. =) Not likely. The pom is plain wrong an it was a bug in 2.x which allowed it to go unnoticed. On Fri, Nov 20, 2009 at 3:42 PM, Brett Randall javabr...@gmail.com wrote: http://jira.codehaus.org/browse/MNG-4379 ... or did your team log that :). On Fri, Nov 20, 2009 at 2:59 PM, Ellecer Valencia elle...@gmail.com wrote: Hi Brett, Thanks for the suggestion. I may have found the issue. Would it be this: Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] [DEBUG] mypackage:myartifact:jar:1.0.2:compile (selected for compile) [DEBUG] Skipping disabled repository central [DEBUG] myartifact: using locally installed snapshot [WARNING] POM for 'mypackage:myartifact:pom:1.0.2-SNAPSHOT:test' is invalid. Its dependencies (if any) will NOT be available to the current build. [DEBUG] Reason: Failed to validate POM for project mypackage:myartifact at Artifact [mypackage:myartifact:pom:1.0.2-SNAPSHOT:test] [DEBUG] Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=webservices, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=webservices, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] Now in this project, we are inheriting from a parent POM (standardised for our department) with entries like this: (WL_HOME is Weblogic install directory) dependency groupIdcom.sun/groupId artifactIdtools/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/../lib/tools.jar/systemPath /dependency dependency groupIdcom.sun/groupId artifactIdrt/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/lib/rt.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/weblogic.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdwebservices/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/webservices.jar/systemPath /dependency Now it only fails on the Weblogic related entries. With the Java system dependencies it seems to do fine. Has the handling of
Re: [WARNING] POM is invalid. error messages in Maven 2.2.1 but not in 2.0.10
Did you also export WL_HOME? I tried something similar here and it works fine in 2.2.1. - Brett On 23/11/2009, at 10:08 AM, Ellecer Valencia wrote: But that's exactly the problem - it *is* defined in the environment. :( $ls -l $WL_HOME/server/lib/webservices.jar -rwxr-xr-x. 1 dev dev 1696324 2009-10-30 16:55 /usr/java/weblogic/server/lib/webservices.jar $echo $WL_HOME /usr/java/weblogic The Maven project I am trying to build has a pom.xml with a parent pom parent artifactIdsuper_pom/artifactId groupIdmypackage/groupId version1.0.2-SNAPSHOT/version /parent and it's in super_pom where the weblogic dependency is declared. On Mon, Nov 23, 2009 at 9:18 AM, Brian Fox bri...@infinity.nu wrote: Well Maven sees it just like the message: [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. So since the first one works and the second one doesn't, that leads me to believe that WL_HOME isn't defined in your environment. On Sun, Nov 22, 2009 at 9:06 AM, Ellecer Valencia elle...@gmail.com wrote: Hi Brian, Could you please clarify what's actually plain wrong about it? Going back to the example I posted: dependency groupIdcom.sun/groupId artifactIdrt/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/lib/rt.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/weblogic.jar/systemPath /dependency Do you mean the first one, referencing ${java.home} is correct and the one referencing ${env.WL_HOME} is wrong? So what should we do to make it work? thanks, Ellecer On Sat, Nov 21, 2009 at 4:33 AM, Brian E. Fox bri...@infinity.nu wrote: Maybe 2.2.2 will fix it. =) Not likely. The pom is plain wrong an it was a bug in 2.x which allowed it to go unnoticed. On Fri, Nov 20, 2009 at 3:42 PM, Brett Randall javabr...@gmail.com wrote: http://jira.codehaus.org/browse/MNG-4379 ... or did your team log that :). On Fri, Nov 20, 2009 at 2:59 PM, Ellecer Valencia elle...@gmail.com wrote: Hi Brett, Thanks for the suggestion. I may have found the issue. Would it be this: Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] [DEBUG] mypackage:myartifact:jar:1.0.2:compile (selected for compile) [DEBUG] Skipping disabled repository central [DEBUG] myartifact: using locally installed snapshot [WARNING] POM for 'mypackage:myartifact:pom:1.0.2-SNAPSHOT:test' is invalid. Its dependencies (if any) will NOT be available to the current build. [DEBUG] Reason: Failed to validate POM for project mypackage:myartifact at Artifact [mypackage:myartifact:pom:1.0.2-SNAPSHOT:test] [DEBUG] Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=webservices, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=webservices, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] Now in this project, we are inheriting from a parent POM (standardised for our department) with entries like this: (WL_HOME is Weblogic install directory) dependency groupIdcom.sun/groupId artifactIdtools/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/../lib/tools.jar/systemPath /dependency dependency groupIdcom.sun/groupId artifactIdrt/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/lib/rt.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/weblogic.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdwebservices/artifactId version10.0/version scopesystem/scope
Re: [WARNING] POM is invalid. error messages in Maven 2.2.1 but not in 2.0.10
On Mon, Nov 23, 2009 at 11:18 AM, Brett Porter br...@apache.org wrote: Did you also export WL_HOME? I tried something similar here and it works fine in 2.2.1. - Brett Hi Brett, I'd presume the environment variable being there means that's already happened. =) This entry is in .bashrc so I'm pretty sure the environment var is always created. export WL_HOME=/usr/java/weblogic I've just created a new session window and see these errors when I run with mvn -o -X -e package Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. Ellecer On 23/11/2009, at 10:08 AM, Ellecer Valencia wrote: But that's exactly the problem - it *is* defined in the environment. :( $ls -l $WL_HOME/server/lib/webservices.jar -rwxr-xr-x. 1 dev dev 1696324 2009-10-30 16:55 /usr/java/weblogic/server/lib/webservices.jar $echo $WL_HOME /usr/java/weblogic The Maven project I am trying to build has a pom.xml with a parent pom parent artifactIdsuper_pom/artifactId groupIdmypackage/groupId version1.0.2-SNAPSHOT/version /parent and it's in super_pom where the weblogic dependency is declared. On Mon, Nov 23, 2009 at 9:18 AM, Brian Fox bri...@infinity.nu wrote: Well Maven sees it just like the message: [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. So since the first one works and the second one doesn't, that leads me to believe that WL_HOME isn't defined in your environment. On Sun, Nov 22, 2009 at 9:06 AM, Ellecer Valencia elle...@gmail.com wrote: Hi Brian, Could you please clarify what's actually plain wrong about it? Going back to the example I posted: dependency groupIdcom.sun/groupId artifactIdrt/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/lib/rt.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/weblogic.jar/systemPath /dependency Do you mean the first one, referencing ${java.home} is correct and the one referencing ${env.WL_HOME} is wrong? So what should we do to make it work? thanks, Ellecer On Sat, Nov 21, 2009 at 4:33 AM, Brian E. Fox bri...@infinity.nu wrote: Maybe 2.2.2 will fix it. =) Not likely. The pom is plain wrong an it was a bug in 2.x which allowed it to go unnoticed. On Fri, Nov 20, 2009 at 3:42 PM, Brett Randall javabr...@gmail.com wrote: http://jira.codehaus.org/browse/MNG-4379 ... or did your team log that :). On Fri, Nov 20, 2009 at 2:59 PM, Ellecer Valencia elle...@gmail.com wrote: Hi Brett, Thanks for the suggestion. I may have found the issue. Would it be this: Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] [DEBUG] mypackage:myartifact:jar:1.0.2:compile (selected for compile) [DEBUG] Skipping disabled repository central [DEBUG] myartifact: using locally installed snapshot [WARNING] POM for 'mypackage:myartifact:pom:1.0.2-SNAPSHOT:test' is invalid. Its dependencies (if any) will NOT be available to the current build. [DEBUG] Reason: Failed to validate POM for project mypackage:myartifact at Artifact [mypackage:myartifact:pom:1.0.2-SNAPSHOT:test] [DEBUG] Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=webservices, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=webservices, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] Now in this project, we are inheriting from a parent POM (standardised for our department) with entries like this: (WL_HOME is Weblogic install directory) dependency groupIdcom.sun/groupId
Building sub projects pom from parent's pom.
Hi, I am new to maven. Anyways I was able to build my war using maven build. I wanted to move forward from where I need to call other dependent sub project's maven.cmd first from my pom.xml. My project structure looks like this : projA | |-subProjA | |-pom.xml | |- maven.cmd | |-subProjB | |-pom.xml | |- maven.cmd | |-subProjC | |-pom.xml | |- maven.cmd | |-pom.xml |- maven.cmd projA's pom.xml must be able to call all subProj's maven.cmd before building the projA.war. Please guide me. Thanks in Advance, Pinky Muralidhar. Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
Re: Building sub projects pom from parent's pom.
projA should not be a war project, it should merely be a aggregation pom. Move your war project to a sub-project. Read this: http://www.sonatype.com/books/maven-book/reference/multimodule.html /Anders On Mon, Nov 23, 2009 at 07:45, pinky.muralid...@wipro.com wrote: Hi, I am new to maven. Anyways I was able to build my war using maven build. I wanted to move forward from where I need to call other dependent sub project's maven.cmd first from my pom.xml. My project structure looks like this : projA | |-subProjA | |-pom.xml | |- maven.cmd | |-subProjB | |-pom.xml | |- maven.cmd | |-subProjC | |-pom.xml | |- maven.cmd | |-pom.xml |- maven.cmd projA's pom.xml must be able to call all subProj's maven.cmd before building the projA.war. Please guide me. Thanks in Advance, Pinky Muralidhar. Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
Re: [WARNING] POM is invalid. error messages in Maven 2.2.1 but not in 2.0.10
Hi Ellecer, Is there a chance you are seeing http://jira.codehaus.org/browse/MNG-4148 , which is duplicated by http://jira.codehaus.org/browse/MNG-2626 ? Does that fit your parent POM hierarchy? Other Brett On Mon, Nov 23, 2009 at 2:17 PM, Ellecer Valencia elle...@gmail.com wrote: On Mon, Nov 23, 2009 at 11:18 AM, Brett Porter br...@apache.org wrote: Did you also export WL_HOME? I tried something similar here and it works fine in 2.2.1. - Brett Hi Brett, I'd presume the environment variable being there means that's already happened. =) This entry is in .bashrc so I'm pretty sure the environment var is always created. export WL_HOME=/usr/java/weblogic I've just created a new session window and see these errors when I run with mvn -o -X -e package Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. Ellecer On 23/11/2009, at 10:08 AM, Ellecer Valencia wrote: But that's exactly the problem - it *is* defined in the environment. :( $ls -l $WL_HOME/server/lib/webservices.jar -rwxr-xr-x. 1 dev dev 1696324 2009-10-30 16:55 /usr/java/weblogic/server/lib/webservices.jar $echo $WL_HOME /usr/java/weblogic The Maven project I am trying to build has a pom.xml with a parent pom parent artifactIdsuper_pom/artifactId groupIdmypackage/groupId version1.0.2-SNAPSHOT/version /parent and it's in super_pom where the weblogic dependency is declared. On Mon, Nov 23, 2009 at 9:18 AM, Brian Fox bri...@infinity.nu wrote: Well Maven sees it just like the message: [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. So since the first one works and the second one doesn't, that leads me to believe that WL_HOME isn't defined in your environment. On Sun, Nov 22, 2009 at 9:06 AM, Ellecer Valencia elle...@gmail.com wrote: Hi Brian, Could you please clarify what's actually plain wrong about it? Going back to the example I posted: dependency groupIdcom.sun/groupId artifactIdrt/artifactId version1.5.0.11/version scopesystem/scope systemPath${java.home}/lib/rt.jar/systemPath /dependency dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version10.0/version scopesystem/scope systemPath${env.WL_HOME}/server/lib/weblogic.jar/systemPath /dependency Do you mean the first one, referencing ${java.home} is correct and the one referencing ${env.WL_HOME} is wrong? So what should we do to make it work? thanks, Ellecer On Sat, Nov 21, 2009 at 4:33 AM, Brian E. Fox bri...@infinity.nu wrote: Maybe 2.2.2 will fix it. =) Not likely. The pom is plain wrong an it was a bug in 2.x which allowed it to go unnoticed. On Fri, Nov 20, 2009 at 3:42 PM, Brett Randall javabr...@gmail.com wrote: http://jira.codehaus.org/browse/MNG-4379 ... or did your team log that :). On Fri, Nov 20, 2009 at 2:59 PM, Ellecer Valencia elle...@gmail.com wrote: Hi Brett, Thanks for the suggestion. I may have found the issue. Would it be this: Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] [DEBUG] mypackage:myartifact:jar:1.0.2:compile (selected for compile) [DEBUG] Skipping disabled repository central [DEBUG] myartifact: using locally installed snapshot [WARNING] POM for 'mypackage:myartifact:pom:1.0.2-SNAPSHOT:test' is invalid. Its dependencies (if any) will NOT be available to the current build. [DEBUG] Reason: Failed to validate POM for project mypackage:myartifact at Artifact [mypackage:myartifact:pom:1.0.2-SNAPSHOT:test] [DEBUG] Validation Errors: [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For dependency Dependency {groupId=weblogic, artifactId=webservices, version=10.0, type=jar}: system-scoped dependency must specify an absolute path systemPath. [DEBUG] For managed dependency Dependency {groupId=weblogic, artifactId=weblogic, version=10.0, type=jar}: system-scoped dependency must specify an