Thursday, April 10, 2008

Update: Always specify a version for Maven2 plugins

I previously wrote about specifying a release version for maven plugins in your POM files to have a more stable build and stop depending on SNAPSHOT plugin dependencies. It now seems with the latest version of maven2, version 2.0.9, that maven now comes with release versions for all the commons plugins (see the release notes).

"MNG-3395 - Starting in 2.0.9, we have provided defaults in the super pom for the plugins bound by default to the lifecycle and a few other often used plugins. This will introduce a bit of stability to your builds because core plugins will not change magically on you when they are released. We still recommend taking control of your plugin versions via pluginManagement declarations as this is the most robust way to future proof your builds. Defaulting the plugins in the superpom was a step towards introducing stability for small builds and new users. A full table of the versions used is shown in the next section."

Note how they still recommend specifying release versions in the pluginManagement section of your POM.


Lawrence said...

With all due respect, I have had SO much loss of time due to maven2! Continuously, it says it cannot download one or other dependency from the repo. If I go looking for it, indeed I see that some moron deleted the pom for it. e.g. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.3:clean (default-clean)
Plugin org.apache.maven.plugins:maven-clean-plugin:2.3 or one of its dependencies could not be resolved: Unable to get dependency information for org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1: Failed to process POM for org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1: Non-resolvable parent POM org.codehaus.plexus:plexus-containers:1.0.3 for org.codehaus.plexus:plexus-container-default:1.0-alpha-9-stable-1: Failed to resolve POM for org.codehaus.plexus:plexus-containers:1.0.3 due to Missing:
1) org.codehaus.plexus:plexus-containers:pom:1.0.3
1 required artifact is missing.

for artifact:

I Mean JEZUS CHRIST!!!!!!!!! SO FUCKING FRUSTRATING and it's been going on like this all day!

Maven WAR: does not work!!!
Maven update project configuration: DOES NOT WORK!

Clearly, open source does NOT work. I honestly feel that these develeopers, with all due respect for their efforts, are not at the level required for building professional enterprise software! I really believe that! Sorry

Frustration and agony all fucking day!!!

Unknown said...

I like to get up early to go out and breathe fresh air. I feel that it is good for health and a good habit