Hi,
I am developing a maven plugin which needs to add a dependency to the
javac and surefire classpaths.
Using:
final Set set = getProject().getDependencyArtifacts();
set.add( myArtifact );
getProject().setDependencyArtifacts( set );
seems to work most of the time.
In certain situations however, depending on what dependencies are
defined for the project, this seems to cause different versions of
transitive dependencies to be resolved than when my plugin is not
invoked. I notice that getProject().getDependencyArtifacts() is a
java.util.HashSet.
I have tested this with both maven 2.0.8 and 2.0.9. The behavior is
the same.
What is the safest way to add a dependency to the classpaths and
preserve the order of those dependencies?
Any help is greatly appreciated.
Cheers,
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]