You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Peter Liljenberg (JIRA)" <ji...@codehaus.org> on 2007/07/13 10:36:13 UTC

[jira] Created: (MNG-3105) Maven-cobertura-plugin does not work for RAR packaging projects

Maven-cobertura-plugin does not work for RAR packaging projects
---------------------------------------------------------------

                 Key: MNG-3105
                 URL: http://jira.codehaus.org/browse/MNG-3105
             Project: Maven 2
          Issue Type: Bug
    Affects Versions: 2.0.6
            Reporter: Peter Liljenberg


For a project with packaging "rar" the codehaus maven plugin for Cobertura does not work.
During instrumentation the following message is displayed:

"Not executing cobertura:instrument as the project is not a Java classpath-capable package"

The reason for this is that in the CoberturaInstrumentMojo.execute()  the code checks which language that the artifact is implemented in, like this:
ArtifactHandler artifactHandler = project.getArtifact().getArtifactHandler();
        if ( !"java".equals( artifactHandler.getLanguage() ) )
        {
            getLog().info( "Not executing cobertura:instrument as the project is not a Java classpath-capable package" );
        }

Looking at the components.xml in the Maven sources, we find that the "rar" packaging is not specified at all, meaning that it will be handled with the DefaultArtifactHandler and all properties set to null, including the language property. 
This can be fixed with the following addition to components.xml:

<components>
....
    <component>
      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
      <role-hint>rar</role-hint>
      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
      <configuration>
        <type>rar</type>
        <extension>rar</extension>
        <includesDependencies>true</includesDependencies>
        <language>java</language>
        <addedToClasspath>false</addedToClasspath>
      </configuration>
    </component>
...
</components>

-- 
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: (MRAR-17) No RAR packaging (Causes Maven-cobertura-plugin to fail)

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRAR-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_127990 ] 

Herve Boutemy commented on MRAR-17:
-----------------------------------

rar lifecycle mapping has been done for MNG-150 in r232602 in august 2005, see http://svn.apache.org/viewvc?view=rev&revision=232602

rar ArtifactHandler definition in components.xml has been done in r593857 on 11/11/2007, released in Maven 2.0.8, see http://svn.apache.org/viewvc?view=rev&revision=593857

but the definition is somewhat different  from your proposal:
{code:xml}<component>
  <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
  <role-hint>rar</role-hint>
  <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
  <configuration>
    <type>rar</type>
    <language>java</language>
    <addedToClasspath>true</addedToClasspath>
  </configuration>
</component>{code}
instead of 
{code:xml}<component>
  <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
  <role-hint>rar</role-hint>
  <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
  <configuration>
    <type>rar</type>
    <extension>rar</extension>
    <includesDependencies>true</includesDependencies>
    <language>java</language>
    <addedToClasspath>false</addedToClasspath>
  </configuration>
</component>{code}

Then my question is: should the actual configuration be modified?
1. add <extension>rar</extension>
2. add <includesDependencies>true</includesDependencies>
3. change <addedToClasspath>true</addedToClasspath> to <addedToClasspath>false</addedToClasspath>
I'm not a rar expert, so my opinion on the topic is weak :)

BTW, I'll change MNG-3147 to mark it as fixed in Maven 2.0.8
And when we're ok with the changes to do, I'll create another MNG issue

For the dispatch of the diverse ArtifactHandler configurations from Maven Core to corresponding plugins, I think it is another topic. Don't know if it is already covered in an existing Jira issue...

