AMP packaging type is not seen as java project by cobertura -----------------------------------------------------------
Key: MNG-4609 URL: http://jira.codehaus.org/browse/MNG-4609 Project: Maven 2 & 3 Issue Type: Bug Affects Versions: 2.2.1 Reporter: Julien HENRY I have a project that is using Maven Alfresco integration [1] to produce AMP artifacts. There is a new packaging type "amp". Looking at the source code of the plugin the language is "java" [2]. On cobertura side there is a check [3] to prevent instrumentation in case of non java artifact: {code} 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" ); } {code} As AMP is supposed to be a "java" artifact (and that's actually true) I was expecting cobertura to perform instrumentation. But in fact it is not: {code} [INFO] ------------------------------------------------------------------------ [INFO] Building My Project AMP Packaging [INFO] task-segment: [org.codehaus.mojo:cobertura-maven-plugin:2.3:cobertura] [INFO] ------------------------------------------------------------------------ [INFO] Preparing cobertura:cobertura [INFO] [buildnumber:create {execution: default}] [INFO] Checking for local modifications: skipped. [INFO] Updating project files from SCM: skipped. [INFO] Storing buildNumber: 5 at timestamp: 1268819729587 [INFO] [nosnapshot:strip {execution: default}] [INFO] Storing noSnapshotVersion: 0.1 [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 2 resources [INFO] Copying 8 resources to alfresco/module/fr.cirad.contrat [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [INFO] [cobertura:instrument {execution: default-instrument}] [INFO] Not executing cobertura:instrument as the project is not a Java classpath-capable package [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: /var/lib/hudson/workspace/MyProject/trunk/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running fr.myproject.contrat.CoreTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.072 sec Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [cobertura:cobertura {execution: default-cli}] [INFO] Not executing cobertura:report as the cobertura data file (/var/lib/hudson/workspace/MyProject/trunk/target/cobertura/cobertura.ser) could not be found [WARN] Cobertura report not found at /var/lib/hudson/workspace/MyProject/trunk/target/site/cobertura/coverage.xml {code} Do you have any idea of the problem? Does it come from AMP plugin, cobertura plugin or Maven core? [1] http://wiki.alfresco.com/wiki/Managing_Alfresco_Lifecyle_with_Maven [2] http://maven-alfresco-archetypes.googlecode.com/svn/trunk/plugins/maven-amp-plugin/src/main/resources/META-INF/plexus/components.xml [3] http://svn.codehaus.org/mojo/tags/cobertura-maven-plugin-2.3/src/main/java/org/codehaus/mojo/cobertura/CoberturaInstrumentMojo.java -- 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