You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "maya nayak (JIRA)" <ji...@codehaus.org> on 2007/05/08 20:11:12 UTC

[jira] Created: (MCLOVER-77) Artifact has 2 candidates, please provide a classifier

Artifact has 2 candidates, please provide a classifier
------------------------------------------------------

                 Key: MCLOVER-77
                 URL: http://jira.codehaus.org/browse/MCLOVER-77
             Project: Maven 2.x Clover Plugin
          Issue Type: Bug
    Affects Versions: 2.4
            Reporter: maya nayak


INFO - 
INFO - [INFO] [clover:instrumentInternal]
INFO - [WARNING] No Clover instrumentation done as no matching sources files found
INFO - [INFO] [ear:generate-application-xml]
INFO - [INFO] ------------------------------------------------------------------------
INFO - [ERROR] BUILD FAILURE
INFO - [INFO] ------------------------------------------------------------------------
INFO - [INFO] Artifact[jar:com.tsysprepaid.psa:psa-common] has 2 candidates, please provide a classifier.
INFO - [INFO] ------------------------------------------------------------------------


psa-common is a separate project and i ran clover:instrument successfully on that. it created psa-common-<version num>-clover.jar in the local
repository and after that my other project which lists psa-common as a dependency started to fail on clover:instrument with the above error.
It appears that since psa-common now has psa-common-<version num>.jar and psa-common-<version num>-clover.jar in the repository, clover
is unable to resolve it and fails it with message artificat has 2 candidates, please provide a classifier.

How do I provide a classifier?

Is there any way to prevent clover from installing clover artifacts into m2 repository?


-- 
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

        

[jira] Commented: (MCLOVER-77) Artifact has 2 candidates, please provide a classifier

Posted by "Martin Franklin (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCLOVER-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107991 ] 

Martin Franklin commented on MCLOVER-77:
----------------------------------------

I have put up a patch on the maven2 ear plugin jira http://jira.codehaus.org/browse/MEAR-76 which resolves this issue.

Basically this is caused when the application.xml is generated for an ear and the module is listed in both the dependency section and the Modules section.

Clover swizzles the dependencies to refer to the cloverized artifact, but does nothing to the Modules section. When the ear tries to create the application.xml (as per the INFO - [INFO] [ear:generate-application-xml] above) the Modules are checked against the local repository and both the unclovered version and the clovered version are found and so the error is reported.

This can be fixed by specifying a classifier in the Modules section for the ear, but means that you must create two poms (or use complicated profiles), one with the classifier set to clover and one set to the empty string. This is a pain and hard to maintain.

The patch I have posted resolves this and along with MCLOVER-82 allows for the creation of a true cloverized ear, using cloverized jars. 

> Artifact has 2 candidates, please provide a classifier
> ------------------------------------------------------
>
>                 Key: MCLOVER-77
>                 URL: http://jira.codehaus.org/browse/MCLOVER-77
>             Project: Maven 2.x Clover Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: maya nayak
>
> INFO - 
> INFO - [INFO] [clover:instrumentInternal]
> INFO - [WARNING] No Clover instrumentation done as no matching sources files found
> INFO - [INFO] [ear:generate-application-xml]
> INFO - [INFO] ------------------------------------------------------------------------
> INFO - [ERROR] BUILD FAILURE
> INFO - [INFO] ------------------------------------------------------------------------
> INFO - [INFO] Artifact[jar:com.tsysprepaid.psa:psa-common] has 2 candidates, please provide a classifier.
> INFO - [INFO] ------------------------------------------------------------------------
> psa-common is a separate project and i ran clover:instrument successfully on that. it created psa-common-<version num>-clover.jar in the local
> repository and after that my other project which lists psa-common as a dependency started to fail on clover:instrument with the above error.
> It appears that since psa-common now has psa-common-<version num>.jar and psa-common-<version num>-clover.jar in the repository, clover
> is unable to resolve it and fails it with message artificat has 2 candidates, please provide a classifier.
> How do I provide a classifier?
> Is there any way to prevent clover from installing clover artifacts into m2 repository?

-- 
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

        

[jira] Commented: (MCLOVER-77) Artifact has 2 candidates, please provide a classifier

Posted by "Tom Davies (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCLOVER-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107708 ] 

Tom Davies commented on MCLOVER-77:
-----------------------------------

I haven't been able to reproduce this -- can you provide a simple pair of projects which fail?

> Artifact has 2 candidates, please provide a classifier
> ------------------------------------------------------
>
>                 Key: MCLOVER-77
>                 URL: http://jira.codehaus.org/browse/MCLOVER-77
>             Project: Maven 2.x Clover Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: maya nayak
>
> INFO - 
> INFO - [INFO] [clover:instrumentInternal]
> INFO - [WARNING] No Clover instrumentation done as no matching sources files found
> INFO - [INFO] [ear:generate-application-xml]
> INFO - [INFO] ------------------------------------------------------------------------
> INFO - [ERROR] BUILD FAILURE
> INFO - [INFO] ------------------------------------------------------------------------
> INFO - [INFO] Artifact[jar:com.tsysprepaid.psa:psa-common] has 2 candidates, please provide a classifier.
> INFO - [INFO] ------------------------------------------------------------------------
> psa-common is a separate project and i ran clover:instrument successfully on that. it created psa-common-<version num>-clover.jar in the local
> repository and after that my other project which lists psa-common as a dependency started to fail on clover:instrument with the above error.
> It appears that since psa-common now has psa-common-<version num>.jar and psa-common-<version num>-clover.jar in the repository, clover
> is unable to resolve it and fails it with message artificat has 2 candidates, please provide a classifier.
> How do I provide a classifier?
> Is there any way to prevent clover from installing clover artifacts into m2 repository?

-- 
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