You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Cherel <tc...@yahoo.com> on 2012/02/09 19:18:55 UTC

Re : System dependencies specified with a property

Thanks Wayne.

I do not disagree that if we use GAV coordinates with locked-down versions, you are supposed to know what you are testing.

But between what you have in the maven repository at the end of a product build and what you end-up with after installing the product (that was packaged from the build result), many many things can still go wrong (bugs in the packaging and installation process).
If I am putting a QA suite together to validate what the end-user will get on his machine after installing the product, I want to run the test against an installed product and nothing else.
All jar files used by the tests that are related to the product should/must come from the installed product.
Thanks for tour suggested scenario below. I guess I can have an initial processing goal that will grab all the jar I need from my installed product and create a local repository and a settings.xml file as you suggested that can then be used to run my tests. Some extra work but definitely doable.
I am going to play a bit more with the explicit -D option to the maven command (to define the installation path). It might be good enough for  what I need but your proposed solution is next on the list.


In any cases, I think it is definitely strange 
that properties used as part of a system dependency are not properly 
resolved in a multi-projec dependency scenario if the property itself is not defined 
in the pom.xml that is using it. I personally find that fairly limiting.





________________________________
 De : Wayne Fay <wa...@gmail.com>
À : Maven Users List <us...@maven.apache.org> 
Envoyé le : Jeudi 9 février 2012 16h59
Objet : Re: System dependencies specified with a property
 
> I am trying to use maven 3.0 system dependencies.

Here's your solution: don't use system scope. Find another route to
the same solution. For me, system scope is another type of profile,
and profiles are (can be) evil.

> Only option I found so far (short of defining abc.install in projectA
> pom.xml) is to define abc.install as a -D option to the maven command.

Then do this.

> - Since I need to test a specific product installation, I want to point
> directly to all the jar files of that specific product installation so I am
> 100% sure that I am actually testing what has been installed. This is why I
> want to use the maven system dependency.

If you use GAV coordinates with locked-down versions [1.2.3] there
should be no question about you "actually testing" something specific.

> - I also want to be able to very quickly switch from one product
> installation to another (think automated QA suite) which means that I want
> to be able to define in a single place (settings.xml through one or more
> profiles) the location of that installation

I actually think the best scenario would be if you just used the -s
parameter to Maven to specify an alternative settings.xml, one per
"installation" of your product or libraries, and then used the
localRepository configuration for a given localRepo that has been
initialized with the specific libraries you are wanting to test:
http://maven.apache.org/settings.html#Simple_Values

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org