Re: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Ron Wheeler
On 11/10/2012 1:40 AM, Wang, Simon wrote:
 Hi, Barrie,
That's really helpful!

Even I have local cache, it also takes about 2 mins to resolve 
 dependencies.
What is it doing during this time. Run maven with a detailed log to see
each step.

You might want to break your project up into modules that are smaller
and have fewer dependencies in each one.

Also it seems maven still will talk with remote maven server even I have 
 local cache.
It will talk to your Nexus and you need to make sure that your POMs or
settings.xml do not refer to any other Maven Repo besides your Nexus.
Yes, maybe it's caused by unspecified version numbers for dependencies.

Specify your versions on all dependencies
I'll try maven-enforcer-plugin.
Not sure how this will help with performance.

We're using nexus now, haven't tried MRM, I'll host it and compare it to 
 nexus.
Nexus is an MRM.

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?

The Eclipse IDE will do this with the m2 Eclipse plug-in. We use STS
which is Eclipse fully loaded with everything that you need to use Maven.

This is not likely going to cause a big performance hit.
 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 response time.
 2. optimize maven dependencies.
   1) avoid duplicated dependencies
   2) avoid dependency conflict cases
   3)

 Any others suggestions?
 What specifically is your problem?

 I can only guess at what you mean.
 I'm assuming that when you run mvn install that maven is reaching out to 
 check for new dependencies which can be time consuming, especially with an 
 empty ~/.m2/repository local cache.
 After the first install this shouldn't be a problem.

 Firstly make sure that you do not define additional repository in either 
 your settings.xml or pom.xml.
 Every dependency will be checked against all repositories defined.
 So just by defining one extra repository will double the time it takes to 
 check dependencies.
 There is no logic in Maven to blacklist/whitelist what artifacts are located 
 where, this is one reason why you use a Repository Manager.
 You can see that if you declare repositories in your pom.xml and this is 
 published how it will affect everyone that includes your artifacts.
 Please don't do that.

 Secondly, make sure you lock down all version numbers of dependencies.
 It is bad practice to not specify these as it makes your build 
 non-reproducable.
 This could also be a reason why it is slow as Maven will need to check 
 periodically to see if new versions are available.
 You can use maven enforcer
 (http://maven.apache.org/plugins/maven-enforcer-plugin/) to ensure that you 
 have no unversioned artifacts.

 Thirdly, install a Maven Repository Manager (Nexus is one).
 This will act as a local proxy and make downloading times much faster.
 It also provides an aggregation point, so that there is only one repository 
 to check each artifact for and the Repository Manager will hide checking the 
 other repos MRMs also allow you to do whitelist/blacklist stuff to improve 
 performance.
 If you are in a corporate environment you really want an MRM installed.

 -
 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


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Anders Hammar
I recall there was an issue with some Aether version and large
dependency trees. This had an impact on one (or maybe several) of the
Maven 3.0.x versions. But if you're using the latest (3.0.4) it has
been fixed. Are you?

/Anders

On Thu, Oct 11, 2012 at 8:07 AM, Ron Wheeler
rwhee...@artifact-software.com wrote:
 On 11/10/2012 1:40 AM, Wang, Simon wrote:
 Hi, Barrie,
That's really helpful!

Even I have local cache, it also takes about 2 mins to resolve 
 dependencies.
 What is it doing during this time. Run maven with a detailed log to see
 each step.

 You might want to break your project up into modules that are smaller
 and have fewer dependencies in each one.

Also it seems maven still will talk with remote maven server even I have 
 local cache.
 It will talk to your Nexus and you need to make sure that your POMs or
 settings.xml do not refer to any other Maven Repo besides your Nexus.
Yes, maybe it's caused by unspecified version numbers for dependencies.

 Specify your versions on all dependencies
I'll try maven-enforcer-plugin.
 Not sure how this will help with performance.

We're using nexus now, haven't tried MRM, I'll host it and compare it to 
 nexus.
 Nexus is an MRM.

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?

 The Eclipse IDE will do this with the m2 Eclipse plug-in. We use STS
 which is Eclipse fully loaded with everything that you need to use Maven.

 This is not likely going to cause a big performance hit.
 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 response time.
 2. optimize maven dependencies.
   1) avoid duplicated dependencies
   2) avoid dependency conflict cases
   3)

 Any others suggestions?
 What specifically is your problem?

 I can only guess at what you mean.
 I'm assuming that when you run mvn install that maven is reaching out to 
 check for new dependencies which can be time consuming, especially with an 
 empty ~/.m2/repository local cache.
 After the first install this shouldn't be a problem.

 Firstly make sure that you do not define additional repository in either 
 your settings.xml or pom.xml.
 Every dependency will be checked against all repositories defined.
 So just by defining one extra repository will double the time it takes to 
 check dependencies.
 There is no logic in Maven to blacklist/whitelist what artifacts are located 
 where, this is one reason why you use a Repository Manager.
 You can see that if you declare repositories in your pom.xml and this is 
 published how it will affect everyone that includes your artifacts.
 Please don't do that.

 Secondly, make sure you lock down all version numbers of dependencies.
 It is bad practice to not specify these as it makes your build 
 non-reproducable.
 This could also be a reason why it is slow as Maven will need to check 
 periodically to see if new versions are available.
 You can use maven enforcer
 (http://maven.apache.org/plugins/maven-enforcer-plugin/) to ensure that you 
 have no unversioned artifacts.

 Thirdly, install a Maven Repository Manager (Nexus is one).
 This will act as a local proxy and make downloading times much faster.
 It also provides an aggregation point, so that there is only one repository 
 to check each artifact for and the Repository Manager will hide checking the 
 other repos MRMs also allow you to do whitelist/blacklist stuff to improve 
 performance.
 If you are in a corporate environment you really want an MRM installed.

 -
 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


 --
 Ron Wheeler
 President
 Artifact Software Inc
 email: rwhee...@artifact-software.com
 skype: ronaldmwheeler
 phone: 866-970-2435, ext 102


 -
 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 optimize maven dependencies to get better performance?

2012-10-11 Thread Wang, Simon
I'm using 3.0.3, is this bug related to performance?

~Simon
-Original Message-
From: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] On Behalf Of 
Anders Hammar
Sent: 2012年10月11日 14:26
To: Maven Users List; rwhee...@artifact-software.com
Subject: Re: How to optimize maven dependencies to get better performance?

