Re: Repositories in settings.xml
Hi Ron, thanks for your answer, How are builds repeatable in your case? The people looking after QA and support have a great deal of difficulty saying what was in a build if you use SNAPSHOTS. In the corporate pom, I try to change only plugins configuration for stuff that does not involve the jar (aka javadoc, attached-sources, etc...) Why is your corporate POM so unstable? We're still in migration process, we're moving away from a in-house build tool. Because of the amount of projects, the migration might take more than a year... so to ease the updates (because new requirements will come up all the time), I'd like to keep the parent-pom as SNAPSHOT. Anders asked for a specific piece of information. The effective-pom shows the exact same piece of configuration I sent: repositories repository idpublic/id urlhttp://artifacts/content/groups/public/url releases enabledtrue/enabled /releases snapshots enabledfalse/enabled /snapshots /repository repository idallowed-snapshots/id urlhttp://artifacts/content/groups/allowed-snapshots//url snapshots enabledtrue/enabled /snapshots /repository /repositories So my question is, why does Maven fetch SNAPSHOTS from the first repository? Cheers, Jérémy Cheers, Jérémy On Mon, May 23, 2011 at 10:24 AM, Anders Hammarand...@hammar.net wrote: Check the effective pom to see what Maven is working on. This will show what repositories are enabled and how configured. mvn help:effective-pom -P theprofileyoursusing But, I seriously wonder why you would like to use a snapshot repo when doing a release. A release should never use snapshots. /Anders On Mon, May 23, 2011 at 10:15, Jérémymer...@gmail.com wrote: Hi, I noticed a weird behavior with the versions resolution of Maven 3.0.3. Here's my setup: I use Nexus and have a first repository group containing release and snapshots versions and a second repository group with only snapshots. When I want to release a product, I want to pick only the release versions of the first repository group and snapshots versions of the second repository group. In my settings.xml, I have a profile with the following configurations: repositories repository idpublic/id urlhttp://artifacts/content/groups/public/url releases enabledtrue/enabled /releases snapshots enabledfalse/enabled /snapshots /repository repository idallowed-snapshots/id urlhttp://artifacts/content/groups/allowed-snapshots//url snapshots enabledtrue/enabled /snapshots /repository /repositories With this configuration, Maven picks up snapshots from the public repository. However if I remove the second repository, the resolution works as attended. It seems that the enabled variable acts as a global variable across settings.xml. Is that a bug? Cheers, Jérémy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven 3 provided dependency pulls a compile dependency
maven 3.0.3 I have a parent company pom that defines a dependency as provided. This provided dependency has a number of dependencies itself, among which commons-collections:commons-collections. My understanding is that all dependencies on which the provided dependency depends on should also be provided. But that's not what's happening in my case. What I end up with is commons-collections:commons-collections being pulled as compile instead of provided in a ear project (I'm running mvn clean install -X to check the dependencies). Have tried to defined the provided dependency directly in the ear project itself instead of the company pom, but no luck either. I see the provided dependency twice. One time with all its dependencies as provided and another time the provided dependency with only commons-collections:commons-collections as compile dependency. I have also seen in another project that the -X didn't show the correct list of dependencies. Instead I had to search through the poms to find out which one was pulling a compile dependency that should have been provided instead. Anybody an idea? -- View this message in context: http://maven.40175.n5.nabble.com/maven-3-provided-dependency-pulls-a-compile-dependency-tp4421451p4421451.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: maven 3 provided dependency pulls a compile dependency
what does mvn dependency:tree tell you in the EAR project? On 24 May 2011 09:47, Yann Albou yann-em...@club-internet.fr wrote: maven 3.0.3 I have a parent company pom that defines a dependency as provided. This provided dependency has a number of dependencies itself, among which commons-collections:commons-collections. My understanding is that all dependencies on which the provided dependency depends on should also be provided. But that's not what's happening in my case. What I end up with is commons-collections:commons-collections being pulled as compile instead of provided in a ear project (I'm running mvn clean install -X to check the dependencies). Have tried to defined the provided dependency directly in the ear project itself instead of the company pom, but no luck either. I see the provided dependency twice. One time with all its dependencies as provided and another time the provided dependency with only commons-collections:commons-collections as compile dependency. I have also seen in another project that the -X didn't show the correct list of dependencies. Instead I had to search through the poms to find out which one was pulling a compile dependency that should have been provided instead. Anybody an idea? -- View this message in context: http://maven.40175.n5.nabble.com/maven-3-provided-dependency-pulls-a-compile-dependency-tp4421451p4421451.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: maven 3 provided dependency pulls a compile dependency
According to the maven 3 release notes https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html it's not reliable. Furthermore, not all parts of the Maven 2.x resolution API could be bridged onto Aether. Most notably the maven-dependency-tree shared component which is used for mvn dependency:tree still uses the legacy resolution code. As such, the output from mvn dependency:tree can differ from the actual dependency tree used by Maven itself to derive the classpaths of a project. For now, the actual dependency trees can be inspected when running Maven with debug logging enabled. Thanks for the hint though. -- View this message in context: http://maven.40175.n5.nabble.com/maven-3-provided-dependency-pulls-a-compile-dependency-tp4421451p4421584.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: Problem in delpoying an external jar to the local repo
Full Stack trace for the above error : Caused by: org.apache.maven.project.DependencyResolutionException: Could not re olve dependencies for project org.mule.examples:GDS-Switch:war:1.0-SNAPSHOT: Fa led to collect dependencies for [org.mule:mule-core:jar:2.2.1 (compile), org.mu e.modules:mule-module-spring-config:jar:2.2.1 (compile), org.mule.modules:mule- odule-spring-extras:jar:2.2.1 (compile), org.mule.transports:mule-transport-std o:jar:2.2.1 (compile), org.mule.transports:mule-transport-http:jar:2.2.1 (compi e), org.mule.transports:mule-transport-vm:jar:2.2.1 (compile), org.opentravel.o a:ota-jaxb-jar:jar:1.0 (compile), org.ota:ota-jibx-jar:jar:1.0 (compile), org.m sql:ota-sql-jar:jar:1.0 (compile), org.neethi:ota-neethi-jar:jar:2.0.4 (compile , gds.quartz:gds-quartz-jar:jar:1.6.0 (compile), gds.ant:gds-ant-jar:jar:1.6.5 compile), gds.bsh:gds-bsh-jar:jar:2.4 (compile), gds.cxf:gds-cxf-jar:jar:2.1.2 compile), gds.joda:gds-joda-jar:jar:1.6 (compile), gds.oro:gds-oro-jar:jar:2.0. (compile), gds.ognl:gds-ognl-jar:jar:2.7.3 (compile), gds.jdom:gds-jdom-jar:ja :1.0 (compile), gds.dom4j:gds-dom4j-jar:jar:1.6.1 (compile), gds.jibx:gds-jibx- ar:jar:1.2.2 (compile), gds.velocity:gds-velocity-jar:jar:1.4 (compile), gds.ax s:gds-axis-jar:jar:1.4 (compile), gds.cxf.api:gds-cxf-api-jar:jar:2.1.2 (compil ), gds.drools.ant:gds-drools-ant-jar:jar:5.1.1 (compile), gds.ota.messaging:gds ota-messaging-jar:jar:1.7.8 (compile), gds.jaxb.xjc:gds-jaxb-xjc-jar:jar:2.1.7 compile), gds.ant.osgi:gds-ant-osgi-jar:jar:1.6.5 (compile), gds.groovy.osgi:gd -groovy-osgi-jar:jar:1.5.6 (compile), gds.xmlbeans:gds-xmlbeans-jar:jar:2.3.0 ( ompile), gds.hibernate.osgi:gds-hibernate-osgi-jar:jar:3.2.2 (compile), gds.dro ls.core:gds-drools-core-jar:jar:5.1.1 (compile), gds.saxon.osgi:gds-saxon-osgi- ar:jar:8.9.0.4 (compile), gds.drools.core.M1:gds-drools-core-M1-jar:jar:5.2.0 ( ompile), gds.drools.compiler.M1:gds-drools-compiler-M1-jar:jar:5.2.0 (compile), gds.jaxb.xjc.osgi:gds-jaxb-xjc-osgi-jar:jar:2.1.9 (compile), gds.drools.compile :gds-drools-compiler-jar:jar:5.1.1 (compile), gds.jaxb.impl.osgi:gds-jaxb-impl- sgi-jar:jar:2.1.9 (compile), gds.jaxb.impl:gds-jaxb-impl-jar:jar:2.1.7 (compile , gds.js:gds-js-jar:jar:1.6R7 (compile), gds.spring.security.core:gds-spring-se urity-core-jar:jar:2.0.4 (compile), gds.jbpm.jpdl.osgi:gds-jbpm-jpdl-osgi-jar:j r:3.2.2 (compile), gds.hsqldb:gds-hsqldb-jar:jar:1.8.0.7 (compile), gds.abdera. 18n.incubating:gds-abdera-i18n-incubating-jar:jar:0.4.0 (compile), gds.acegi.se urity.osgi:gds-acegi-security-osgi-jar:jar:1.0.7 (compile), gds.jbossts.jta.pat hed:gds-jbossts-jta-patched-jar:jar:4.2.3 (compile), gds.javassist.osgi:gds-jav ssist-osgi-jar:jar:3.6 (compile), gds.wstx.asl:gds-wstx-asl-jar:jar:3.2.4 (comp le), gds.velocity.dep:gds-velocity-dep-jar:jar:1.4 (compile), gds.jetty:gds-jet y-jar:jar:6.1.11 (compile), gds.antlr:gds-antlr-jar:jar:2.7.7 (compile), gds.an lr.osgi:gds-antlr-osgi-jar:jar:2.7.7 (compile), gds.asm.osgi:gds-asm-osgi-jar:j r:3.1 (compile), gds.axiom.api:gds-axiom-api-jar:jar:1.2.7 (compile), gds.axiom impl:gds-axiom-impl-jar:jar:1.2.7 (compile), gds.xmlunit:gds-xmlunit-jar:jar:1. (compile), gds.commons.codec:gds-commons-codec-jar:jar:1.3 (compile), gds.jaxe :gds-jaxen-jar:jar:1.1 (compile), gds.xmlsec:gds-xmlsec-jar:jar:1.4.0 (compile) gds.mail.osgi:gds-mail-osgi-jar:jar:1.4 (compile), gds.jaxen.osgi:gds-jaxen-os i-jar:jar:1.1.1 (compile), gds.wss4j:gds-wss4j-jar:jar:1.5.4 (compile), gds.wss j.osgi:gds-wss4j-osgi-jar:jar:1.5.4 (compile), gds.saaj.impl:gds-saaj-impl-jar: ar:1.3 (compile), gds.saaj.impl.osgi:gds-saaj-impl-osgi-jar:jar:1.3 (compile), ds.jetty.util:gds-jetty-util-jar:jar:6.1.11 (compile), gds.jsr250.api:gds-jsr25 -api-jar:jar:1.0 (compile), gds.jra.alpha-4:gds-jra-alpha-4-jar:jar:1.0 (compil ), gds.jcr.osgi:gds-jcr-osgi-jar:jar:1.0 (compile), gds.jaxb.api:gds-jaxb-api-j r:jar:2.1 (compile), gds.jaxb.api.osgi:gds-jaxb-api-osgi-jar:jar:2.1 (compile), gds.jdom.osgi:gds-jdom-osgi-jar:jar:1.0 (compile), gds.jettison:gds-jettison-ja :jar:1.0.1 (compile), gds.opensaml:gds-opensaml-jar:jar:1.1 (compile), gds.saaj api:gds-saaj-api-jar:jar:1.3 (compile), gds.smack.osgi:gds-smack-osgi-jar:jar:2 2.1 (compile), gds.saaj.api.osgi:gds-saaj-api-osgi-jar:jar:1.3 (compile), gds.s f.api:gds-slf-api-jar:jar:1.5.6 (compile), gds.wsdl4j:gds-wsdl4j-jar:jar:1.6.2 compile), gds.wsdl4j.osgi:gds-wsdl4j-osgi-jar:jar:1.6.1 (compile), gds.xmlsec.o gi:gds-xmlsec-osgi-jar:jar:1.4.0 (compile), gds.aspectjrt:gds-aspectjrt-jar:jar 1.5.4 (compile), junit:junit:jar:3.8.2 (test), org.mule:mule-core:jar:tests:2.2 1 (test)] at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve( efaultProjectDependenciesResolver.java:139) at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getD pendencies(LifecycleDependencyResolver.java:171) ... 22 more Caused by:
Re: Problem in delpoying an external jar to the local repo
After running the mvn install: install command I could successfully deploy my jars onto the local repo. And infact I added around 100 jars to my local repo yesterday and when running mvn package command, the compiler could pick up the jars which I deployed. But today morning when I came and tried mvn package, I got the following error : ERROR] Failed to execute goal on project GDS-Switch: Could not resolve dependen cies for project org.mule.examples:GDS-Switch:war:1.0-SNAPSHOT: Failed to collec t dependencies for [org.mule:mule-core:jar:2.2.1 (compile), org.mule.modules:mul e-module-spring-config:jar:2.2.1 (compile), org.mule.modules:mule-module-spring- extras:jar:2.2.1 (compile), org.mule.transports:mule-transport-stdio:jar:2.2.1 ( compile), org.mule.transports:mule-transport-http:jar:2.2.1 (compile), org.mule. transports:mule-transport-vm:jar:2.2.1 (compile), org.opentravel.ota:ota-jaxb-ja r:jar:1.0 (compile), org.ota:ota-jibx-jar:jar:1.0 (compile), org.mysql:ota-sql-j ar:jar:1.0 (compile), org.neethi:ota-neethi-jar:jar:2.0.4 (compile), gds.quartz: gds-quartz-jar:jar:1.6.0 (compile), gds.ant:gds-ant-jar:jar:1.6.5 (compile), gds .bsh:gds-bsh-jar:jar:2.4 (compile), gds.cxf:gds-cxf-jar:jar:2.1.2 (compile), gds .joda:gds-joda-jar:jar:1.6 (compile), gds.oro:gds-oro-jar:jar:2.0.8 (compile), g ds.ognl:gds-ognl-jar:jar:2.7.3 (compile), gds.jdom:gds-jdom-jar:jar:1.0 (compile ), gds.dom4j:gds-dom4j-jar:jar:1.6.1 (compile), gds.jibx:gds-jibx-jar:jar:1.2.2 (compile), gds.velocity:gds-velocity-jar:jar:1.4 (compile), gds.axis:gds-axis-ja r:jar:1.4 (compile), gds.cxf.api:gds-cxf-api-jar:jar:2.1.2 (compile), gds.drools .ant:gds-drools-ant-jar:jar:5.1.1 (compile), gds.ota.messaging:gds-ota-messaging -jar:jar:1.7.8 (compile), gds.jaxb.xjc:gds-jaxb-xjc-jar:jar:2.1.7 (compile), gds .ant.osgi:gds-ant-osgi-jar:jar:1.6.5 (compile), gds.groovy.osgi:gds-groovy-osgi- jar:jar:1.5.6 (compile), gds.xmlbeans:gds-xmlbeans-jar:jar:2.3.0 (compile), gds. hibernate.osgi:gds-hibernate-osgi-jar:jar:3.2.2 (compile), gds.drools.core:gds-d rools-core-jar:jar:5.1.1 (compile), gds.saxon.osgi:gds-saxon-osgi-jar:jar:8.9.0. 4 (compile), gds.drools.core.M1:gds-drools-core-M1-jar:jar:5.2.0 (compile), gds. drools.compiler.M1:gds-drools-compiler-M1-jar:jar:5.2.0 (compile), gds.jaxb.xjc. osgi:gds-jaxb-xjc-osgi-jar:jar:2.1.9 (compile), gds.drools.compiler:gds-drools-c ompiler-jar:jar:5.1.1 (compile), gds.jaxb.impl.osgi:gds-jaxb-impl-osgi-jar:jar:2 .1.9 (compile), gds.jaxb.impl:gds-jaxb-impl-jar:jar:2.1.7 (compile), gds.js:gds- js-jar:jar:1.6R7 (compile), gds.spring.security.core:gds-spring-security-core-ja r:jar:2.0.4 (compile), gds.jbpm.jpdl.osgi:gds-jbpm-jpdl-osgi-jar:jar:3.2.2 (comp ile), gds.hsqldb:gds-hsqldb-jar:jar:1.8.0.7 (compile), gds.abdera.i18n.incubatin g:gds-abdera-i18n-incubating-jar:jar:0.4.0 (compile), gds.acegi.security.osgi:gd s-acegi-security-osgi-jar:jar:1.0.7 (compile), gds.jbossts.jta.patched:gds-jboss ts-jta-patched-jar:jar:4.2.3 (compile), gds.javassist.osgi:gds-javassist-osgi-ja r:jar:3.6 (compile), gds.wstx.asl:gds-wstx-asl-jar:jar:3.2.4 (compile), gds.velo city.dep:gds-velocity-dep-jar:jar:1.4 (compile), gds.jetty:gds-jetty-jar:jar:6.1 .11 (compile), gds.antlr:gds-antlr-jar:jar:2.7.7 (compile), gds.antlr.osgi:gds-a ntlr-osgi-jar:jar:2.7.7 (compile), gds.asm.osgi:gds-asm-osgi-jar:jar:3.1 (compil e), gds.axiom.api:gds-axiom-api-jar:jar:1.2.7 (compile), gds.axiom.impl:gds-axio m-impl-jar:jar:1.2.7 (compile), gds.xmlunit:gds-xmlunit-jar:jar:1.1 (compile), g ds.commons.codec:gds-commons-codec-jar:jar:1.3 (compile), gds.jaxen:gds-jaxen-ja r:jar:1.1 (compile), gds.xmlsec:gds-xmlsec-jar:jar:1.4.0 (compile), gds.mail.osg i:gds-mail-osgi-jar:jar:1.4 (compile), gds.jaxen.osgi:gds-jaxen-osgi-jar:jar:1.1 .1 (compile), gds.wss4j:gds-wss4j-jar:jar:1.5.4 (compile), gds.wss4j.osgi:gds-ws s4j-osgi-jar:jar:1.5.4 (compile), gds.saaj.impl:gds-saaj-impl-jar:jar:1.3 (compi le), gds.saaj.impl.osgi:gds-saaj-impl-osgi-jar:jar:1.3 (compile), gds.jetty.util :gds-jetty-util-jar:jar:6.1.11 (compile), gds.jsr250.api:gds-jsr250-api-jar:jar: 1.0 (compile), gds.jra.alpha-4:gds-jra-alpha-4-jar:jar:1.0 (compile), gds.jcr.os gi:gds-jcr-osgi-jar:jar:1.0 (compile), gds.jaxb.api:gds-jaxb-api-jar:jar:2.1 (co mpile), gds.jaxb.api.osgi:gds-jaxb-api-osgi-jar:jar:2.1 (compile), gds.jdom.osgi :gds-jdom-osgi-jar:jar:1.0 (compile), gds.jettison:gds-jettison-jar:jar:1.0.1 (c ompile), gds.opensaml:gds-opensaml-jar:jar:1.1 (compile), gds.saaj.api:gds-saaj- api-jar:jar:1.3 (compile), gds.smack.osgi:gds-smack-osgi-jar:jar:2.2.1 (compile) , gds.saaj.api.osgi:gds-saaj-api-osgi-jar:jar:1.3 (compile), gds.slf.api:gds-slf -api-jar:jar:1.5.6 (compile), gds.wsdl4j:gds-wsdl4j-jar:jar:1.6.2 (compile), gds .wsdl4j.osgi:gds-wsdl4j-osgi-jar:jar:1.6.1 (compile), gds.xmlsec.osgi:gds-xmlsec -osgi-jar:jar:1.4.0 (compile), gds.aspectjrt:gds-aspectjrt-jar:jar:1.5.4 (compil e), junit:junit:jar:3.8.2 (test),
Re: maven 3 provided dependency pulls a compile dependency
I think that the compile scope commons-collections dependency is coming from somewhere else. (Mainly because I don't think that this type of bug wouldn't have been found already.) What I would do is trying to recreate this in a small test case. If you can do that, it will be easy for someone else to reproduce and you can file a ticket attaching this case. If you cannot recreate, it's something in your project(s) that's wrong. That would at least rule out the bug possibility, but wouldn't solve your main problem. I'm not sure if m2e uses the same logic for showing the dependency tree, or if it uses aether directly. If it uses Aether, it could be a good tool to see where commons-collections is coming from. I would try this regardless as it's my main tool for investigating these types of dependency tree things. /Anders On Tue, May 24, 2011 at 10:47, Yann Albou yann-em...@club-internet.frwrote: maven 3.0.3 I have a parent company pom that defines a dependency as provided. This provided dependency has a number of dependencies itself, among which commons-collections:commons-collections. My understanding is that all dependencies on which the provided dependency depends on should also be provided. But that's not what's happening in my case. What I end up with is commons-collections:commons-collections being pulled as compile instead of provided in a ear project (I'm running mvn clean install -X to check the dependencies). Have tried to defined the provided dependency directly in the ear project itself instead of the company pom, but no luck either. I see the provided dependency twice. One time with all its dependencies as provided and another time the provided dependency with only commons-collections:commons-collections as compile dependency. I have also seen in another project that the -X didn't show the correct list of dependencies. Instead I had to search through the poms to find out which one was pulling a compile dependency that should have been provided instead. Anybody an idea? -- View this message in context: http://maven.40175.n5.nabble.com/maven-3-provided-dependency-pulls-a-compile-dependency-tp4421451p4421451.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
Maven is not able to pick up the jars from the local repo
Hi, In my system, when I run the mvn package command, maven is not able to pick up the jars from the local repo i.e C:\Documents and Settings\udayshankar.k\.m2\repository. Though the jar is present in the local repo, it gives error : [ERROR] Failed to execute goal on project GDS-Switch: Could not resolve dependen cies for project org.mule.examples:GDS-Switch:war:1.0-SNAPSHOT: Failed to collec t dependencies for [org.mule:mule-core:jar:2.2.1 (compile), org.mule.modules:mul e-module-spring-config:jar:2.2.1 (compile), org.mule.modules:mule-module-spring- extras:jar:2.2.1 (compile), org.mule.transports:mule-transport-stdio:jar:2.2.1 ( compile), org.mule.transports:mule-transport-http:jar:2.2.1 (compile), org.mule. transports:mule-transport-vm:jar:2.2.1 (compile), junit:junit:jar:3.8.2 (test), org.mule:mule-core:jar:tests:2.2.1 (test)]: Failed to read artifact descriptor f or org.safehaus.jug:jug:jar:asl:2.0.0-osgi: Could not transfer artifact org.safe haus.jug:jug:pom:2.0.0-osgi from/to jboss (http://repository.jboss.com/maven2): Access denied to: http://repository.jboss.com/maven2/org/safehaus/jug/jug/2.0.0- osgi/jug-2.0.0-osgi.pom - [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso lutionException NOTE : Till yesterday it was workin fine, i.e when I ran the mvn package command, maven was able to contact the local repo and it was able to pick up the jars from there. Please help on this. What could be the possible reason for this error? I have not made any changes in the pom.xml, I even checked the artifactid , groupid for changes but there were none -- View this message in context: http://maven.40175.n5.nabble.com/Maven-is-not-able-to-pick-up-the-jars-from-the-local-repo-tp4421732p4421732.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
maven 3.0.3
Hi to all, I am working with maven 3.0.3, windows 7. I need to install plugin's maven, any idea? Thanks, Yos
Re: maven 3.0.3
Your request doesn't make any sense to me. Could you please describe what you want to accomplish? With regards, Nick Stolwijk ~Senior Java Developer~ iPROFS Wagenweg 208 2012 NM Haarlem T +31 23 547 6369 F +31 23 547 6370 I www.iprofs.nl On Tue, May 24, 2011 at 1:42 PM, Brosh, Yossi yossi.br...@sap.com wrote: Hi to all, I am working with maven 3.0.3, windows 7. I need to install plugin's maven, any idea? Thanks, Yos - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: maven 3.0.3
I need to install : maven-deploy-plugin , in order to run maven deploy Best regards, Yossi -Original Message- From: Nick Stolwijk [mailto:nick.stolw...@gmail.com] Sent: Tuesday, May 24, 2011 2:59 PM To: Maven Users List Subject: Re: maven 3.0.3 Your request doesn't make any sense to me. Could you please describe what you want to accomplish? With regards, Nick Stolwijk ~Senior Java Developer~ iPROFS Wagenweg 208 2012 NM Haarlem T +31 23 547 6369 F +31 23 547 6370 I www.iprofs.nl On Tue, May 24, 2011 at 1:42 PM, Brosh, Yossi yossi.br...@sap.com wrote: Hi to all, I am working with maven 3.0.3, windows 7. I need to install plugin's maven, any idea? Thanks, Yos - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven 3.0.3
Maven will get its plugins and dependencies from the configured repositories. The default repository is central. You'll need an internet connection to let Maven retrieve the plugins from there. If you use a proxy, you need to configure Maven to use that too. This can be done in ~/.m2/settings.xml for your own user or globally on your PC in MAVEN_HOME/conf/settings.xml. I would suggest you start with the documentation and the various books[2], especially [3] [1] http://maven.apache.org/users/index.html [2] http://maven.apache.org/articles.html [3] http://www.sonatype.com/books/maven-book/ Hth, Nick Stolwijk ~Senior Java Developer~ iPROFS Wagenweg 208 2012 NM Haarlem T +31 23 547 6369 F +31 23 547 6370 I www.iprofs.nl On Tue, May 24, 2011 at 2:23 PM, Brosh, Yossi yossi.br...@sap.com wrote: I need to install : maven-deploy-plugin , in order to run maven deploy Best regards, Yossi -Original Message- From: Nick Stolwijk [mailto:nick.stolw...@gmail.com] Sent: Tuesday, May 24, 2011 2:59 PM To: Maven Users List Subject: Re: maven 3.0.3 Your request doesn't make any sense to me. Could you please describe what you want to accomplish? With regards, Nick Stolwijk ~Senior Java Developer~ iPROFS Wagenweg 208 2012 NM Haarlem T +31 23 547 6369 F +31 23 547 6370 I www.iprofs.nl On Tue, May 24, 2011 at 1:42 PM, Brosh, Yossi yossi.br...@sap.com wrote: Hi to all, I am working with maven 3.0.3, windows 7. I need to install plugin's maven, any idea? Thanks, Yos - 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
How to compile twice
Hello to the Maven users. I am trying to generate two artefacts, each containing two different flavours of generated classes. I am able to generate the classes under two different folders: target\generated-sources-jacorb target\generated-sources-sunorb Now I would like to compile these two folders separately in the same build, and include them in two different artefacts. I am using the following configuration, with two executions plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId executions execution idcompile-with-jacorb/id goals goalcompile/goal /goals configuration outputDirectory${project.build.directory}/classes-jacorb/outputDirectory excludes exclude**/generated-sources-sunorb/*/exclude /excludes /configuration /execution execution idcompile-with-sunorb/id goals goalcompile/goal /goals configuration outputDirectory${project.build.directory}/classes-sunorb/outputDirectory excludes exclude**/generated-sources-jacorb/*/exclude /excludes /configuration /execution /executions /plugin however the compilation fails with the error [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project test-attach-artifact: Compilation failure: Compilation failure: [ERROR] \dev\Projects\test-attach-artifact\target\generated-sources-jacorb\idl\uk\co\igindex\corba\service\V3_0\NoDataHelper.java:[11,13] duplicate class: uk.co.igindex.corba.service.V3_0.NoDataHelper .. I.e. both generated source folders are included during compilation. I can see this in the maven output: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile' with basic configurator -- [DEBUG] (f) basedir = C:\dev\Projects\test-attach-artifact [DEBUG] (f) buildDirectory = C:\dev\Projects\test-attach-artifact\target [DEBUG] (f) classpathElements = [C:\dev\Projects\test-attach-artifact\target\classes] [DEBUG] (f) compileSourceRoots = [C:\dev\Projects\test-attach-artifact\src\main\java, C:\dev\Projects\test-attach-artifact\target\generated-sources-jacorb\idl, C:\dev\Projects\test-attach-artifact\target\generated-sources-sunorb\idl] .. However, looking at the first part of the output (before the above excerpt), it looks the configuration is picked up [DEBUG] Goal: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (compile-with-jacorb) [DEBUG] Style: Regular [DEBUG] Configuration: ?xml version=1.0 encoding=UTF-8? configuration basedir default-value=${basedir}/ buildDirectory default-value=${project.build.directory}/ classpathElements default-value=${project.compileClasspathElements}/ compileSourceRoots default-value=${project.compileSourceRoots}/ compilerId default-value=javac${maven.compiler.compilerId}/compilerId compilerVersion${maven.compiler.compilerVersion}/compilerVersion debug default-value=true${maven.compiler.debug}/debug debuglevel${maven.compiler.debuglevel}/debuglevel encoding default-value=${project.build.sourceEncoding}${encoding}/encoding excludes exclude**/generated-sources-sunorb/*/exclude /excludes . and [DEBUG] Goal: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (compile-with-sunorb) [DEBUG] Style: Regular [DEBUG] Configuration: ?xml version=1.0 encoding=UTF-8? configuration basedir default-value=${basedir}/ buildDirectory default-value=${project.build.directory}/ classpathElements default-value=${project.compileClasspathElements}/ compileSourceRoots default-value=${project.compileSourceRoots}/ compilerId
Re: How to compile twice
On 24 May 2011 15:35, Claves Do Amaral claves.doama...@iggroup.com wrote: Hello to the Maven users. I am trying to generate two artefacts, each containing two different flavours of generated classes. I am able to generate the classes under two different folders: target\generated-sources-jacorb target\generated-sources-sunorb Now I would like to compile these two folders separately in the same build, and include them in two different artefacts. One pom - one artifact to create two artifacts, use a multi-module project. Anything else is a hack that will end in tears... and it's far far far quicker to just do it the right way... if you don't like the right way might I suggest ANT or any other number of procedural build tools that you can bend to your will and then 3 years later when you come back to the project you can spend five weeks tearing out your hair trying to figure out what exactly you did and why ;-) I am using the following configuration, with two executions plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId executions execution idcompile-with-jacorb/id goals goalcompile/goal /goals configuration outputDirectory${project.build.directory}/classes-jacorb/outputDirectory excludes exclude**/generated-sources-sunorb/*/exclude /excludes /configuration /execution execution idcompile-with-sunorb/id goals goalcompile/goal /goals configuration outputDirectory${project.build.directory}/classes-sunorb/outputDirectory excludes exclude**/generated-sources-jacorb/*/exclude /excludes /configuration /execution /executions /plugin however the compilation fails with the error [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project test-attach-artifact: Compilation failure: Compilation failure: [ERROR] \dev\Projects\test-attach-artifact\target\generated-sources-jacorb\idl\uk\co\igindex\corba\service\V3_0\NoDataHelper.java:[11,13] duplicate class: uk.co.igindex.corba.service.V3_0.NoDataHelper .. I.e. both generated source folders are included during compilation. I can see this in the maven output: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile' with basic configurator -- [DEBUG] (f) basedir = C:\dev\Projects\test-attach-artifact [DEBUG] (f) buildDirectory = C:\dev\Projects\test-attach-artifact\target [DEBUG] (f) classpathElements = [C:\dev\Projects\test-attach-artifact\target\classes] [DEBUG] (f) compileSourceRoots = [C:\dev\Projects\test-attach-artifact\src\main\java, C:\dev\Projects\test-attach-artifact\target\generated-sources-jacorb\idl, C:\dev\Projects\test-attach-artifact\target\generated-sources-sunorb\idl] .. However, looking at the first part of the output (before the above excerpt), it looks the configuration is picked up [DEBUG] Goal: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (compile-with-jacorb) [DEBUG] Style: Regular [DEBUG] Configuration: ?xml version=1.0 encoding=UTF-8? configuration basedir default-value=${basedir}/ buildDirectory default-value=${project.build.directory}/ classpathElements default-value=${project.compileClasspathElements}/ compileSourceRoots default-value=${project.compileSourceRoots}/ compilerId default-value=javac${maven.compiler.compilerId}/compilerId compilerVersion${maven.compiler.compilerVersion}/compilerVersion debug default-value=true${maven.compiler.debug}/debug debuglevel${maven.compiler.debuglevel}/debuglevel encoding
RE: How to compile twice
-Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] One pom - one artefact to create two artifacts, use a multi-module project. Thanks for your answer. I understand, but let me explain what I am trying to do, ultimately. I already have a project that builds two different flavours of an artefact using profiles and classifiers.Invoking mvn clean deploy -P jacorb builds an artefact like myArtefact-1.0-SNAPSHOT-jacorb.jar Invoking mvn clean deploy -P sunorb builds an artefact like myArtefact-1.0-SNAPSHOT-sunorb.jar The problem comes trying to a release: mvn release:prepare release:perform This generates and releases only one jar, the default one (jacorb), and I would like to attach a second jar (sunorb) to the release. In order to do this, If I am not wrong, I need to have both artefact in my target folder and use the Build Helper Maven Plugin to attach the additional artefact. But in order to have both artefact, I need to compile/package twice in the same build. If I am wrong, please direct me to a resource where I can learn the correct procedure for doing this. Cheers, Claves The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to compile twice
Multi-module build you will have a root project which aggregates the whole thing you will have a common module for all the code that is common and is depended on by the generated code (this is optional if there is no such code) you will have a module for the first set of generated code you will have a module for the second set of generated code Classifiers is _exactly_ the ***wrong*** way to try and solve this Profiles is _exactly_ the ***wrong*** way to try and solve this. If you don't like the Maven way, don't use Maven On 24 May 2011 15:58, Claves Do Amaral claves.doama...@iggroup.com wrote: -Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] One pom - one artefact to create two artifacts, use a multi-module project. Thanks for your answer. I understand, but let me explain what I am trying to do, ultimately. I already have a project that builds two different flavours of an artefact using profiles and classifiers.Invoking mvn clean deploy -P jacorb builds an artefact like myArtefact-1.0-SNAPSHOT-jacorb.jar Invoking mvn clean deploy -P sunorb builds an artefact like myArtefact-1.0-SNAPSHOT-sunorb.jar The problem comes trying to a release: mvn release:prepare release:perform This generates and releases only one jar, the default one (jacorb), and I would like to attach a second jar (sunorb) to the release. In order to do this, If I am not wrong, I need to have both artefact in my target folder and use the Build Helper Maven Plugin to attach the additional artefact. But in order to have both artefact, I need to compile/package twice in the same build. If I am wrong, please direct me to a resource where I can learn the correct procedure for doing this. Cheers, Claves The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059. - 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 compile twice
-Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] Classifiers is _exactly_ the ***wrong*** way to try and solve this Profiles is _exactly_ the ***wrong*** way to try and solve this. If you don't like the Maven way, don't use Maven I like Maven, I love it!!! But we decided to move to profiles/classifiers since this was a sensible thing to do, according to the book Maven:The definitive guide, O'Reilly. You can find an e-copy also on the Sonatype web site. The point is that we had multi-module projects earlier and we were not very happy with those since they were creating different artifacts for each ORB. We wanted to have only one artefact with many classifiers. To tidy up our repository and also to allow other teams to use our Corba connectors easily: dependency artifactIdcorba-client/artifactId classifierjacorb/classifier /dependency Anyway, I will think about it. Thank you very much for your answers. Claves The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Local repo or central repo
Hi, Where does maven pick the jars from (first) local repo or central repo? Regards, Uday -- View this message in context: http://maven.40175.n5.nabble.com/Local-repo-or-central-repo-tp4422295p4422295.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: How to compile twice
We'd handle this in our CI system by running two jobs in parallel coupled to different tooling. Curt Yanko | Continuous Integration Services | UnitedHealth Group IT Making IT Happen, one build at a time, 600 times a day -Original Message- From: Claves Do Amaral [mailto:claves.doama...@iggroup.com] Sent: Tuesday, May 24, 2011 10:35 AM To: Maven Users List Subject: How to compile twice Hello to the Maven users. I am trying to generate two artefacts, each containing two different flavours of generated classes. I am able to generate the classes under two different folders: target\generated-sources-jacorb target\generated-sources-sunorb Now I would like to compile these two folders separately in the same build, and include them in two different artefacts. I am using the following configuration, with two executions plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId executions execution idcompile-with-jacorb/id goals goalcompile/goal /goals configuration outputDirectory${project.build.directory}/classes-jacorb/ou tputDirectory excludes exclude**/generated-sources-sunorb/*/exclude /excludes /configuration /execution execution idcompile-with-sunorb/id goals goalcompile/goal /goals configuration outputDirectory${project.build.directory}/classes-sunorb/ou tputDirectory excludes exclude**/generated-sources-jacorb/*/exclude /excludes /configuration /execution /executions /plugin however the compilation fails with the error [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project test-attach-artifact: Compilation failure: Compilation failure: [ERROR] \dev\Projects\test-attach-artifact\target\generated-sources-ja corb\idl\uk\co\igindex\corba\service\V3_0\NoDataHelper.java:[1 1,13] duplicate class: uk.co.igindex.corba.service.V3_0.NoDataHelper .. I.e. both generated source folders are included during compilation. I can see this in the maven output: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile' with basic configurator -- [DEBUG] (f) basedir = C:\dev\Projects\test-attach-artifact [DEBUG] (f) buildDirectory = C:\dev\Projects\test-attach-artifact\target [DEBUG] (f) classpathElements = [C:\dev\Projects\test-attach-artifact\target\classes] [DEBUG] (f) compileSourceRoots = [C:\dev\Projects\test-attach-artifact\src\main\java, C:\dev\Projects\test-attach-artifact\target\generated-sources- jacorb\idl, C:\dev\Projects\test-attach-artifact\target\generated-sources- sunorb\idl] .. However, looking at the first part of the output (before the above excerpt), it looks the configuration is picked up [DEBUG] Goal: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (compile-with-jacorb) [DEBUG] Style: Regular [DEBUG] Configuration: ?xml version=1.0 encoding=UTF-8? configuration basedir default-value=${basedir}/ buildDirectory default-value=${project.build.directory}/ classpathElements default-value=${project.compileClasspathElements}/ compileSourceRoots default-value=${project.compileSourceRoots}/ compilerId default-value=javac${maven.compiler.compilerId}/compilerId compilerVersion${maven.compiler.compilerVersion}/compilerVersion debug default-value=true${maven.compiler.debug}/debug debuglevel${maven.compiler.debuglevel}/debuglevel encoding default-value=${project.build.sourceEncoding}${encoding}/encoding
RE: How to compile twice
Another item on my list of why the Release Plugin is evil. Curt Yanko | Continuous Integration Services | UnitedHealth Group IT Making IT Happen, one build at a time, 600 times a day -Original Message- From: Claves Do Amaral [mailto:claves.doama...@iggroup.com] Sent: Tuesday, May 24, 2011 10:59 AM To: Maven Users List Subject: RE: How to compile twice -Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] One pom - one artefact to create two artifacts, use a multi-module project. Thanks for your answer. I understand, but let me explain what I am trying to do, ultimately. I already have a project that builds two different flavours of an artefact using profiles and classifiers.Invoking mvn clean deploy -P jacorb builds an artefact like myArtefact-1.0-SNAPSHOT-jacorb.jar Invoking mvn clean deploy -P sunorb builds an artefact like myArtefact-1.0-SNAPSHOT-sunorb.jar The problem comes trying to a release: mvn release:prepare release:perform This generates and releases only one jar, the default one (jacorb), and I would like to attach a second jar (sunorb) to the release. In order to do this, If I am not wrong, I need to have both artefact in my target folder and use the Build Helper Maven Plugin to attach the additional artefact. But in order to have both artefact, I need to compile/package twice in the same build. If I am wrong, please direct me to a resource where I can learn the correct procedure for doing this. Cheers, Claves The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to compile twice
On Tue, May 24, 2011 at 10:35 AM, Claves Do Amaral claves.doama...@iggroup.com wrote: however the compilation fails with the error [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project test-attach-artifact: Compilation failure: Compilation failure: [ERROR] \dev\Projects\test-attach-artifact\target\generated-sources-jacorb\idl\uk\co\igindex\corba\service\V3_0\NoDataHelper.java:[11,13] duplicate class: uk.co.igindex.corba.service.V3_0.NoDataHelper How are you generating the sources? This output indicates that the * default-compile* execution is what is picking up the generated-sources-jacorb source code. Since I don't see anything in your configuration that has added this source directory to the default-compile execution I am not sure what you've got going on. Is it possible that you're inheriting from another pom somewhere that has added these source directories to the default-compile execution? Best, Laird
RE: How to compile twice
-Original Message- From: Laird Nelson [mailto:ljnel...@gmail.com] How are you generating the sources? This output indicates that the * Here is the configuration: plugin groupIduk.co.igindex.maven/groupId artifactIdmaven-idl-plugin/artifactId executions execution idgenerate-jacorb/id goals goalgenerate/goal /goals configuration compilerjacorb/compiler outputDirectory${project.build.directory}/generated-sources-jacorb/idl/outputDirectory timestampDirectory${project.build.directory}/jacorb-timestamp/timestampDirectory /configuration /execution execution idgenerate-sunorb/id goals goalgenerate/goal /goals configuration compileridlj/compiler outputDirectory${project.build.directory}/generated-sources-sunorb/idl/outputDirectory timestampDirectory${project.build.directory}/sunorb-timestamp/timestampDirectory /configuration /execution /executions /plugin The two executions of the IDL plugin generate the output folders with the generated sources for the two projects. You will notice that this is a custom IDL plugin. Is it possible that you're inheriting from another pom somewhere that has added these source directories to the default-compile execution? No, this is not the case. Claves The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.
RE: How to compile twice
use 2 asterisks for wildcard specifier this will exclude everything from uhg and ingenix folders iddefault-compile/id configuration excludes exclude**/uhg/*/exclude exclude**/ingenix/*/exclude /excludes /configuration Cheers, -Original Message- From: Claves Do Amaral [mailto:claves.doama...@iggroup.com] Sent: Tuesday, May 24, 2011 10:59 AM To: Maven Users List Subject: RE: How to compile twice -Original Message- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] One pom - one artefact to create two artifacts, use a multi-module project. Thanks for your answer. I understand, but let me explain what I am trying to do, ultimately. I already have a project that builds two different flavours of an artefact using profiles and classifiers.Invoking mvn clean deploy -P jacorb builds an artefact like myArtefact-1.0-SNAPSHOT-jacorb.jar Invoking mvn clean deploy -P sunorb builds an artefact like myArtefact-1.0-SNAPSHOT-sunorb.jar The problem comes trying to a release: mvn release:prepare release:perform This generates and releases only one jar, the default one (jacorb), and I would like to attach a second jar (sunorb) to the release. In order to do this, If I am not wrong, I need to have both artefact in my target folder and use the Build Helper Maven Plugin to attach the additional artefact. But in order to have both artefact, I need to compile/package twice in the same build. If I am wrong, please direct me to a resource where I can learn the correct procedure for doing this. Cheers, Claves The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to compile twice
On Tue, May 24, 2011 at 11:55 AM, Claves Do Amaral claves.doama...@iggroup.com wrote: The two executions of the IDL plugin generate the output folders with the generated sources for the two projects. You will notice that this is a custom IDL plugin. OK. Nothing suspicious there. I'm trying to figure out how the maven-compiler-plugin's default-compile execution knows about the two target/generated* directories. Perhaps someone else knows. Or maybe no one knows. Certainly the maven-compiler-plugin documentation is of no help here. You can of course just chalk this up to magic and exclude them, regardless of whatever mystical internals put them there in the first place: plugin artifactIdmaven-compiler-plugin/artifactId executions execution iddefault-compile/id /execution configuration excludes exclude${project.build.outputDirectory}/generated-sources-jacorb/**/exclude exclude${project.build.outputDirectory}/generated-sources-sunorb/**/exclude /excludes !-- ...add your existing executions here... -- /configuration /executions /plugin (Untested pom.xml code.) Best, Laird
RE: How to compile twice
-Original Message- From: Laird Nelson [mailto:ljnel...@gmail.com] You can of course just chalk this up to magic and exclude them, regardless of whatever mystical internals put them there in the first place: Thanks Laird, but I have already tried this: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId executions execution iddefault-compile/id configuration excludes exclude${project.build.directory}/generated-sources-jacorb/**/exclude exclude${project.build.directory}/generated-sources-sunorb/**/exclude /excludes /configuration /execution With no success. I have the duplicate class error, again. Now, I am investigating to understand why and how the sources folders are recorded into the compiler plugin. Thanks Claves The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.
Re: How to compile twice
On Tue, May 24, 2011 at 12:16 PM, Claves Do Amaral claves.doama...@iggroup.com wrote: Thanks Laird, but I have already tried this: Wow, that's truly baffling. I have a successful multi-artifact build running with inclusions and exclusions like this. Are you using Maven 3+? The output looks like it. Keep us updated; this is interesting. Best, Laird
Re: Repositories in settings.xml
On 24/05/2011 3:24 AM, Jérémy wrote: Hi Ron, thanks for your answer, How are builds repeatable in your case? Production builds are only allowed to only depend on releases. Releases are immutable. If we rebuild a released artifact it will contain exactly the same dependencies each time. The people looking after QA and support have a great deal of difficulty saying what was in a build if you use SNAPSHOTS. In the corporate pom, I try to change only plugins configuration for stuff that does not involve the jar (aka javadoc, attached-sources, etc...) Why is your corporate POM so unstable? We're still in migration process, we're moving away from a in-house build tool. Because of the amount of projects, the migration might take more than a year... so to ease the updates (because new requirements will come up all the time), I'd like to keep the parent-pom as SNAPSHOT. You might find it easier to use an application specific parent. You will need more but at least, you can stabilize each application as you get it Mavenized. Anders asked for a specific piece of information. The effective-pom shows the exact same piece of configuration I sent: repositories repository idpublic/id urlhttp://artifacts/content/groups/public/url releases enabledtrue/enabled /releases snapshots enabledfalse/enabled /snapshots /repository repository idallowed-snapshots/id urlhttp://artifacts/content/groups/allowed-snapshots//url snapshots enabledtrue/enabled /snapshots /repository /repositories So my question is, why does Maven fetch SNAPSHOTS from the first repository? Another interesting question is why are there SAPSHOTs in the first repository? One generally separates Releases from SNAPSHOTS I hope that all this helps move the problem forward. Ron Cheers, Jérémy Cheers, Jérémy On Mon, May 23, 2011 at 10:24 AM, Anders Hammarand...@hammar.net wrote: Check the effective pom to see what Maven is working on. This will show what repositories are enabled and how configured. mvn help:effective-pom -P theprofileyoursusing But, I seriously wonder why you would like to use a snapshot repo when doing a release. A release should never use snapshots. /Anders On Mon, May 23, 2011 at 10:15, Jérémymer...@gmail.com wrote: Hi, I noticed a weird behavior with the versions resolution of Maven 3.0.3. Here's my setup: I use Nexus and have a first repository group containing release and snapshots versions and a second repository group with only snapshots. When I want to release a product, I want to pick only the release versions of the first repository group and snapshots versions of the second repository group. In my settings.xml, I have a profile with the following configurations: repositories repository idpublic/id urlhttp://artifacts/content/groups/public/url releases enabledtrue/enabled /releases snapshots enabledfalse/enabled /snapshots /repository repository idallowed-snapshots/id urlhttp://artifacts/content/groups/allowed-snapshots//url snapshots enabledtrue/enabled /snapshots /repository /repositories With this configuration, Maven picks up snapshots from the public repository. However if I remove the second repository, the resolution works as attended. It seems that the enabled variable acts as a global variable across settings.xml. Is that a bug? Cheers, Jérémy - 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 compile twice
-Original Message- From: Laird Nelson [mailto:ljnel...@gmail.com] Wow, that's truly baffling. I have a successful multi-artifact build running with inclusions and exclusions like this. Are you using Maven 3+? Yes, Maven 3.0.2 The output looks like it. I will keep trying. I may have missed something Keep us updated; this is interesting. Sure Thank you again Claves The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.
Re: Local repo or central repo
local first, then it starts looking in configured repositories (from settings, pom, super-pom) On Tue, May 24, 2011 at 10:45 AM, uday shankar adonis.u...@gmail.com wrote: Hi, Where does maven pick the jars from (first) local repo or central repo? Regards, Uday -- View this message in context: http://maven.40175.n5.nabble.com/Local-repo-or-central-repo-tp4422295p4422295.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: Problem in delpoying an external jar to the local repo
First off, don't EVER post a full stack trace like that to this email list again unless you have been specifically requested to do so. Post it somewhere like pastebin.com and send a link here. The full stack trace is almost never necessary to debug an issue. Secondly, can you honestly not grok that stack trace to find the root cause? Here's a hint, look for the words repository.jboss.com in the massive text you sent and you'll find the problem. Wayne Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could no transfer artifact org.safehaus.jug:jug:pom:2.0.0-osgi from/to jboss (http://re ository.jboss.com/maven2): Access denied to: http://repository.jboss.com/maven2 org/safehaus/jug/jug/2.0.0-osgi/jug-2.0.0-osgi.pom .. Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not tr nsfer artifact org.safehaus.jug:jug:pom:2.0.0-osgi from/to jboss (http://reposi ory.jboss.com/maven2): Access denied to: http://repository.jboss.com/maven2/org safehaus/jug/jug/2.0.0-osgi/jug-2.0.0-osgi.pom - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven is not able to pick up the jars from the local repo
On Tue, May 24, 2011 at 5:59 AM, uday shankar adonis.u...@gmail.com wrote: Hi, In my system, when I run the mvn package command, maven is not able to pick up the jars from the local repo i.e C:\Documents and Settings\udayshankar.k\.m2\repository. Though the jar is present in the local repo, it gives error : You already asked this in another thread and I replied there. Please do not start another new thread to discuss the same issue, this is unnecessary and annoying. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem in delpoying an external jar to the local repo
They moved it almost a year ago already New one is at https://repository.jboss.org/nexus/ see http://relation.to/Bloggers/JBossMavenRepositoryChanges LieGrue, strub --- On Tue, 5/24/11, Wayne Fay wayne...@gmail.com wrote: From: Wayne Fay wayne...@gmail.com Subject: Re: Problem in delpoying an external jar to the local repo To: Maven Users List users@maven.apache.org Date: Tuesday, May 24, 2011, 4:58 PM First off, don't EVER post a full stack trace like that to this email list again unless you have been specifically requested to do so. Post it somewhere like pastebin.com and send a link here. The full stack trace is almost never necessary to debug an issue. Secondly, can you honestly not grok that stack trace to find the root cause? Here's a hint, look for the words repository.jboss.com in the massive text you sent and you'll find the problem. Wayne Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could no transfer artifact org.safehaus.jug:jug:pom:2.0.0-osgi from/to jboss (http://re ository.jboss.com/maven2): Access denied to: http://repository.jboss.com/maven2 org/safehaus/jug/jug/2.0.0-osgi/jug-2.0.0-osgi.pom .. Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not tr nsfer artifact org.safehaus.jug:jug:pom:2.0.0-osgi from/to jboss (http://reposi ory.jboss.com/maven2): Access denied to: http://repository.jboss.com/maven2/org safehaus/jug/jug/2.0.0-osgi/jug-2.0.0-osgi.pom - 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: Problem in delpoying an external jar to the local repo
Hi Wayne, Yeah I checked that(repository.jboss.com) out. It says access denied to the particular jar. So I found the jar in the onlilne maven repository and found the project coordinates of that jar from that repo and then I tried to run mvn package, so that it will pick the jar from that online repo. But it gave the same error.I also added the repository tag. Also, my doubt, when the jar is present in my local repository why is maven not picking it up from the local repo, why does it look into the online repo?Whaat is the reason for that? -- View this message in context: http://maven.40175.n5.nabble.com/Problem-in-delpoying-an-external-jar-to-the-local-repo-tp4410234p4422788.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
Looking version parser
Hi I am looking source existing source code and allows me to figure out if a particular version is in a a version range like boolean isInrange( String version, String range ); the range using maven/osgi format ie ( [1.0.0,2.0.0) ) Sorry about the noise Big thanks ahead -Dan - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem in delpoying an external jar to the local repo
particular jar. So I found the jar in the onlilne maven repository and found the project coordinates of that jar from that repo and then I tried to run mvn package, so that it will pick the jar from that online repo. But it gave the same error.I also added the repository tag. Look at the error again. It is not complaining about the jar file. It cannot find the pom file. Also, my doubt, when the jar is present in my local repository why is maven not picking it up from the local repo, why does it look into the online repo?Whaat is the reason for that? Most likely you only have the jar in your local repo -- you need the pom too. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[INFO] Wagon protocol '' doesn't support directory copying
I just updated some poms to current site plugin (for maven 2.2.1) and the error in the subject line now occurs. The relevant pom fragment looks like: site idrse.website/id urlscp://souvenir.basistech.net:/basis/trees/rse/docs/rse/1.8.100.2-SNAPSHOT/url /site - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: [INFO] Wagon protocol '' doesn't support directory copying
I'm guessing that you have run into this: http://jira.codehaus.org/browse/MSITE-585 On 2011-05-24 21:17, Benson Margulies wrote: I just updated some poms to current site plugin (for maven 2.2.1) and the error in the subject line now occurs. The relevant pom fragment looks like: site idrse.website/id urlscp://souvenir.basistech.net:/basis/trees/rse/docs/rse/1.8.100.2-SNAPSHOT/url /site - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Dennis Lundberg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Struggling with the changes plugin
In my POM, I have (to begin with): issueManagement systemJIRA/system urlhttp://jira.basistech.net:8080/browse/MAVEN/component/10784/url /issueManagement And then I have in pluginManagement: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-changes-plugin/artifactId version2.5/version configuration issueManagementSystems issueManagementSystemJIRA/issueManagementSystem /issueManagementSystems smtpHostmail.basistech.net/smtpHost smtpPort implementation=java.lang.Integer25/smtpPort toAddresses toAddress implementation=java.lang.Stringproductmergeno...@basistech.com/toAddress /toAddresses /configuration /plugin And then I have a reporting plugin as per the webpage. I get the following from mvn site:site, and I don't know how it came up with this URL. [INFO] Downloading from JIRA at: http://jira.basistech.net:8080/secure/IssueNavigator.jspa?view=rsspid=1statusIds=6resolutionIds=1sorter/field=createdsorter/order=DESCsorter/field=prioritysorter/order=DESCtempMax=100reset=truedecorator=none [WARNING] Downloading from JIRA failed. Received: [400] [WARNING] JIRA file /Users/benson/x/maven-support/basis-parent/trunk/target/jira-results.xml doesn't exist. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to compile twice
Please, don't fight Maven! All the issues your running into are because of this. And you will see other problems later on that you don't forsee right now. I strongly suggest that you follow Stephen's advice and move to a multi-module build. If you don't want many artifacts for your clients, you can solve that by creating an uber jar in each module. Regardless, the solution is not classifiers or profiles. It very rarely is. /Anders On Tue, May 24, 2011 at 18:35, Claves Do Amaral claves.doama...@iggroup.com wrote: -Original Message- From: Laird Nelson [mailto:ljnel...@gmail.com] Wow, that's truly baffling. I have a successful multi-artifact build running with inclusions and exclusions like this. Are you using Maven 3+? Yes, Maven 3.0.2 The output looks like it. I will keep trying. I may have missed something Keep us updated; this is interesting. Sure Thank you again Claves The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Group Holdings plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.