Mohamed El-Beltagy is a Java EE Consultant at Saudi Business Machines (SBM) developing and designing different enterprise Java EE applications using several IBM products including IBM BPM, IBM WODM, IBM WAS, IBM MQ, IBM MQ Workflow, IBM RAD, IBM RTC and IBM DB2. Mohamed has posted 2 posts at DZone. You can read more from them at their website. View Full User Profile

Personal Concerns About Maven

07.21.2008
| 5048 views |
  • submit to reddit

In my blog post (here); I mentioned my first experience using Maven2. I had a couple of comments. One of them was very useful and mentioned Maven: The definitive guide.

To cut story short; I was disappointed to the fact that Maven downloads some Jars from the Internet.

I think that these Jars should have been put into the downloaded Maven2 bundle from Apache instead of downloading them. Or mentioned as prerequisites for running Maven. Or at least would have the option to either download them or not.

The reason why I think so is that I use a slow Internet connection which is the case for quite some developers. So, I think it is not appropriate downloading these Jars each time you start with a new project or even once.

And may be the user does not have Internet access at all and downloaded it at work or whatever.

For me, downloading once and using as many times as required on any machine is quite a factor. I think that there are a lot of people who have the same concern.

Finally, I am still interested in using Maven. But I still have the previous concern.

Published at DZone with permission of its author, Mohamed El-beltagy.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:

Comments

Stefan Jäger replied on Tue, 2008/07/22 - 12:57am

Your concern is a good point about Maven, but I think, it's already solved. Maven creates a local repository on your machine and puts all downloaded JARs inside this local repository. No JAR is downloaded twice (this is the way, how it works on my machine...).

If you work in a big project, you can also define your own repositories. Just search in the internet or check out this explanation from theserverside: http://www.theserverside.com/tt/articles/article.tss?l=SettingUpMavenRepository

 /me

Alexander Shirkov replied on Tue, 2008/07/22 - 1:47am

We have some problems with Maven2. The project was in development previous two years and all was fine until one of public repositories goes down (http://tanesha.net). We've got one week of collecting repository from various sources.  The interestion thing is that same library can be defined various ways in different repos (for instance, we have found two different signatures for iText). Another headache regulary comes from plugin updates - after some of them build breaks. So the only solution to stabilize builds and get repeatability - was to put maven repo in version control and build project in offline mode. Any receipes according to this situation?

Sergey Parilin replied on Tue, 2008/07/22 - 2:52am

Apache Archiva will help you to proxify and cache maven traffic on company level. Also this extremly speeds up build proces on continuum integration server (like Apache Continuum).

 

to Alexander Shirkov

To avoid headache with plugin updates you just may sets up versions of plugins in pluginManagement section of the pom. Unfortunatly this settings are not propagating to the reporting plugins settings.

 

Alex Rueegg replied on Tue, 2008/07/22 - 7:41am

In my opinion it does make sense to use always a maven proxy (Archiva, Artifactory, Nexus): it is also the repository of your private inhouse artifacts deployed from your continous integration server (i prefer Hudson). In addition it is possible to configure your proxy server so that it does not resolve snapshot versions. In our case this is very useful as we have one remote repository where we just want to get tested snapshot versions of.

@Alexander Shirkov: As far as I know since Maven 2.0.9 there are built in plugin versions. So if no version is given in your pom the predefined (in Maven SuperPOM) are used.

 

Alexander Shirkov replied on Tue, 2008/07/22 - 8:55am in response to: Alex Rueegg

We take project with version 2.0.4 and try to migrate it (on that moment the latest one was 2.0.8), but after upgrade build breaks - new versions of plugins do something in different way, so we rollback - there was too many work to do.

Aaron Digulla replied on Tue, 2008/07/22 - 10:58am in response to: Alexander Shirkov

Configure maven to use a proxy like DSMP or Archiva where you can control what it can "see" and download. That's how we stabilize our builds: We download all the dependencies once and only tell DSMP to try to fetch a new version after a dedicated developer (usually me) has checked that the build doesn't break after the change.

Also, always supply a version number for everything.

PJ Murray replied on Tue, 2008/07/22 - 11:41am

CodeFutures uses Maven with great success - although Andy Grove has pointed out some pitfalls: 

http://www.codefutures.com/weblog/andygrove/2008/06/is-maven-right-choice-for-your-project.html

 

  

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.