> No RAR packaging (Causes Maven-cobertura-plugin to fail)
> --------------------------------------------------------
>
>                 Key: MRAR-17
>                 URL: http://jira.codehaus.org/browse/MRAR-17
>             Project: Maven 2.x Rar Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Peter Liljenberg
>
> For a project with packaging "rar" the codehaus maven plugin for Cobertura does not work.
> During instrumentation the following message is displayed:
> "Not executing cobertura:instrument as the project is not a Java classpath-capable package"
> The reason for this is that in the CoberturaInstrumentMojo.execute()  the code checks which language that the artifact is implemented in, like this:
> ArtifactHandler artifactHandler = project.getArtifact().getArtifactHandler();
>         if ( !"java".equals( artifactHandler.getLanguage() ) )
>         {
>             getLog().info( "Not executing cobertura:instrument as the project is not a Java classpath-capable package" );
>         }
> Looking at the components.xml in the Maven sources, we find that the "rar" packaging is not specified at all, meaning that it will be handled with the DefaultArtifactHandler and all properties set to null, including the language property. 
> This can be fixed with the following addition to components.xml:
> <components>
> ....
>     <component>
>       <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
>       <role-hint>rar</role-hint>
>       <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
>       <configuration>
>         <type>rar</type>
>         <extension>rar</extension>
>         <includesDependencies>true</includesDependencies>
>         <language>java</language>
>         <addedToClasspath>false</addedToClasspath>
>       </configuration>
>     </component>
> ...
> </components>

-- 
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] Closed: (MRAR-17) No RAR packaging (Causes Maven-cobertura-plugin to fail)

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRAR-17?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy closed MRAR-17.
-----------------------------

      Assignee: Herve Boutemy
    Resolution: Cannot Reproduce

rar packaging has been added in Maven 2.0.8
and MNG-3497 is here to fix the config

> No RAR packaging (Causes Maven-cobertura-plugin to fail)
> --------------------------------------------------------
>
>                 Key: MRAR-17
>                 URL: http://jira.codehaus.org/browse/MRAR-17
>             Project: Maven 2.x Rar Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Peter Liljenberg
>            Assignee: Herve Boutemy
>
> For a project with packaging "rar" the codehaus maven plugin for Cobertura does not work.
> During instrumentation the following message is displayed:
> "Not executing cobertura:instrument as the project is not a Java classpath-capable package"
> The reason for this is that in the CoberturaInstrumentMojo.execute()  the code checks which language that the artifact is implemented in, like this:
> ArtifactHandler artifactHandler = project.getArtifact().getArtifactHandler();
>         if ( !"java".equals( artifactHandler.getLanguage() ) )
>         {
>             getLog().info( "Not executing cobertura:instrument as the project is not a Java classpath-capable package" );
>         }
> Looking at the components.xml in the Maven sources, we find that the "rar" packaging is not specified at all, meaning that it will be handled with the DefaultArtifactHandler and all properties set to null, including the language property. 
> This can be fixed with the following addition to components.xml:
> <components>
> ....
>     <component>
>       <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
>       <role-hint>rar</role-hint>
>       <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
>       <configuration>
>         <type>rar</type>
>         <extension>rar</extension>
>         <includesDependencies>true</includesDependencies>
>         <language>java</language>
>         <addedToClasspath>false</addedToClasspath>
>       </configuration>
>     </component>
> ...
> </components>

-- 
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] Updated: (MRAR-17) No RAR packaging (Causes Maven-cobertura-plugin to fail)

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRAR-17?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey updated MRAR-17:
---------------------------

    Summary: No RAR packaging (Causes Maven-cobertura-plugin to fail)  (was: Maven-cobertura-plugin does not work for RAR packaging projects)

We should consider defining an ArtifactHandler and lifecycle mapping for rar packaging...

> No RAR packaging (Causes Maven-cobertura-plugin to fail)
> --------------------------------------------------------
>
>                 Key: MRAR-17
>                 URL: http://jira.codehaus.org/browse/MRAR-17
>             Project: Maven 2.x Rar Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Peter Liljenberg
>
> For a project with packaging "rar" the codehaus maven plugin for Cobertura does not work.
> During instrumentation the following message is displayed:
> "Not executing cobertura:instrument as the project is not a Java classpath-capable package"
> The reason for this is that in the CoberturaInstrumentMojo.execute()  the code checks which language that the artifact is implemented in, like this:
> ArtifactHandler artifactHandler = project.getArtifact().getArtifactHandler();
>         if ( !"java".equals( artifactHandler.getLanguage() ) )
>         {
>             getLog().info( "Not executing cobertura:instrument as the project is not a Java classpath-capable package" );
>         }
> Looking at the components.xml in the Maven sources, we find that the "rar" packaging is not specified at all, meaning that it will be handled with the DefaultArtifactHandler and all properties set to null, including the language property. 
> This can be fixed with the following addition to components.xml:
> <components>
> ....
>     <component>
>       <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
>       <role-hint>rar</role-hint>
>       <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
>       <configuration>
>         <type>rar</type>
>         <extension>rar</extension>
>         <includesDependencies>true</includesDependencies>
>         <language>java</language>
>         <addedToClasspath>false</addedToClasspath>
>       </configuration>
>     </component>
> ...
> </components>

