Maven classpath order
Hi, I didn't get an answer from the maven users alias. Could someone here answer this. Maven classpath generation seems not to follow any order. Shouldn't it use the same order depedencies are mentioned in the pom file. Somewhere I read Maven 2.0.5 fixed this issue, but when I tested it doesn't seem to have fixed. Please let me know Thanks!!
Not using pom.xml
Hi, Is there any way I can force my custom made plugin to not use pom.xml. There is a parameter @requiresProject (which is used in archetype), this works fine if there is no pom.xml. But if pom is available the plugin will use it. What I want is even if the pom.xml is available do NOT use it. Please let me know. Thanks -Jagan
RE: Not using pom.xml
The reason is, the dependencies are resolved based on where we are running the build i.e., which branch in clear case. For diff branches I may need to select diff versions of the artifact which my plug-in is automated to take care. For this to work, I don't want maven to start looking for the dependencies and download once you execute the maven goal. My plug-in will update the pom file dependencies on the fly with the exact version we need to use and then give control to maven to do its work. This can achieved if I can disable the dependencies resolution at the starting or not use the pom file itself. Do you see anyway to achieve this. Thanks -Jagan -Original Message- From: Eric Redmond [mailto:[EMAIL PROTECTED] Sent: Thursday, July 13, 2006 2:43 PM To: Maven Developers List Subject: Re: Not using pom.xml I don't believe that is an option. The question is... why? Is it because you want to always require the user to enter command-line parameters? Thanks; Eric On 7/13/06, Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) [EMAIL PROTECTED] wrote: Hi, Is there any way I can force my custom made plugin to not use pom.xml. There is a parameter @requiresProject (which is used in archetype), this works fine if there is no pom.xml. But if pom is available the plugin will use it. What I want is even if the pom.xml is available do NOT use it. Please let me know. Thanks -Jagan -- Eric http://codehaus.org/~eredmond - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Not using pom.xml
I think there is no = sign. Its just @requiresProject false. This will run fine with no pom.xml but if pom is available it uses it. I want it to ignore the pom.xml even if the file is available. Any idea ?? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 13, 2006 10:44 PM To: dev@maven.apache.org Subject: RE: Not using pom.xml Hi Did you set @requiresProject=false? Hermod -Original Message- From: Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) [mailto:[EMAIL PROTECTED] Sent: Thursday, July 13, 2006 11:08 PM To: Maven Developers List Subject: Not using pom.xml Hi, Is there any way I can force my custom made plugin to not use pom.xml. There is a parameter @requiresProject (which is used in archetype), this works fine if there is no pom.xml. But if pom is available the plugin will use it. What I want is even if the pom.xml is available do NOT use it. Please let me know. Thanks -Jagan * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - 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]
alternative pom file in modules
How can I force Maven2 to use an alternate pom file in the modules. When I call mvn command with the option, -f pom_main.xml, only the main pom is using the pom_main.xml. In the modules, its still trying to run using the default pom.xml. How can I force it to use alternate pom for all the modules ? Thanks -Jagan
RE: Maven2 dependency classpath in Java plugin
Thanks Brett!! It worked fine after adding @requiresDependencyResolution. Thanks -Jagan -Original Message- From: Brett Porter [mailto:[EMAIL PROTECTED] Sent: Saturday, December 03, 2005 10:09 PM To: Maven Developers List Subject: Re: Maven2 dependency classpath in Java plugin Hvae you included @requiresDependencyResolution in your metadata? - Brett Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: Hi Brett, I tried this. All its returning is my project output classes dir (target/classes). Why doesn't it have the dependencies mentioned in the POM file. I checked the project.getArtifacts() project.getDependencyArtifacts(). These 2 are returning null. Project.getDependencies is returning an object like this, Dependency {groupId=junit, artifactId=junit, version=3.8.1, type=jar},Dependency {groupId=org.apache.maven, artifactId=maven-project, version=2.0-beta-3, type=jar}, What I am trying to do is, To get the classpath from maven and pass it to another command using -classpath option. I need to have all the dependency jars in this classpath. Isn't there a easy way to get the classpath var just like $CLASSPATH Please let me know at your earliest. Thanks -Jagan -Original Message- From: Brett Porter [mailto:[EMAIL PROTECTED] Sent: Friday, December 02, 2005 9:31 PM To: Maven Developers List Subject: Re: Maven2 dependency classpath in Java plugin The expression you are looking for is: ${project.runtimeClasspathElements} You might like to look at a plugin such as the WAR plugin for an example. - Brett Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: Hi, I am trying to get the mvn dependency classpath inside the plugin written using java. In maven 1 there seems to be a way for ant using {maven.dependency.classpath}. Does anyone know how to get this classpath in maven2 Also in org.apache.maven.project.Project seems to have a method getdependecyClassPath(). But I am not sure which jar file is this Project class is in. when I put the above class in import statement its erroring out. Please let me know Thanks Jagan - 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] - 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: Maven2 dependency classpath in Java plugin
Hi Brett, I tried this. All its returning is my project output classes dir (target/classes). Why doesn't it have the dependencies mentioned in the POM file. I checked the project.getArtifacts() project.getDependencyArtifacts(). These 2 are returning null. Project.getDependencies is returning an object like this, Dependency {groupId=junit, artifactId=junit, version=3.8.1, type=jar},Dependency {groupId=org.apache.maven, artifactId=maven-project, version=2.0-beta-3, type=jar}, What I am trying to do is, To get the classpath from maven and pass it to another command using -classpath option. I need to have all the dependency jars in this classpath. Isn't there a easy way to get the classpath var just like $CLASSPATH Please let me know at your earliest. Thanks -Jagan -Original Message- From: Brett Porter [mailto:[EMAIL PROTECTED] Sent: Friday, December 02, 2005 9:31 PM To: Maven Developers List Subject: Re: Maven2 dependency classpath in Java plugin The expression you are looking for is: ${project.runtimeClasspathElements} You might like to look at a plugin such as the WAR plugin for an example. - Brett Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: Hi, I am trying to get the mvn dependency classpath inside the plugin written using java. In maven 1 there seems to be a way for ant using {maven.dependency.classpath}. Does anyone know how to get this classpath in maven2 Also in org.apache.maven.project.Project seems to have a method getdependecyClassPath(). But I am not sure which jar file is this Project class is in. when I put the above class in import statement its erroring out. Please let me know Thanks Jagan - 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]
Maven2 dependency classpath in Java plugin
Hi, I am trying to get the mvn dependency classpath inside the plugin written using java. In maven 1 there seems to be a way for ant using {maven.dependency.classpath}. Does anyone know how to get this classpath in maven2 Also in org.apache.maven.project.Project seems to have a method getdependecyClassPath(). But I am not sure which jar file is this Project class is in. when I put the above class in import statement its erroring out. Please let me know Thanks Jagan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]