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)
  • Maven 2.x Ant Tasks
  • MANTTASKS-21

Attached artefacts not handled

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

The install and deploy tasks don't seem to be able to handle attached artefacts. There appear to be two sides to the problem: first, there seems to be no way to attach anything, and second, even if it were attached, the install and deploy tasks don't do anything with attachments.

The latter could be solved by adding to the install (and similar to the deploy) task something along the lines of (similar to the InstallMojo in the install plugin):

List attachedArtifacts = pom.getMavenProject().getAttachedArtifacts();
for (Iterator i = attachedArtifacts.iterator(); i.hasNext(); ) { Artifact attached = (Artifact) i.next(); installer.install(attached.getFile(), attached, localRepo); }

For the former (how to attach anything), a new task could be added (say, 'attach', taking a type, classifier and file).

This functionality is needed to handle source archives and EJB client jars.

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

Attachments

  1. Text File
    MNG-1544-maven-artifact-ant.patch
    01/Feb/06 9:57 PM
    4 kB
    Tomislav Stojcevich
  2. Text File
    MNG-1544-site.patch
    01/Feb/06 9:57 PM
    4 kB
    Tomislav Stojcevich

Issue Links

relates to

New Feature - A new feature of the product, which has yet to be developed. MANTTASKS-42 Allow install and deploy tasks to include attached artifacts

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Tomislav Bodor added a comment - 13/Nov/05 11:04 AM

Alternatively, a nested fileset could be added to install and deploy tasks... Then the attachments would not be handled the 'maven way', but more the 'ant way'. Since maven plugins cannot be executed in this mode anyway, perhaps there is no need to support the proper attachments.

Show
Tomislav Bodor added a comment - 13/Nov/05 11:04 AM Alternatively, a nested fileset could be added to install and deploy tasks... Then the attachments would not be handled the 'maven way', but more the 'ant way'. Since maven plugins cannot be executed in this mode anyway, perhaps there is no need to support the proper attachments.
Hide
Permalink
Tomislav Stojcevich added a comment - 01/Feb/06 9:57 PM

Created the ability to specify classifer and type to install and deploy arbitrary attachments to the artifact supplied in the POM.
If a classifier is supplied it is appended to the name in the supplied pom along with the type that is supplied. The result is the name the file gets when installed (it may or may not be what the original file is called).

A more elegent solution would be to allow for an <attachments> section that could be like a fileset within the <artifact:install> to avoid having to define a seperate <artifact:install> (and POM) for each artifact but this at least gets the job done for now.

There could also be a nice addition to automatically discover the classifer and type from the filename that is passed if a new artifact:installAttachment task is written or maybe adding an attachment property.

Show
Tomislav Stojcevich added a comment - 01/Feb/06 9:57 PM Created the ability to specify classifer and type to install and deploy arbitrary attachments to the artifact supplied in the POM. If a classifier is supplied it is appended to the name in the supplied pom along with the type that is supplied. The result is the name the file gets when installed (it may or may not be what the original file is called). A more elegent solution would be to allow for an <attachments> section that could be like a fileset within the <artifact:install> to avoid having to define a seperate <artifact:install> (and POM) for each artifact but this at least gets the job done for now. There could also be a nice addition to automatically discover the classifer and type from the filename that is passed if a new artifact:installAttachment task is written or maybe adding an attachment property.
Hide
Permalink
Jason Dillon added a comment - 29/Mar/07 5:37 PM

The code patch seems to have nothing todo with attaching artifacts. I've added a patch MANTTASKS-42 which adds nested <attach> configuration to the install and deploy tasks to add support to attach arbitrary files.

Show
Jason Dillon added a comment - 29/Mar/07 5:37 PM The code patch seems to have nothing todo with attaching artifacts. I've added a patch MANTTASKS-42 which adds nested <attach> configuration to the install and deploy tasks to add support to attach arbitrary files.
Hide
Permalink
Jason van Zyl added a comment - 27/May/07 7:03 PM

Attached artifacts work fine.

Show
Jason van Zyl added a comment - 27/May/07 7:03 PM Attached artifacts work fine.

People

  • Assignee:
    Unassigned
    Reporter:
    Tomislav Bodor
Vote (4)
Watch (5)

Dates

  • Created:
    13/Nov/05 10:51 AM
    Updated:
    27/May/07 7:03 PM
    Resolved:
    27/May/07 7:03 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.