Issue Details (XML | Word | Printable)

Key: MNG-872
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Kenney Westerhof
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven 2

Allow defined dependencies to be related to certain types (attachments)

Created: 13/Sep/05 10:01 AM   Updated: 05/Sep/07 02:26 AM
Component/s: Artifacts and Repositories
Affects Version/s: None
Fix Version/s: 3.x

Time Tracking:
Not Specified

Complexity: Intermediate


 Description  « Hide
Currently, if you have attachments on a pom, both the main artifact and the attachments have the
same dependencies.

Use case 1:
packaging ejb: there's an ejb jar and an ejb-client jar. The ejb-client jar only
contains interfaces (actually, everything except the beans themselves), but no
business logic. The business logic in the ejb beans themselves however can have
a dependency that is not required for the ejb-client.

Use case 2:
POMS producing .jar, .dll and .so suffer from the same problem. If there are dependencies
needed for just one or two types (either the jar or both .dll and .so), depending on
the other type also includes those dependencies.

Proposal: add a tag <forTypes> (better name!) to <dependency>; when absent, all types
will have this dependency; when present, only the specified types will have these dependencies.

Implications:

  • add 'getXXClasspath( type ); methods to MavenProject and let the plugins use those.
  • dependency resolution should pick foreign dependencies parameterized by the <type>
    or get them all and just group them by type (the first is preferred since the latter will cause
    unused dependencies to be resolved).


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Brett Porter added a comment - 05/Sep/07 02:26 AM
would need a new proposal for this - not currently included in the artifact proposals