Hey guys, I was hoping that someone might be able to help me out with an
issue I'm having on a plugin I've written.

The high level of what the plugin does is automatically change the version
number of a project to match whatever the name of the git branch name is
that it is on without any physical change to the pom.xml or anything (i'll
skip the reason for this as it is not relevant to the question).

What I've written so far works great as long as I "install" or "deploy" the
artifacts as well. However, it does not seem to work so well from within a
"reactor" setup.

So here is the reactor scenario

Parent
\__ ChildA
\__ ChildB (depends on ChildA)

Well the plugin will properly change the version number of Parent, ChildA,
and ChildB and it will properly update the version number of ChildA (that
is the dependency list of ChildB) to the branch-SNAPSHOT name. However,
well it goes to "resolve" that dependency it does not appear to find it
within the reactor artifacts that are created and thus tries to find it
from the local or remote repositories instead.

Because the install/deploy actually physically modify the pom that is to be
"deployed" out, everything works great once you have actually
installed/deployed it once. For some reason once it locates the pom file it
decides to use the version of the artifact that was built from within the
reactor (or so it appears but I haven't tested this part too deeply). What
I'm not able to do is get that "initial" build to work correctly though and
I do not wish to be forced into doing a "install" or "deploy" to make this
work.

So the issue appears to be that the DefaultArtifactResolver is unable to
resolve it and so what I'd like to know is if there is any way for me to
manually put something into the cache or repository or something from an
in-memory state that is only for the life of that reactor so that it will
resolve correctly to the artifact that was just built from within the
reactor and not from a local/remote repository?

The code if anyone is interested is up on github at
https://github.com/sepatel/maven-scm-version-plugin if it helps people to
understand what I'm talking about.

Thanks for any help or ideas that can be offered,

-- 
*Justice is nothing more than that which is in the greatest self-interest
of the largest portion of the population.*

Reply via email to