I recall there was an issue with some Aether version and large dependency 
trees. This had an impact on one (or maybe several) of the Maven 3.0.x 
versions. But if you're using the latest (3.0.4) it has been fixed. Are you?

/Anders

On Thu, Oct 11, 2012 at 8:07 AM, Ron Wheeler rwhee...@artifact-software.com 
wrote:
 On 11/10/2012 1:40 AM, Wang, Simon wrote:
 Hi, Barrie,
That's really helpful!

Even I have local cache, it also takes about 2 mins to resolve 
 dependencies.
 What is it doing during this time. Run maven with a detailed log to 
 see each step.

 You might want to break your project up into modules that are smaller 
 and have fewer dependencies in each one.

Also it seems maven still will talk with remote maven server even I have 
 local cache.
 It will talk to your Nexus and you need to make sure that your POMs or 
 settings.xml do not refer to any other Maven Repo besides your Nexus.
Yes, maybe it's caused by unspecified version numbers for dependencies.

 Specify your versions on all dependencies
I'll try maven-enforcer-plugin.
 Not sure how this will help with performance.

We're using nexus now, haven't tried MRM, I'll host it and compare it to 
 nexus.
 Nexus is an MRM.

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?

 The Eclipse IDE will do this with the m2 Eclipse plug-in. We use STS 
 which is Eclipse fully loaded with everything that you need to use Maven.

 This is not likely going to cause a big performance hit.
 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 response time.
 2. optimize maven dependencies.
   1) avoid duplicated dependencies
   2) avoid dependency conflict cases
   3)

 Any others suggestions?
 What specifically is your problem?

 I can only guess at what you mean.
 I'm assuming that when you run mvn install that maven is reaching out to 
 check for new dependencies which can be time consuming, especially with an 
 empty ~/.m2/repository local cache.
 After the first install this shouldn't be a problem.

 Firstly make sure that you do not define additional repository in either 
 your settings.xml or pom.xml.
 Every dependency will be checked against all repositories defined.
 So just by defining one extra repository will double the time it takes to 
 check dependencies.
 There is no logic in Maven to blacklist/whitelist what artifacts are located 
 where, this is one reason why you use a Repository Manager.
 You can see that if you declare repositories in your pom.xml and this is 
 published how it will affect everyone that includes your artifacts.
 Please don't do that.

 Secondly, make sure you lock down all version numbers of dependencies.
 It is bad practice to not specify these as it makes your build 
 non-reproducable.
 This could also be a reason why it is slow as Maven will need to check 
 periodically to see if new versions are available.
 You can use maven enforcer
 (http://maven.apache.org/plugins/maven-enforcer-plugin/) to ensure that you 
 have no unversioned artifacts.

 Thirdly, install a Maven Repository Manager (Nexus is one).
 This will act as a local proxy and make downloading times much faster.
 It also provides an aggregation point, so that there is only one repository 
 to check each artifact for and the Repository Manager will hide checking the 
 other repos MRMs also allow you to do whitelist/blacklist stuff to improve 
 performance.
 If you are in a corporate environment you really want an MRM installed.

 -
 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


 --
 Ron Wheeler
 President
 Artifact Software Inc
 email: rwhee...@artifact-software.com
 skype: ronaldmwheeler
 phone: 866-970-2435, ext 102


 

Re: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Anders Hammar
As far as I remember yes. And I *think* that 3.0.3 is affected, but I
could be wrong. Upgrade to 3.0.4 and try again.

/Anders

On Thu, Oct 11, 2012 at 8:51 AM, Wang, Simon yunfeng.w...@ebay.com wrote:
 I'm using 3.0.3, is this bug related to performance?

 ~Simon
 -Original Message-
 From: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] On Behalf 
 Of Anders Hammar
 Sent: 2012年10月11日 14:26
 To: Maven Users List; rwhee...@artifact-software.com
 Subject: Re: How to optimize maven dependencies to get better performance?

 I recall there was an issue with some Aether version and large dependency 
 trees. This had an impact on one (or maybe several) of the Maven 3.0.x 
 versions. But if you're using the latest (3.0.4) it has been fixed. Are you?

 /Anders

 On Thu, Oct 11, 2012 at 8:07 AM, Ron Wheeler rwhee...@artifact-software.com 
 wrote:
 On 11/10/2012 1:40 AM, Wang, Simon wrote:
 Hi, Barrie,
