Maven phase that runs before dependency resolution

2015-03-10 Thread richard_senior
There is currently no phase in which you can run a plugin that is before
dependency resolution.
I believe this is a problem for Maven.
Imagine I wanted to create a plugin which could be used by the whole
company, and enforced a particular version naming strategy.
So take Spring for example, they are using an RC and RELEASE naming
convention.
Imagine I wanted to allow people to name their artifacts _BRANCH_5.
My plugin with find that and realise that a repository named
'http://blah/blah/BRANCH_5' should be added to the repositories list (before
resolution obviously).
Also, I can now get my plugin to add a different distrubutionManagement
section allowing the artifacts to be deployed to
http://blah/blah/BRANCH_5.

By the simple act of naming artifacts I can now manage multiple workstreams
in my pipeline with ease, and without requiring special settings files or
parent POM's.

While I'm on the subject of Maven deficiencies, why is it not possible to
specify distrubutionManagement in settings?
In fact.. it doesn't matter why... it's wrong.
Sometimes ... just sometimes.. I do believe I might try Gradle.



--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-phase-that-runs-before-dependency-resolution-tp5828729.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



how to only build if version is changed..

2014-03-14 Thread richard_senior
Hello,

We are using maven, jenkins and nexus for continuous integration.

Our trunk branch contains no snapshots, and jenkins is polling the scm and
building on any change.
However periodically a developer may check things in without upversioning
the pom.
When they do this the build fails at deploy as nexus will not allow to full
release versions with the same number.
Which is obviously good... But I would like to fail the build early, before
deploy, so that when a developer tries to build
the project in their local workspace, they can see that they must change the
version number.

How would I add a goal to maven that failed, if nexus contains a binary of
the project I'm building, at the same version as the pom?

I'm guessing I'd need to use the enforcer, and perhaps the maven versions
mojo, but I don't know the exact config?



--
View this message in context: 
http://maven.40175.n5.nabble.com/how-to-only-build-if-version-is-changed-tp5788337.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