-- 
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] Moved: (MRAR-17) Maven-cobertura-plugin does not work for RAR packaging projects

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MRAR-17?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey moved MNG-3105 to MRAR-17:
-------------------------------------

    Affects Version/s:     (was: 2.0.6)
                       2.3
           Issue Type: New Feature  (was: Bug)
                  Key: MRAR-17  (was: MNG-3105)
              Project: Maven 2.x Rar Plugin  (was: Maven 2)

> Maven-cobertura-plugin does not work for RAR packaging projects
> ---------------------------------------------------------------
>
>                 Key: MRAR-17
>                 URL: http://jira.codehaus.org/browse/MRAR-17
>             Project: Maven 2.x Rar Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Peter Liljenberg
>
> For a project with packaging "rar" the codehaus maven plugin for Cobertura does not work.
> During instrumentation the following message is displayed:
> "Not executing cobertura:instrument as the project is not a Java classpath-capable package"
> The reason for this is that in the CoberturaInstrumentMojo.execute()  the code checks which language that the artifact is implemented in, like this:
> ArtifactHandler artifactHandler = project.getArtifact().getArtifactHandler();
>         if ( !"java".equals( artifactHandler.getLanguage() ) )
>         {
>             getLog().info( "Not executing cobertura:instrument as the project is not a Java classpath-capable package" );
>         }
> Looking at the components.xml in the Maven sources, we find that the "rar" packaging is not specified at all, meaning that it will be handled with the DefaultArtifactHandler and all properties set to null, including the language property. 
> This can be fixed with the following addition to components.xml:
> <components>
> ....
>     <component>
>       <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
>       <role-hint>rar</role-hint>
>       <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
>       <configuration>
>         <type>rar</type>
>         <extension>rar</extension>
>         <includesDependencies>true</includesDependencies>
>         <language>java</language>
>         <addedToClasspath>false</addedToClasspath>
>       </configuration>
>     </component>
> ...
> </components>

-- 
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: (MNG-3105) Maven-cobertura-plugin does not work for RAR packaging projects

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104826 ] 

John Casey commented on MNG-3105:
---------------------------------

Wouldn't this artifact definition be more appropriate in the maven-rar-plugin? That way, rar functionality could be captured in a single release cycle, rather than waiting for new releases of Maven itself.

> Maven-cobertura-plugin does not work for RAR packaging projects
> ---------------------------------------------------------------
>
>                 Key: MNG-3105
>                 URL: http://jira.codehaus.org/browse/MNG-3105
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>            Reporter: Peter Liljenberg
>
> For a project with packaging "rar" the codehaus maven plugin for Cobertura does not work.
> During instrumentation the following message is displayed:
> "Not executing cobertura:instrument as the project is not a Java classpath-capable package"
> The reason for this is that in the CoberturaInstrumentMojo.execute()  the code checks which language that the artifact is implemented in, like this:
> ArtifactHandler artifactHandler = project.getArtifact().getArtifactHandler();
>         if ( !"java".equals( artifactHandler.getLanguage() ) )
>         {
>             getLog().info( "Not executing cobertura:instrument as the project is not a Java classpath-capable package" );
>         }
> Looking at the components.xml in the Maven sources, we find that the "rar" packaging is not specified at all, meaning that it will be handled with the DefaultArtifactHandler and all properties set to null, including the language property. 
> This can be fixed with the following addition to components.xml:
> <components>
> ....
>     <component>
>       <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
>       <role-hint>rar</role-hint>
>       <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
>       <configuration>
>         <type>rar</type>
>         <extension>rar</extension>
>         <includesDependencies>true</includesDependencies>
>         <language>java</language>
>         <addedToClasspath>false</addedToClasspath>
>       </configuration>
>     </component>
> ...
> </components>

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