That's really helpful!

Even I have local cache, it also takes about 2 mins to resolve 
 dependencies.
 What is it doing during this time. Run maven with a detailed log to
 see each step.

 You might want to break your project up into modules that are smaller
 and have fewer dependencies in each one.

Also it seems maven still will talk with remote maven server even I have 
 local cache.
 It will talk to your Nexus and you need to make sure that your POMs or
 settings.xml do not refer to any other Maven Repo besides your Nexus.
Yes, maybe it's caused by unspecified version numbers for dependencies.

 Specify your versions on all dependencies
I'll try maven-enforcer-plugin.
 Not sure how this will help with performance.

We're using nexus now, haven't tried MRM, I'll host it and compare it to 
 nexus.
 Nexus is an MRM.

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?

 The Eclipse IDE will do this with the m2 Eclipse plug-in. We use STS
 which is Eclipse fully loaded with everything that you need to use Maven.

 This is not likely going to cause a big performance hit.
 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 response time.
 2. optimize maven dependencies.
   1) avoid duplicated dependencies
   2) avoid dependency conflict cases
   3)

 Any others suggestions?
 What specifically is your problem?

 I can only guess at what you mean.
 I'm assuming that when you run mvn install that maven is reaching out to 
 check for new dependencies which can be time consuming, especially with an 
 empty ~/.m2/repository local cache.
 After the first install this shouldn't be a problem.

 Firstly make sure that you do not define additional repository in either 
 your settings.xml or pom.xml.
 Every dependency will be checked against all repositories defined.
 So just by defining one extra repository will double the time it takes to 
 check dependencies.
 There is no logic in Maven to blacklist/whitelist what artifacts are 
 located where, this is one reason why you use a Repository Manager.
 You can see that if you declare repositories in your pom.xml and this is 
 published how it will affect everyone that includes your artifacts.
 Please don't do that.

 Secondly, make sure you lock down all version numbers of dependencies.
 It is bad practice to not specify these as it makes your build 
 non-reproducable.
 This could also be a reason why it is slow as Maven will need to check 
 periodically to see if new versions are available.
 You can use maven enforcer
 (http://maven.apache.org/plugins/maven-enforcer-plugin/) to ensure that you 
 have no unversioned artifacts.

 Thirdly, install a Maven Repository Manager (Nexus is one).
 This will act as a local proxy and make downloading times much faster.
 It also provides an aggregation point, so that there is only one repository 
 to check each artifact for and the Repository Manager will hide checking 
 the other repos MRMs also allow you to do whitelist/blacklist stuff to 
 improve performance.
 If you are in a corporate environment you really want an MRM installed.

 -
 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: 

Re: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Jeff MAURY
I would vote for a DNS issue

Jeff
Le 11 oct. 2012 08:08, Ron Wheeler rwhee...@artifact-software.com a
écrit :

 On 11/10/2012 1:40 AM, Wang, Simon wrote:
  Hi, Barrie,
 That's really helpful!
 
 Even I have local cache, it also takes about 2 mins to resolve
 dependencies.
 What is it doing during this time. Run maven with a detailed log to see
 each step.

 You might want to break your project up into modules that are smaller
 and have fewer dependencies in each one.

 Also it seems maven still will talk with remote maven server even I
 have local cache.
 It will talk to your Nexus and you need to make sure that your POMs or
 settings.xml do not refer to any other Maven Repo besides your Nexus.
 Yes, maybe it's caused by unspecified version numbers for
 dependencies.
 
 Specify your versions on all dependencies
 I'll try maven-enforcer-plugin.
 Not sure how this will help with performance.
 
 We're using nexus now, haven't tried MRM, I'll host it and compare it
 to nexus.
 Nexus is an MRM.
 
 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?

 The Eclipse IDE will do this with the m2 Eclipse plug-in. We use STS
 which is Eclipse fully loaded with everything that you need to use Maven.

 This is not likely going to cause a big performance hit.
  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 response time.
  2. optimize maven dependencies.
1) avoid duplicated dependencies
2) avoid dependency conflict cases
3)
 
  Any others suggestions?
  What specifically is your problem?
 
  I can only guess at what you mean.
  I'm assuming that when you run mvn install that maven is reaching out
 to check for new dependencies which can be time consuming, especially with
 an empty ~/.m2/repository local cache.
  After the first install this shouldn't be a problem.
 
  Firstly make sure that you do not define additional repository in
 either your settings.xml or pom.xml.
  Every dependency will be checked against all repositories defined.
  So just by defining one extra repository will double the time it takes
 to check dependencies.
  There is no logic in Maven to blacklist/whitelist what artifacts are
 located where, this is one reason why you use a Repository Manager.
  You can see that if you declare repositories in your pom.xml and this is
 published how it will affect everyone that includes your artifacts.
  Please don't do that.
 
  Secondly, make sure you lock down all version numbers of dependencies.
  It is bad practice to not specify these as it makes your build
 non-reproducable.
  This could also be a reason why it is slow as Maven will need to check
 periodically to see if new versions are available.
  You can use maven enforcer
  (http://maven.apache.org/plugins/maven-enforcer-plugin/) to ensure that
 you have no unversioned artifacts.
 
  Thirdly, install a Maven Repository Manager (Nexus is one).
  This will act as a local proxy and make downloading times much faster.
  It also provides an aggregation point, so that there is only one
 repository to check each artifact for and the Repository Manager will hide
 checking the other repos MRMs also allow you to do whitelist/blacklist
 stuff to improve performance.
  If you are in a corporate environment you really want an MRM installed.
 
  -
  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


 --
 Ron Wheeler
 President
 Artifact Software Inc
 email: rwhee...@artifact-software.com
 skype: ronaldmwheeler
 phone: 866-970-2435, ext 102


 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Re: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Olivier Lamy
2012/10/11 Ron Wheeler rwhee...@artifact-software.com:
 On 11/10/2012 1:40 AM, Wang, Simon wrote:
 Hi, Barrie,
That's really helpful!

Even I have local cache, it also takes about 2 mins to resolve 
 dependencies.
 What is it doing during this time. Run maven with a detailed log to see
 each step.

 You might want to break your project up into modules that are smaller
 and have fewer dependencies in each one.

Also it seems maven still will talk with remote maven server even I have 
 local cache.
 It will talk to your Nexus and you need to make sure that your POMs or
 settings.xml do not refer to any other Maven Repo besides your Nexus.
Yes, maybe it's caused by unspecified version numbers for dependencies.

 Specify your versions on all dependencies
I'll try maven-enforcer-plugin.
 Not sure how this will help with performance.

We're using nexus now, haven't tried MRM, I'll host it and compare it to 
 nexus.
 Nexus is an MRM.

Various Maven Repository Managers are listed here:
http://maven.apache.org/repository-management.html
Feel free to test all.
As we are on maven users mailing list, I won't give you my preference
(as it's usually good on such context to be fair ! and let user made
their own experience on the topic).



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?

 The Eclipse IDE will do this with the m2 Eclipse plug-in. We use STS
 which is Eclipse fully loaded with everything that you need to use Maven.

 This is not likely going to cause a big performance hit.
 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 response time.
 2. optimize maven dependencies.
   1) avoid duplicated dependencies
   2) avoid dependency conflict cases
   3)

 Any others suggestions?
 What specifically is your problem?

 I can only guess at what you mean.
 I'm assuming that when you run mvn install that maven is reaching out to 
 check for new dependencies which can be time consuming, especially with an 
 empty ~/.m2/repository local cache.
 After the first install this shouldn't be a problem.

 Firstly make sure that you do not define additional repository in either 
 your settings.xml or pom.xml.
 Every dependency will be checked against all repositories defined.
 So just by defining one extra repository will double the time it takes to 
 check dependencies.
 There is no logic in Maven to blacklist/whitelist what artifacts are located 
 where, this is one reason why you use a Repository Manager.
 You can see that if you declare repositories in your pom.xml and this is 
 published how it will affect everyone that includes your artifacts.
 Please don't do that.

 Secondly, make sure you lock down all version numbers of dependencies.
 It is bad practice to not specify these as it makes your build 
 non-reproducable.
 This could also be a reason why it is slow as Maven will need to check 
 periodically to see if new versions are available.
 You can use maven enforcer
 (http://maven.apache.org/plugins/maven-enforcer-plugin/) to ensure that you 
 have no unversioned artifacts.

 Thirdly, install a Maven Repository Manager (Nexus is one).
 This will act as a local proxy and make downloading times much faster.
 It also provides an aggregation point, so that there is only one repository 
 to check each artifact for and the Repository Manager will hide checking the 
 other repos MRMs also allow you to do whitelist/blacklist stuff to improve 
 performance.
 If you are in a corporate environment you really want an MRM installed.

 -
 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


 --
 Ron Wheeler
 President
 Artifact Software Inc
 email: rwhee...@artifact-software.com
 skype: ronaldmwheeler
 phone: 866-970-2435, ext 102


 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy


RE: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Wang, Simon
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 response time.
 2. optimize maven dependencies.
   1) avoid duplicated dependencies
   2) avoid dependency conflict cases
   3)

 Any others suggestions?

