[
http://issues.ops4j.org/browse/PAXEXAM-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12122#action_12122
]
Richard Wallace commented on PAXEXAM-35:
----------------------------------------
Toni, you're right. I didn't do the bit that resolves it from the reactor. I
forgot that just using the ArtifactResolver won't do it. What you need to do
is use the [session.getSortedProjects() |
http://maven.apache.org/ref/current/maven-core/apidocs/org/apache/maven/execution/MavenSession.html#getSortedProjects()]
method which gives a list of
[MavenProject|http://maven.apache.org/ref/current/maven-project/apidocs/org/apache/maven/project/MavenProject.html]
objects. Then, you can get the artifact groupId/artifactId/etc. with the
[getArtifact|http://maven.apache.org/ref/current/maven-project/apidocs/org/apache/maven/project/MavenProject.html#getArtifact()]
method and check them against the dependencies. If you find one that matches,
use the
[Artifact.getFile()|http://maven.apache.org/ref/current/maven-artifact/apidocs/org/apache/maven/artifact/Artifact.html#getFile()]
to find the jar build in the target directory.
> Let maven resolve dependencies in plugin up-front and provide resolved urls
> in generated paxexam.args
> -----------------------------------------------------------------------------------------------------
>
> Key: PAXEXAM-35
> URL: http://issues.ops4j.org/browse/PAXEXAM-35
> Project: Pax Exam
> Issue Type: Improvement
> Components: maven-paxexam-plugin
> Reporter: Richard Wallace
> Assignee: Toni Menzel
> Attachments: PAXEXAM-35.patch
>
>
> Suggestion from Richard Wallace on Mailinglist:
> The only thing I think would be an improvement is if the
> dependencies, instead of being passed using the mvn: URIs, would be
> resolved by the maven plugin and passed as file: URIs instead. This
> way, if I've got a project structure like
> myproject/
> bundle1/
> pom.xml
> bundle2/
> pom.xml
> integration-tests/
> pom.xml
> I can run the integration tests from the root project directory,
> myproject, and have the bundles that pax runner is configured with be
> the jars in myproject/bundle1/target/bundle1-1.0-SNAPSHOT.jar and
> myproject/bundle2/target/bundle2-1.0-SNAPSHOT.jar. As it stands now,
> because you pass the mvn: URI instead of the file: URI, pax runner
> will try and find the bundle jars in the local repository or try and
> download them from a remote repository rather than use the jars that
> were created as part of the build. It's really handy to not have to
> install the bundles into a local repository until the integration
> tests pass. This can be particularly important in doing CI.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.ops4j.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general