RE: How to optimize maven dependencies to get better performance?
Sorry, reply it too late. Brian, you're right, after move it out, works for me. Thanks! Regards Simon -Original Message- From: Brian Fox [mailto:bri...@infinity.nu] Sent: 2012年10月16日 19:30 To: Maven Users List Subject: Re: How to optimize maven dependencies to get better performance? The problem below is because your configuration is inside an execution, which when run from the command line like mvm enforcer:enforce won't be activated. Either bind this plugin to a phase as part of your build, or move the configuration element outside the executions block. On Thu, Oct 11, 2012 at 4:27 AM, Wang, Simon yunfeng.w...@ebay.com wrote: Hi, Barrie, Ask a stupid question about enforcer plugin. I added enforcer plugin into project pom like this: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-enforcer-plugin/artifactId version1.1.1/version executions execution idenforce/id configuration rules DependencyConvergence/ /rules /configuration goals goalenforce/goal /goals /execution /executions /plugin But it always complain missing parameter: rules. Below is debug log. Any mistakes in above code? ~~~ [DEBUG] Configuring mojo org.apache.maven.plugins:maven-enforcer-plugin:1.1.1:en force from plugin realm ClassRealm[pluginorg.apache.maven.plugins:maven-enforce r-plugin:1.1.1, parent: sun.misc.Launcher$AppClassLoader@233e233e] [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-enforcer-plugin:1.1.1:e nforce' with basic configurator -- [DEBUG] (s) fail = true [DEBUG] (s) failFast = false [DEBUG] (f) ignoreCache = false [DEBUG] (s) project = MavenProject: com.ebay.raptor.buyerexp.framework:CoreApp Framework:4.1.1-W41-SNAPSHOT @ C:\gitrepo\search_raptor\CoreAppFramework\pom.xml [DEBUG] (s) session = org.apache.maven.execution.MavenSession@3d153d15 [DEBUG] (s) skip = false [DEBUG] -- end configuration -- [INFO] -- -- [INFO] BUILD FAILURE [INFO] -- -- [INFO] Total time: 3.050s [INFO] Finished at: Thu Oct 11 15:49:28 CST 2012 [INFO] Final Memory: 17M/45M [INFO] -- -- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1. 1.1:enforce (default-cli) on project CoreAppFramework: The parameters 'rules' fo r goal org.apache.maven.plugins:maven-enforcer-plugin:1.1.1:enforce are missing or invalid - [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o rg.apache.maven.plugins:maven-enforcer-plugin:1.1.1:enforce (default-cli) on pro ject CoreAppFramework: The parameters 'rules' for goal org.apache.maven.plugins: maven-enforcer-plugin:1.1.1:enforce are missing or invalid at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:221) Regards Simon -Original Message- From: Wang, Simon [mailto:yunfeng.w...@ebay.com] Sent: 2012年10月11日 13:41 To: Maven Users List Subject: RE: How to optimize maven dependencies to get better performance? Hi, Barrie, That's really helpful! Even I have local cache, it also takes about 2 mins to resolve dependencies. Also it seems maven still will talk with remote maven server even I have local cache. Yes, maybe it's caused by unspecified version numbers for dependencies. I'll try maven-enforcer-plugin. We're using nexus now, haven't tried MRM, I'll host it and compare it to nexus. And I saw aether(major in dependency resolving) will take longer time to resolve conflict dependencies. Is it also a point that need to be improved? Do you know is there any maven plugin to identify conflict dependencies? Regards Simon -Original Message- From: Barrie Treloar [mailto:baerr...@gmail.com] Sent: 2012年10月11日 11:48 To: Maven Users List Subject: Re: How to optimize maven dependencies to get better performance? On Thu, Oct 11, 2012 at 1:46 PM, Wang, Simon yunfeng.w...@ebay.com wrote: Hi, We're in trouble of terrible performance on resolve maven dependencies. I did some search about it. Basically below ways should be helpful: 1. optimize nexus server to improve
Re: Importing large project into Eclipse hangs on constant percent
2012/11/8 Wayne Fay wayne...@gmail.com My settings.xml does not exist. I do not know if i have deleted it by mistake. How do you know this? What directory (-ies) did you look in to find it? I searched my home directory in ubuntu /home/myusername also looked at /home/myusername/.m2 If you advise me to generate one settings.xml, which proxy should i use? Your network admin would tell you the proxy information to use. Ok. If it was there a while ago, did it have a default proxy host and port? No, there is no default proxy setting. Everyone's proxy would be different, it could not have a default. If so what is that, if not what hostname and port should i use, or how cani find a list of proxies? Are you using command-line Maven, m2e in Eclipse, or something else? I have m2e on eclipse. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Importing large project into Eclipse hangs on constant percent
Hello again, I found my settings.xml under /usr/local/apache-maven-3.0.4/conf this is the maven i see when run mvn --v its content is here: As you can see below its proxy setting are commented off proxies !-- proxy | Specification for one proxy, to be used in connecting to the network. | proxy idoptional/id activetrue/active protocolhttp/protocol usernameproxyuser/username passwordproxypass/password hostproxy.host.net/host port80/port nonProxyHostslocal.net|some.host.com/nonProxyHosts /proxy -- /proxies 2012/11/9 Merve Temizer mervet2...@gmail.com 2012/11/8 Wayne Fay wayne...@gmail.com My settings.xml does not exist. I do not know if i have deleted it by mistake. How do you know this? What directory (-ies) did you look in to find it? I searched my home directory in ubuntu /home/myusername also looked at /home/myusername/.m2 If you advise me to generate one settings.xml, which proxy should i use? Your network admin would tell you the proxy information to use. Ok. If it was there a while ago, did it have a default proxy host and port? No, there is no default proxy setting. Everyone's proxy would be different, it could not have a default. If so what is that, if not what hostname and port should i use, or how cani find a list of proxies? Are you using command-line Maven, m2e in Eclipse, or something else? I have m2e on eclipse. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Importing large project into Eclipse hangs on constant percent
Sorry i missed one point, m2e settings are important, not the command line mvn. 2012/11/9 Merve Temizer mervet2...@gmail.com Hello again, I found my settings.xml under /usr/local/apache-maven-3.0.4/conf this is the maven i see when run mvn --v its content is here: As you can see below its proxy setting are commented off proxies !-- proxy | Specification for one proxy, to be used in connecting to the network. | proxy idoptional/id activetrue/active protocolhttp/protocol usernameproxyuser/username passwordproxypass/password hostproxy.host.net/host port80/port nonProxyHostslocal.net|some.host.com/nonProxyHosts /proxy -- /proxies 2012/11/9 Merve Temizer mervet2...@gmail.com 2012/11/8 Wayne Fay wayne...@gmail.com My settings.xml does not exist. I do not know if i have deleted it by mistake. How do you know this? What directory (-ies) did you look in to find it? I searched my home directory in ubuntu /home/myusername also looked at /home/myusername/.m2 If you advise me to generate one settings.xml, which proxy should i use? Your network admin would tell you the proxy information to use. Ok. If it was there a while ago, did it have a default proxy host and port? No, there is no default proxy setting. Everyone's proxy would be different, it could not have a default. If so what is that, if not what hostname and port should i use, or how cani find a list of proxies? Are you using command-line Maven, m2e in Eclipse, or something else? I have m2e on eclipse. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Importing large project into Eclipse hangs on constant percent
Sorry for mail sequence, but in eclipse Window|Preferences|Maven|User Settings i see warning: User settings file doesn't exist. I do not know if it was so when i was able to import and build projects 2012/11/9 Merve Temizer mervet2...@gmail.com Sorry i missed one point, m2e settings are important, not the command line mvn. 2012/11/9 Merve Temizer mervet2...@gmail.com Hello again, I found my settings.xml under /usr/local/apache-maven-3.0.4/conf this is the maven i see when run mvn --v its content is here: As you can see below its proxy setting are commented off proxies !-- proxy | Specification for one proxy, to be used in connecting to the network. | proxy idoptional/id activetrue/active protocolhttp/protocol usernameproxyuser/username passwordproxypass/password hostproxy.host.net/host port80/port nonProxyHostslocal.net|some.host.com/nonProxyHosts /proxy -- /proxies 2012/11/9 Merve Temizer mervet2...@gmail.com 2012/11/8 Wayne Fay wayne...@gmail.com My settings.xml does not exist. I do not know if i have deleted it by mistake. How do you know this? What directory (-ies) did you look in to find it? I searched my home directory in ubuntu /home/myusername also looked at /home/myusername/.m2 If you advise me to generate one settings.xml, which proxy should i use? Your network admin would tell you the proxy information to use. Ok. If it was there a while ago, did it have a default proxy host and port? No, there is no default proxy setting. Everyone's proxy would be different, it could not have a default. If so what is that, if not what hostname and port should i use, or how cani find a list of proxies? Are you using command-line Maven, m2e in Eclipse, or something else? I have m2e on eclipse. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Checking out and building a project
Hello, I am told to get below for a snapshot. http://svn.apache.org/repos/asf/james/current/ I want to check out and build When i want to svn co and mvn clean compile ; I am getting error telling some module of pom.xml does not exist. I need only server project under james and also have tried checking out and mvn clean compiling : http://svn.apache.org/repos/asf/james/server/trunk/ It tells i do not have some projects too. Where am i wrong, as you can see i have misunderstanding about maven working principals. It would be appreciated if you can suggest something to solve misunderstandings, thanks.
Re: Checking out and building a project
I am told to get below for a snapshot. http://svn.apache.org/repos/asf/james/current/ I want to check out and build When i want to svn co and mvn clean compile ; I am getting error telling some module of pom.xml does not exist. If you are having problems following the directions provided by the Apache James folks or if their build is broken, you need to talk to them about it on their Users or Dev list. This is their problem and they should fix it. Where am i wrong, as you can see i have misunderstanding about maven working principals. Perhaps not -- it may simply be that their build is broken. This may have nothing to with Maven. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Importing large project into Eclipse hangs on constant percent
Sorry for mail sequence, but in eclipse Window|Preferences|Maven|User Settings ... Sorry i missed one point, m2e settings are important, not the command line mvn. The Eclipse M2E project maintains its own lists which should be used for this discussion: http://www.eclipse.org/m2e/ Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven 3.0.4 and maven-release-plugin 2.3.2
I've recently upgraded to maven 3.0.4. Things went smoothly, but to complete the upgrade I wanted to see how my release process worked on top of the latest maven edition. I've run into some problems, and I'm in need of some advice. I'm using maven 3.0.4 with maven-release-plugin 2.3.2. My release process uses the maven release plugin in batch mode. I supply command line arguments concerning the tag version and the next snapshot version. I start the release with my base module (the project that all others depend on 'commons'). That release works great, scm is handled as expected. When I move on to the next project ('bizcore') that is to be released, its dependency on 'commons' has become an issue. The second phase of release:prepare checks to make sure that there are no SNAPSHOT dependencies. The way I've referenced the dependency to 'commons' in 'bizcore' looks like this: dependency groupIdcom.mybiz/groupId artifactIdcommons/artifactId version${project.version}/version /dependency The expression ${project.version} is a change I made due to the upgrade to maven 3x. It used to say ${version} (referecing the projet version/ element), which I was warned about the first time I built the project. Maven suggested I make the above change so I complied. I understand that ${project.version} property is going to eveluate to the current project version, which for 'bizcore' at the time of release is a SNAPSHOT version. This is where 'release:prepare' fails with: 'Can't release project due to non released dependencies' This makes sense to me. I understand why it's failing, but I'm not sure what I need to do to convince the release plugin to bump up the dependency version to the latest tag version of 'commons'. I have been looking at the versions plugin, but that would suggest that I release my first project with the release plugin, move on to the next project where I would run the versions plugin to update dependencies, check those changes into SCM and then start to release my second project. Is that the way I need to release now? With maven 2.2.1 I could just roll through my projects with the release plugin in the correct order to release my project suite. I feel like I'm missing something obvious, because I don't think that maven would change a process to involve another plugin. Any advice would be appreciated. Thank you, srexi
Re: Include child binaries in a assembly distribution
Any ideas? On Thu, Nov 8, 2012 at 12:40 PM, Billy Newman newman...@gmail.com wrote: Almost there getting a final distribution build. I am having one last problem that I am not sure how to solve: Project layout --module 1 (jar) --module 2 (war) --module 3 (zip) This module builds a zip archive using the assmebly plugin -- dist module Module to create distribution pom.xml My problem is that my module 3 (which is a pom artifact that creates a zip file using the assembly plugin) is not included in my distribution. I am guessing this is due to the module 3 pom not really creating a maven artifact like a jar/war/ear, but instead it creates a zip. Is there anyway from my child distribution pom/assembly to include the zip archive that was created as part of the module 3 build? Thanks. On Fri, Nov 2, 2012 at 9:01 AM, Billy Newman newman...@gmail.com wrote: So I am following: http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html Seems pretty straight forward. I have create a child module (put it at the end of the module list in the parent), but I am getting this error: 'The following patterns were never triggered in this artifact inclusion filter o org.test:child1'. Been staring at this for a while and I have no idea what is wrong. I have double checked that I included the org.test:child1 artifact in the child distribution build. And I have also verified that I am using: !-- Enable access to all projects in the current multimodule build! -- useAllReactorProjectstrue/useAllReactorProjects Any ideas? Thanks, Billy On Thu, Nov 1, 2012 at 9:05 PM, Srinath C srinat...@gmail.com wrote: Hi Billy, +1 to the way Anders suggested. I had once implemented the assembling exactly the way you did, but then ran into issues and had to switch to having a sub-module do the assembling. Regards Srinath. On Fri, Nov 2, 2012 at 6:10 AM, Wayne Fay wayne...@gmail.com wrote: Could I get away with attaching the assembly to a different phase (after package) that would ensure my child modules have gone through the package phase. Then pull the binaries from the target dir of each child? Why would you want to? Anders told the right way to do this. Wayne - 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: Include child binaries in a assembly distribution
distribution. I am guessing this is due to the module 3 pom not really creating a maven artifact like a jar/war/ear, but instead it creates a zip. Is there anyway from my child distribution pom/assembly to include the zip archive that was created as part of the module 3 build? Most likely you are not using the assembly plugin correctly so the ZIP artifact is not bound to the build. You need to ensure the ZIP artifact in module3 is being installed into the local repo cache when you are in that project directory and type mvn install. Also, you should be using the single goal of the assembly plugin. This may be important for you, from the FAQ: Can I use an artifact created by the assembly plugin as a dependency? Yes. You can refer to it using the id of the assembly as the dependency classifier. http://maven.apache.org/plugins/maven-assembly-plugin/faq.html Then you need to check how you are depending on that artifact in dist. You will need to declare typezip/type in the dependency. Here's more info that may be helpful: http://www.sonatype.com/books/mvnref-book/reference/assemblies-sect-controlling-contents.html Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven 3.0.4 and maven-release-plugin 2.3.2
I don't have the in-depth knowledge of the release-plugin, but I think that the problem might be that you don't have an aggregate build. So the dependency to commons in bizcore is actually referencing a SNAPSHOT version (the value of project.version). I would even go as far as if you don't have a multi-module build (an aggregating build), using the current project version number in the GAV of a dependency is weird. /Anders On Fri, Nov 9, 2012 at 4:19 PM, S I sr...@hotmail.com wrote: I've recently upgraded to maven 3.0.4. Things went smoothly, but to complete the upgrade I wanted to see how my release process worked on top of the latest maven edition. I've run into some problems, and I'm in need of some advice. I'm using maven 3.0.4 with maven-release-plugin 2.3.2. My release process uses the maven release plugin in batch mode. I supply command line arguments concerning the tag version and the next snapshot version. I start the release with my base module (the project that all others depend on 'commons'). That release works great, scm is handled as expected. When I move on to the next project ('bizcore') that is to be released, its dependency on 'commons' has become an issue. The second phase of release:prepare checks to make sure that there are no SNAPSHOT dependencies. The way I've referenced the dependency to 'commons' in 'bizcore' looks like this: dependency groupIdcom.mybiz/groupId artifactIdcommons/artifactId version${project.version}/version /dependency The expression ${project.version} is a change I made due to the upgrade to maven 3x. It used to say ${version} (referecing the projet version/ element), which I was warned about the first time I built the project. Maven suggested I make the above change so I complied. I understand that ${project.version} property is going to eveluate to the current project version, which for 'bizcore' at the time of release is a SNAPSHOT version. This is where 'release:prepare' fails with: 'Can't release project due to non released dependencies' This makes sense to me. I understand why it's failing, but I'm not sure what I need to do to convince the release plugin to bump up the dependency version to the latest tag version of 'commons'. I have been looking at the versions plugin, but that would suggest that I release my first project with the release plugin, move on to the next project where I would run the versions plugin to update dependencies, check those changes into SCM and then start to release my second project. Is that the way I need to release now? With maven 2.2.1 I could just roll through my projects with the release plugin in the correct order to release my project suite. I feel like I'm missing something obvious, because I don't think that maven would change a process to involve another plugin. Any advice would be appreciated. Thank you, srexi
RE: maven release plugin: release:prepare fails (svn/ maven bug)
Robert Thanks you very much for your reply. Unfortunately, I am still having the same issue with release:prepare goal after making this change (i.e. utilizing 2.3.2 version of the maven-release-plugin, AND using the svnjava (maven-scm-plugin) as suggested in my parent pom. I should have mentioned, we are using maven v2.2.1 and svn v1.6.9. This is executed through our CI server running Bamboo. Command line: mvn release:prepare -B -Dtag=libscode-1.0.0 -DreleaseVersion=1.0.0 -DdevelopmentVersion=1.0.1-SNAPSHOT -Dresume=false Thanks, -Ken -Original Message- From: Robert Scholte [mailto:rfscho...@apache.org] Sent: Wednesday, November 07, 2012 5:04 PM To: Maven Users List Subject: Re: maven release plugin: release:prepare fails (svn/ maven bug) Hi Ken, the maven-release-plugin and subversion work very well together, so there should be no need to think of workarounds. I'd strongly suggest to not try to combine the exec-maven-plugin to do a release. You refer to an issue which has been fixed a long time ago, which makes me wonder: which version of the maven-release-plugin are you using? Please lock it on 2.3.2 and try it again. Also add the svn-executable to the PATH system variable (unless you want to use svnjava [1]) A next step would be to let Maven log at debug-level ( add -X to your mvn command) to see which commands are executed. That should give you much more detailed information about the cause of failures. -Robert [1] http://code.google.com/a/apache-extras.org/p/maven-scm-provider-svnjava/wiki/Usage Op Wed, 07 Nov 2012 21:51:48 +0100 schreef Ken O'Connell koconn...@casenetllc.com: I am hoping someone can help me get around this problem? Trying to implement maven release plugin into our processes, I came across this issue (http://jira.codehaus.org/browse/SCM-406 which is a svn/maven bug with creating tags: 'tag already exists) in our release:prepare steps while executing it through our CI servers. We have a newer version of SVN which this bug is supposed to NOT be affected by, but I still see the problem. Anyway, following some workaround instructions http://www.flexthinker.com/2011/01/solving-%E2%80%9Cfile-already-exist s%E2%80%9D-mavensvn-problem/ (included; -DpreparationGoals using exec:exec with -Darguments=path to SVN executable, BUT I run into another issue, blocking me. The portion of the command line argument in questions is: -DpreparationGoals=clean install exec:exec -Darguments=-Dexec.executable='C:\Program Files\svn-win32-1.6.1\bin\svn.exe up' The build fails on a compilation issue when it finds an instance of the maven-exec-plugin (like the excerpt from a pom.xml config below). -because the exec goal for the exec-maven-plugin already exists (shown below) in an existing pom.xml file it fails to properly resolve the command line args. ...so it now FAILS the build with: INFO] [INFO] [exec:exec {execution: run-278Inbound}] ERROR: Failed to load E:\Path to build dir\up Snipit of pom.xml plugin groupIdorg.codehaus.mojo/groupId artifactIdexec-maven-plugin/artifactId version1.2/version executions execution idrun-278Inbound/id goals goalexec/goal /goals phasegenerate-sources/phase configuration executable${mapforce.exe}/executable arguments argument${basedir}\src\main\altova\auth278\X12ToAuth278.mfp/argument argument/JAVA/argument argument${basedir}/target/generated-sources/mapforce/argument argument/LOG/argument argument${basedir}\target\X12ToAuth278.log/argument /arguments /configuration /execution /executions /plugin The up (shown at the end of the path in the error message) is in reference the command intended to update the code before the execution of the prepare goal (svn up). ...not mixed together with an argument in the plugin section of my pom.xml. Thanks, Ken CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from
Re: how to proxy a one nexus instance via another local one
Hello, this is rather a Nexus question, but so far your solution looks good to me. Vincent 2012/11/9 Davis, Chad chad.da...@emc.com This may be a nexus only question, in which case I'll take it to the nexus list. However, It may also be something better handled from within maven itself. I'm not sure. Here's my issue. We have a release build environment. It has it's own nexus server that holds our official release artifacts and serves as the legally authorize proxy of the public repos ( maven central, et. al. ). The main purpose of this environment is corporate release building. For our continuous integration needs, we have our own local build servers and a local nexus. This nexus will hold our snapshots, serve as a low latency local repo to speed up our ci builds ( the release environment is geographically distant ). I'm trying to figure out how to set this all up to achieve the following requirements: 1) local nexus has same proxy filtering as remote one 2) local nexus has an extra dev repo that we can add additional dependencies to as needed; these might be ones that could be proxied through from maven central, but I would like to keep track of our new dependencies in an isoloated silo so we can easily keep tabs of them when we enter our legal approval phase 3) no changes to the poms themselves so when we migrate from CI build environment to official release build environment we don't have to edit source The solution I'm homebrewing for the moment looks like this 1) set up local nexus to have a proxy repo that proxies the release nexus's public group, if this even works technically 2) set up a hosted repo on local nexus that dev can add dependencies to at will, this will aggregate our list of new deps that we will have to process through legal before entering release cycle 3) group these two together and use settings.xml to mirror the remote release nexus ( which is the one officially declared in our poms ) Better ideas?
Re: how to proxy a one nexus instance via another local one
On Fri, Nov 9, 2012 at 2:01 PM, Davis, Chad chad.da...@emc.com wrote: 1) set up local nexus to have a proxy repo that proxies the release nexus's public group, if this even works technically I've been told on this list this is a no-no, because you have to pick an artifact type when you proxy (release or snapshot; what if the proxied group contains both?). Others on this list have said pshaw, just proxy it twice. I chose to heed the first camp and I always proxy repositories, never groups. Hope that helps, Best, Laird -- http://about.me/lairdnelson