What specifically is your problem?

I can only guess at what you mean.
I'm assuming that when you run mvn install that maven is reaching out to 
check for new dependencies which can be time consuming, especially with an 
empty ~/.m2/repository local cache.
After the first install this shouldn't be a problem.

Firstly make sure that you do not define additional repository in either your 
settings.xml or pom.xml.
Every dependency will be checked against all 

Antw: Re: Corrupted Assembly, when using a type:pom dependency

2012-10-11 Thread Stefan Rademacher
Sorry, I didn't notice, that my original posting wasn't attached to my last 
email.
Here is again, what I asked few weeks ago. Can anyone help me with this?
---
Hi all, I want to create an assembly, using a moduleSet. With the following 
(simplified) example, I select a certain artifact, define the output directory 
and provide a naming pattern.assembly iddistribution/id formats 
formatzip/format /formats moduleSets moduleSet 
useAllReactorProjectstrue/useAllReactorProjects includes 
include${artifact.groupId}:test.assembly.server/include /includes 
binaries outputDirectory./outputDirectory unpackfalse/unpack 
outputFileNameMapping${module.artifactId}.${module.extension} 
/outputFileNameMapping /binaries /moduleSet /moduleSets/assembly The 
module I select in this assembly.xml contains one dependency:dependency 
groupIdde.hhla.test/groupId artifactIdtest.assembly.core/artifactId 
version0.0.1-SNAPSHOT/version typepom/type/dependency The resulting 
assembly is unusable, as soon as the following two conditions are true: - The 
module has a dependency with typepom/typeAND - The outputDirectory of the 
moduleSet is . In this case, the resulting assembly (e. g. zip file) looks 
like this: ZIP | |--  | |-- test.assembly.server.jar | |-- 
test.assembly.server.jar The file test.assembly.server.jar, which is 
contained in that directory with an empty name, is not actually a jar, but the 
POM of the dependency, which I specified with typepom/type !!! That's 
totally weird, isn't it? Extracting this zip structure leads to a corrupted 
test.assembly.server.jar, because the first jar in the dir with no name 
(which actually is an XML file) overwrites the correct jar at the actual root 
level of the zip file. Another hint is this debug output of the assembly 
plugin: [DEBUG] Adding file: C:\Dokumente und 
Einstellungen\user\.m2\repository\de\hhla\test\test.assembly.core\0.0.1-SNAPSHOT\test.assembly.core-0.0.1-SNAPSHOT.pom
 to archive location: TEST_0.0.1-SNAPSHOT//test.assembly.server.jar (Please 
