[
http://jira.codehaus.org/browse/MNG-2758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brett Porter closed MNG-2758.
-----------------------------
Assignee: Brett Porter
Resolution: Won't Fix
Fix Version/s: (was: Reviewed Pending Version Assignment)
Maven has a single lifecycle - it isn't usual to compile an artifact in one
step, then come back to package it. IT's intended you can run the package step
in one hit. You should split the application POM into two projects so the
distribution is separate.
> Circular Dependency which shouldn't be
> --------------------------------------
>
> Key: MNG-2758
> URL: http://jira.codehaus.org/browse/MNG-2758
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies
> Reporter: Andrew Franklin
> Assignee: Brett Porter
> Attachments: circular-test-case.tar.gz
>
>
> I've got a situation where Maven is telling me I have a circular dependency
> that should be resolved.
> Let's say I've got applicationArtifact which provides an interface which I
> want to consume at compile time in an artifact called pluginArtifact. When
> applicationArtifact is ready to be packaged, I want to include pluginArtifact
> in the libs as a runtime dependency.
> ie.
> <artifactId>applicationArtifact</artifactId>
> <dependencies>
> <dependency>
> <artifactId>pluginArtifact</artifactId>
> <scope>runtime</scope>
> </dependency>
> </dependencies>
> <artifactId>pluginArtifact</artifactId>
> <dependencies>
> <dependency>
> <artifactId>applicationArtifact</artifactId>
> <scope>compile</scope> <!-- such that we can use the common interface -->
> </dependency>
> </dependencies>
> Maven won't compile the above as it cites a circular dependency. This should
> work because of the following valid order:
> 1) compile applicationArtifact (ignore pluginArtifact because it's scoped at
> Runtime)
> 2) compile pluginArtifact (include a compile time reference to
> applicationArtifact)
> 3) package applicationArtifact (which drags in pluginArtifact)
> I should also mention the circular dependency comes about because I have a
> parent pom to these 2 projects which defines them each as modules...
> ie.
> <artifactId>parentProject</artifactId>
> <modules>
> <module>applicationArtifact</module>
> <module>pluginArtifact</module>
> </modules>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira