#16 Duplicate artifact error when configuring two executions

open
nobody
6
2009-06-08
2009-06-08
brunojcm
No

I have an application with two Main classes and I need to generate two exe files from the same jar, one for each main class. So i set up two executions of the maven-jsmooth-plugin, each one with a different main class and exe name. The two exe's are created successfully when i run 'package' phase.

Unfortunately, the plugin don`t use the name set in the '.jsmooth' file to attach the '.exe' artifact to the main flow, so after the second execution of the maven-jsmooth-plugin, an error is thrown as follows:

-----------------------------------------------------------------------------
[WARNING] Duplicate artifact attachment detected. (project: test:jsmooth:jar:0.0.1-SNAPSHOT; illegal attachment: test:jsmooth:exe:0.0.1-

SNAPSHOT)
[ERROR]

Your build attempted to attach multiple artifacts with the same classifier to the main project.

Mojo responsible for second attachment attempt:com.mindtree.techworks.insight.releng:maven-jsmooth-plugin:0.2.0:jsmoothcompile

Reported for project:
Group-Id: test
Artifact-Id: jsmooth
Version: 0.0.1-SNAPSHOT
From file: C:\Users\Bruno Medeiros\projetos\workspace\jsmooth\pom.xml

Artifact attachment:

Group-Id: test
Artifact-Id: jsmooth
Version: 0.0.1-SNAPSHOT
Type: exe
Scope: null
-------------------------------------------------------------------------------------

I created a example project and attached here to help reproduce this issue. If any other information is needed to solve that or any other help is needed, please post here.

Discussion

  • brunojcm
    brunojcm
    2009-06-08

    project that reproduces the bug

     
    Attachments
  • brunojcm
    brunojcm
    2009-06-08

    complete console output with the error

     
    Attachments
  • brunojcm
    brunojcm
    2009-06-08

    • priority: 5 --> 6
     
  • Bindul Bhowmik
    Bindul Bhowmik
    2009-06-09

    Hello,

    Thank you for your defect report. The development team has accepted this as a valid defect and will work on a resolution for this. Updates for any fix will be updated in this defect report.

    If you would like a patch for the fix would be most welcome.

    Thanks,
    Insight Development Team

     
  • brunojcm
    brunojcm
    2009-06-09

    There would be a pleasure for me to provide a patch that fix this issue, but I'm not a expert in MOJO programming and this report is the only thing i can do by now..

    If a have a free time these days i will try to take a look at the MOJO code and understand better this problem..

    Thanks for the quick answer!
    If you need some help, post here!

    BrunoJCM