notice the two slashes in the destination path.) Is this already a known issue 
or should I file a bug? Thanks and best regards, Stefan---
Thanks and best regards
Stefan
 
 
 tobias maslowski tobiasmaslow...@gmail.com 08.10.2012 11:45 
You probably should provide some information about your problem, like what
you tried to do, the setup ...

Anyway there are a few issues in the tracker, maybe you stumbled accross
http://jira.codehaus.org/browse/MASSEMBLY-609?

2012/10/8 Stefan Rademacher rademac...@hhla.de

  Hi,

 is there nobody, who can confirm, if this is a known issue?

 Thanks,
 Stefan


 -
 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 optimize maven dependencies to get better performance?

2012-10-11 Thread Martin Höller
On 11 Okt 2012, Wang, Simon wrote:

 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.

You could try mvn -o and see if this helps.

And maybe this blog post of Tim O'Brien might be of interest:
http://www.sonatype.com/people/2012/08/download-it-all-at-once-a-maven-idea/

hth,
- martin


signature.asc
Description: PGP signature


Re: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Barrie Treloar
On Thu, Oct 11, 2012 at 6:57 PM, 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

I'm not sure, your example is a copy-and-paste of
http://maven.apache.org/enforcer/enforcer-rules/dependencyConvergence.html

However I would normally expect things to be case sensitive and the
rule index (http://maven.apache.org/enforcer/enforcer-rules/index.html)
uses dependencyConvergence

You could try that instead.
If it does work, I'd file a bug against the enforcer documentation.

Also, I dont expect dependencyConvergence to actually help you with performance.
Try running maven with -X and then scouring the copious amount of
output to see what it is doing and where it is spending its time.
Always measure before you optimize.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Lyons, Roy
Tim's idea could workŠ  however, I could say that a shorter term fix might
help (if you aren't already on maven 3.0.4)

--snip--
With 3.0.4, the default wagon http(s) is now the HttpClient based on
Apache Http Client 4.1.2 http://hc.apache.org/httpcomponents-client-ga.
 There is now a http connection pooling to prevent reopening http(s) to
remote server for each requests. This pool feature is configurable with
some parameters [4].
This new defaut wagon comes with some default configuration:

* http(s) connection pool: default to 20.
* readTimeout: default to 180ms (~30 minutes) (see section Read time
out below)
* default Preemptive Authentication.
--/snip--

Taken from http://maven.apache.org/guides/mini/guide-http-settings.html


I do see a couple of obstacles to Tim's ideas.  Most of them are related
to bad practices which are regularly evangelized as good ideasŠ  like
using variables for version names (I am looking at you Atlassian
[http://blogs.atlassian.com/2010/09/bamboo_jira_release_management_plugin_p
art_2/]).



Another snippet (I didn't read this before this discussion thread and it
enlightened me)


--snip--

Maven Wagon HTTPThis project is an implementation of Wagon provider for
HTTP access. It uses Apache HttpComponents client
http://hc.apache.org/httpcomponents-client-ga/ as lower level layer.
It enables Maven to use remote repositories stored in HTTP servers.

FeaturesPrior
 to version 2.0, a pooled http connection manager is used. The pooled
feature is enabled by default, you can configure it trough the following
 system properties :

* maven.wagon.http.pool = true/false (default true), enable/disable the
pooled mechanism.
* maven.wagon.httpconnectionManager.maxPerRoute = integer (default : 20),
maximum number of http(s) connection per destination.
* maven.wagon.httpconnectionManager.maxTotal = integer (default 40),
maximum number of htp(s) connection.
* maven.wagon.http.ssl.easy = true/false (default true), enable/disable
use of easy ssl check for user generated certificates.
* maven.wagon.http.ssl.allowall
 = true/false (default true), enable/disable match of the server's X.509
 certificate. If disable, a browser like check will be used.
* maven.wagon.http.ssl.ignore.validity.dates = true/false (default true),
ignore issue with certifactes dates.
* maven.wagon.rto=time in ms (default 180) read time out.

--/snip--

Taken from 
http://maven.apache.org/wagon/wagon-providers/wagon-http/index.html



AlsoŠ  You could start your day out with mvn dependency:go-offline -- and
then add --offline for subsequent compilations throughout the day.



Thanks,

Roy Lyons
Senior Configuration Engineer




On 10/11/12 4:01 AM, Martin Höller mar...@xss.co.at wrote:

On 11 Okt 2012, Wang, Simon wrote:

 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.

You could try mvn -o and see if this helps.

And maybe this blog post of Tim O'Brien might be of interest:
http://www.sonatype.com/people/2012/08/download-it-all-at-once-a-maven-ide
a/

hth,
- martin


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Lyons, Roy
Ooh.  More on the original topic (big old trees and having to sort through
stuff)

mvn dependency:tree -Dverbose=true

That¹s a powerful tool in your pruning crusade.  Putting verbose on will
tell you about the decisions maven made in deciding which dependency
versions to keep and where they came from.  Using this, you could also
figure out what items you might like to put in exclusions block of
dependency declarations.  Most likely you aren't using everything in your
dependencies and you can figure out what fat you want to trimŠ

Of course, this is the most intrusive and time consuming optionŠ  but I
suspect that it will yield the greatest results.




Thanks,

Roy Lyons
Senior Configuration Engineer
(312) 648-3659 [w] 
(773) 551-8335 [c] 
roy.ly...@cmegroup.com
mailto:roy.ly...@cmegroup.com?subject=Contact%20from%20email%20signature
CME Group 
20 S. Wacker Drive
Chicago, Illinois 60606
Self Help 
https://wiki.chicago.cme.com/confluence/display/CM/Home






On 10/11/12 9:02 AM, Barrie Treloar baerr...@gmail.com wrote:

On Thu, Oct 11, 2012 at 6:57 PM, 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

I'm not sure, your example is a copy-and-paste of
http://maven.apache.org/enforcer/enforcer-rules/dependencyConvergence.html

However I would normally expect things to be case sensitive and the
rule index (http://maven.apache.org/enforcer/enforcer-rules/index.html)
uses dependencyConvergence

You could try that instead.
If it does work, I'd file a bug against the enforcer documentation.

Also, I dont expect dependencyConvergence to actually help you with
performance.
Try running maven with -X and then scouring the copious amount of
output to see what it is doing and where it is spending its time.
Always measure before you optimize.

-
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: Re: Corrupted Assembly, when using a type:pom dependency

2012-10-11 Thread Curtis Rueden
Hi Stefan,

 dependency
groupIdde.hhla.test/groupId
artifactIdtest.assembly.core/artifactId
version0.0.1-SNAPSHOT/version
typepom/type
 /dependency

Personally, I have never used a dependency of type pom. But according to
the Maven docs, the main use case for it is as a shortcut to import a group
of dependencies transitively from that POM project. But in that case, you
would declare that dependency with scope import; see:

http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies

Is that what you are trying to do? If you use scope import, does the
problem go away? If scope import is not what you want, I am curious why you
are using a dependency of type pom.

Regards,
Curtis


On Thu, Oct 11, 2012 at 3:53 AM, Stefan Rademacher rademac...@hhla.dewrote:

  Sorry, I didn't notice, that my original posting wasn't attached to my
 last email.
 Here is again, what I asked few weeks ago. Can anyone help me with this?
 ---

 Hi all,

 I want to create an assembly, using a moduleSet. With the following
 (simplified) example, I select a certain artifact, define the output directory
 and provide a naming pattern.
 assembly
  iddistribution/id
  formats
   formatzip/format
  /formats
  moduleSets
   moduleSet
useAllReactorProjectstrue/useAllReactorProjects
includes
 include${artifact.groupId}:test.assembly.server/include
/includes
binaries
 outputDirectory./outputDirectory
 unpackfalse/unpack
 outputFileNameMapping${module.artifactId}.${module.extension}
 /outputFileNameMapping
/binaries
   /moduleSet
  /moduleSets
 /assembly

 The module I select in this assembly.xml contains one dependency:
 dependency
groupIdde.hhla.test/groupId
artifactIdtest.assembly.core/artifactId
version0.0.1-SNAPSHOT/version
typepom/type
 /dependency

 The resulting assembly is unusable, as soon as the following two conditions 
 are
 true:
 - The module has a dependency with typepom/type
 AND
 - The outputDirectory of the moduleSet is .

 In this case, the resulting assembly (e. g. zip file) looks like this:
 ZIP
 |
 |-- 
 ||-- test.assembly.server.jar
 |
 |-- test.assembly.server.jar

 The file test.assembly.server.jar, which is contained in that directory with
 an empty name, is not actually a jar, but the POM of the dependency, which I
 specified with typepom/type !!! That's totally weird, isn't it?
 Extracting this zip structure leads to a corrupted test.assembly.server.jar,
 because the first jar in the dir with no name (which actually is an XML file)
 overwrites the correct jar at the actual root level of the zip file.

 Another hint is this debug output of the assembly plugin:
 [DEBUG] Adding file: C:\Dokumente und
 Einstellungen\user\.m2\repository\de\hhla\test\test.assembly.core\0.0.1-SNAPSHOT\test.assembly.core-0.0.1-SNAPSHOT.pom
  to archive location: TEST_0.0.1-SNAPSHOT//test.assembly.server.jar
 (Please notice the two slashes in the destination path.)

 Is this already a known issue or should I file a bug?

 Thanks and best regards,
 Stefan

 ---

 Thanks and best regards
 Stefan


  tobias maslowski tobiasmaslow...@gmail.com 08.10.2012 11:45 

 You probably should provide some information about your problem, like what
 you tried to do, the setup ...

 Anyway there are a few issues in the tracker, maybe you stumbled accross
 http://jira.codehaus.org/browse/MASSEMBLY-609?

 2012/10/8 Stefan Rademacher rademac...@hhla.de

   Hi,
 
  is there nobody, who can confirm, if this is a known issue?
 
  Thanks,
  Stefan
 
 
  -
  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: xdoclet plugin for maven - custom tag handlers

2012-10-11 Thread Brian Topping
If you aren't getting a stack trace with the error, run 'mvn -X install' to get 
one.  There will be a lot more information to wade through, but it will be in 
there.

Once you find it, download the sources for the version of XDoclet you are using 
and take a look at where it's getting caught up.  If you want to debug into 
XDoclet, there is a version of Maven that is installed called mvndebug (i.e. 
mvndebug install which will allow you to set breakpoints in XDoclet and debug 
it.

I'm sure you know this already, but it's been several years since XDoclet has 
been actively developed or supported, and you'd really be better off moving to 
JSR-175 annotations. 

Brian


On Oct 11, 2012, at 11:52 AM, Abitfarago Cini ciniabitfar...@gmail.com wrote:

 Hi,
 
 I try to port an old Ant based build to Maven. It contains multiple xdoclet
 generations, of them (for XML files) uses home brewed tag handlers. These
 handlers are built separately and the artifact is installed in my local
 repository.
 
 When I run the *mvn install* it complains saying:
 
 [ERROR] Failed to execute goal
 org.codehaus.mojo:xdoclet-maven-plugin:1.0:xdoclet (default) on project
 pcm-services-model: Error executing ant tasks: Unexpected error: XDoclet
 failed. xdoclet.template.TemplateException: Could not find tag handler for
 prefix: 'xdclDum' - [Help 1]
 
 What I am missing?
 
 Abitfarago


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Barrie Treloar
On Fri, Oct 12, 2012 at 12:49 AM, Lyons, Roy roy.ly...@cmegroup.com wrote:
 Ooh.  More on the original topic (big old trees and having to sort through
 stuff)

 mvn dependency:tree -Dverbose=true

 That¹s a powerful tool in your pruning crusade.  Putting verbose on will
 tell you about the decisions maven made in deciding which dependency
 versions to keep and where they came from.  Using this, you could also
 figure out what items you might like to put in exclusions block of
 dependency declarations.  Most likely you aren't using everything in your
 dependencies and you can figure out what fat you want to trimŠ

 Of course, this is the most intrusive and time consuming optionŠ  but I
 suspect that it will yield the greatest results.

With the recent(ish) change to aether for dependency resolution the
dependency plugin doesn't resolve the same information.
That has either been fixed, or is in the work of being fixed.

Running mvn -X will output the same level of dependency resolution
information plus you should get enough of a feel for where the actual
slowness is.
And then we can start looking at speeding up that slowness.
At the moment it feels like there is too much assumption and guesswork
to point to the correct steps.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: How to optimize maven dependencies to get better performance?

2012-10-11 Thread Wayne Fay
 Running mvn -X will output the same level of dependency resolution
 information plus you should get enough of a feel for where the actual
 slowness is.
 And then we can start looking at speeding up that slowness.
 At the moment it feels like there is too much assumption and guesswork
 to point to the correct steps.

Agreed. Here are just a few of the possibilities:
a) multiple repos defined in your pom (perhaps some aren't even valid)
despite having an MRM deployed
b) artifacts deployed with no pom requiring lookups during each build
(times multiple repos?)
c) lots of snapshots with overzealous update intervals (times multiple repos?)
d) other related things that we see time and time again which cause
builds to take a while

Without seeing the debug output with -X, we're just making uneducated
assumptions which is not helpful. Simon, please capture the -X output
and post to gist or pastebin so we can help you get things working
better.

Wayne

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org