jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 2.x Assembly Plugin
  • Maven 2.x Assembly Plugin
  • MASSEMBLY-28

Support installation of

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

What about adding a <install>true</install> to the config to install all produced artifacts (as AttachedArtifacts) ?
Feel free to also review MNG-1251 as I will probably use it for implementation.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    MNG-1310.diff
    24/Oct/05 12:48 PM
    1 kB
    Jerome Lacoste

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Jerome Lacoste added a comment - 24/Oct/05 12:48 PM

Here's something that makes it work. Depends on MNG-1251.

Show
Jerome Lacoste added a comment - 24/Oct/05 12:48 PM Here's something that makes it work. Depends on MNG-1251 .
Hide
Permalink
Jerome Lacoste added a comment - 07/Nov/05 5:10 PM

MNG-1251 was checked in, but my patch not taken in. In particular, the overloaded attachArtifact() method has not been made visible from the MavenProjectHelper interface, so the proposed patch for this issue is now broken.

I've had to readd it:

Index: src/main/java/org/apache/maven/project/MavenProjectHelper.java
===================================================================
— src/main/java/org/apache/maven/project/MavenProjectHelper.java (revision 331597)
+++ src/main/java/org/apache/maven/project/MavenProjectHelper.java (working copy)
@@ -23,6 +23,8 @@
{
String ROLE = MavenProjectHelper.class.getName();

+ void attachArtifact( MavenProject project, String artifactType, File artifactFile );
+
void attachArtifact( MavenProject project, String artifactType, String artifactClassifier, File artifactFile );

void addResource( MavenProject project, String resourceDirectory, List includes, List excludes );

This makes the attached patch build again. Please review both changes (and target 2.0.1?).

Show
Jerome Lacoste added a comment - 07/Nov/05 5:10 PM MNG-1251 was checked in, but my patch not taken in. In particular, the overloaded attachArtifact() method has not been made visible from the MavenProjectHelper interface, so the proposed patch for this issue is now broken. I've had to readd it: Index: src/main/java/org/apache/maven/project/MavenProjectHelper.java =================================================================== — src/main/java/org/apache/maven/project/MavenProjectHelper.java (revision 331597) +++ src/main/java/org/apache/maven/project/MavenProjectHelper.java (working copy) @@ -23,6 +23,8 @@ { String ROLE = MavenProjectHelper.class.getName(); + void attachArtifact( MavenProject project, String artifactType, File artifactFile ); + void attachArtifact( MavenProject project, String artifactType, String artifactClassifier, File artifactFile ); void addResource( MavenProject project, String resourceDirectory, List includes, List excludes ); This makes the attached patch build again. Please review both changes (and target 2.0.1?).
Hide
Permalink
John Casey added a comment - 08/Nov/05 1:07 PM

need to expose those methods in MavenProjectHelper, and see where we stand.

Show
John Casey added a comment - 08/Nov/05 1:07 PM need to expose those methods in MavenProjectHelper, and see where we stand.
Hide
Permalink
John Casey added a comment - 08/Nov/05 1:24 PM

Just reading the attached patch...why do we want to stop using assembly.getId() as a classifier for the attached artifact?

Show
John Casey added a comment - 08/Nov/05 1:24 PM Just reading the attached patch...why do we want to stop using assembly.getId() as a classifier for the attached artifact?
Hide
Permalink
Jerome Lacoste added a comment - 08/Nov/05 3:07 PM

I reran my build by disabling my patch to this issue and here's the results.

By keeping the assembly.getId(), the artifacts get deployed as

name-version-assemblyId.format

In my case I first reuse the assembly plugin to repackage a war file into a full war file (bundle some webstart applications in it). I then bundle this full war into a zip file with a J2EE container for easy deployment, once again using the assembly plugin in a different project. My second assembly configuration looks like the following:

(deploying the artifact as name-version.war and not name-version-main.war makes it easy to reference it like that)

<assembly>
<id>main</id>
<formats>
<format>zip</format>
</formats>
....
<dependencySets>
....
<dependencySet>
<outputDirectory>jakarta-tomcat-5.5.9/webapps/xxxx/</outputDirectory>
<includes>
<include>no.bbc.xxxx:full-webapp</include>
</includes>
<unpack>true</unpack>
<scope>runtime</scope>
</dependencySet>
</dependencySets>

As I am reusing this artifact inside another assembly, the fact that I am using the classifier makes it harder to reference it from within the other assembly plugin. I haven't foud a way yet to make the <include> work when there's a classifier in the dependency name.

Maybe that's just a limitation of the assembly plugin?

Comments appreciated.

Show
Jerome Lacoste added a comment - 08/Nov/05 3:07 PM I reran my build by disabling my patch to this issue and here's the results. By keeping the assembly.getId(), the artifacts get deployed as name-version-assemblyId.format In my case I first reuse the assembly plugin to repackage a war file into a full war file (bundle some webstart applications in it). I then bundle this full war into a zip file with a J2EE container for easy deployment, once again using the assembly plugin in a different project. My second assembly configuration looks like the following: (deploying the artifact as name-version.war and not name-version-main.war makes it easy to reference it like that) <assembly> <id>main</id> <formats> <format>zip</format> </formats> .... <dependencySets> .... <dependencySet> <outputDirectory>jakarta-tomcat-5.5.9/webapps/xxxx/</outputDirectory> <includes> <include>no.bbc.xxxx:full-webapp</include> </includes> <unpack>true</unpack> <scope>runtime</scope> </dependencySet> </dependencySets> As I am reusing this artifact inside another assembly, the fact that I am using the classifier makes it harder to reference it from within the other assembly plugin. I haven't foud a way yet to make the <include> work when there's a classifier in the dependency name. Maybe that's just a limitation of the assembly plugin? Comments appreciated.
Hide
Permalink
Jerome Lacoste added a comment - 10/Nov/05 5:39 AM

It looks like this won't be necessary after all. If MNG-1274 and MNG-1462 are fixed, then I can reference the correct dependency using the <classifier> node in the <dependency> element.
Given that the IncludesArtifactFilter filter implementation only takes into account the groupId and artifactId, I don't need to update my include dependency in the assembly config.

public boolean include( Artifact artifact )
{
String id = artifact.getGroupId() + ":" + artifact.getArtifactId();

boolean matched = false;
for ( Iterator i = patterns.iterator(); i.hasNext() & !matched; )
{
// TODO: what about wildcards? Just specifying groups? versions?
if ( id.equals( i.next() ) )

{ matched = true; }

}
return matched;
}

So we can close that issue.

Show
Jerome Lacoste added a comment - 10/Nov/05 5:39 AM It looks like this won't be necessary after all. If MNG-1274 and MNG-1462 are fixed, then I can reference the correct dependency using the <classifier> node in the <dependency> element. Given that the IncludesArtifactFilter filter implementation only takes into account the groupId and artifactId, I don't need to update my include dependency in the assembly config. public boolean include( Artifact artifact ) { String id = artifact.getGroupId() + ":" + artifact.getArtifactId(); boolean matched = false; for ( Iterator i = patterns.iterator(); i.hasNext() & !matched; ) { // TODO: what about wildcards? Just specifying groups? versions? if ( id.equals( i.next() ) ) { matched = true; } } return matched; } So we can close that issue.

People

  • Assignee:
    Brett Porter
    Reporter:
    Jerome Lacoste
Vote (0)
Watch (0)

Dates

  • Created:
    24/Oct/05 12:13 PM
    Updated:
    23/Feb/06 1:14 AM
    Resolved:
    10/Nov/05 10:16 PM

Time Tracking

Estimated:
1h
Original Estimate - 1 hour
Remaining:
1h
Remaining Estimate - 1 hour
Logged:
Not Specified
Time Spent - Not Specified
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.