We had an open issue for this and decided to push it off for now. In our
use case, there isn't really a good way for m2 to propogate information
to JUnit without some intervening tool library, or system properties
which are obviously limited.

The problem with knowing the local repository location is that you must
also know the path structure. While I don't envisage this changing from
the new format any time soon it'd be good to be able to have that freedom.

The preferred way would be to use ${localRepository} in a plugin and get
localRepository.pathOf( artifact ).

That said, we are currently setting and using the system property
${maven.repo.local} in unit tests for modello. I'd considered that an
"undocumented" feature (as in deliberately undocument, unlike most of
the features which we intend to document :)

- Brett

Vincent Massol wrote:

>Hi,
>
>I'm continuing my quest to convert the m1 Cargo build into m2. Thanks to
>John and his implementation for inheriting properties I have now reached the
>next level.
>
>The Cargo functional test subprojects depend on some other subprojects which
>produce J2EE modules (WAR, EAR, etc).  Those are used for testing deployment
>to a container.
>
>Thus, I need to get the file path of those dependencies from within a JUnit
>TestCase class. How can I implement this?
>
>In m1, the way I had implemented it was a bit hacky:
>- There was a property: cargo.testdata.dir =
>${maven.repo.local}/${pom.groupId}
>- The path to the J2EE module in the local repository was computed within
>the TestCase
>
>Is there a property pointing to the local repo location that I could use in
>the pom.xml file (same as ${maven.repo.local} is used in m1)?
>
>Obviously I'd rather not have to write a plugin for such a use case... I
>think there's a potential need to gather all kind of information about the
>POM in a JUnit TestCase and it might be interesting to implement this in a
>generic way. WDYT?
>
>Thanks
>-Vincent
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to