[ 
http://jira.codehaus.org/browse/MPTEST-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_94079
 ] 

Lukas Theussl commented on MPTEST-66:
-------------------------------------

We need to decide what to do about this issue for m11. Personally, I don't want 
to revert MPTEST-46 as the current way is the way it *should* be. Also, we have 
already adapted our other plugins to it (MPEJB-23, MPWAR-62, jar), so 
internally, we are clean. The only problem is with backward compatibility when 
using third-party plugins that rely on java:compile being called with 
test:test. For this case, there is a simple workaround, eg for the javaapp 
plugin, add the following in your maven.xml:

{code:xml}
<preGoal name="javaapp:jar">
  <j:if test="${unitTestSourcesPresent != 'true' or 
context.getVariable('maven.test.skip') == 'true'}">
    <attainGoal name="java:compile"/>
    <attainGoal name="java:jar-resources"/>
  </j:if>
</preGoal>
{code}

Sources being compiled twice is not a real problem (and btw it was that way 
before already), as the second time only the goal will be called but the 
sources not actually compiled.

So my suggestion is to leave it as is and write a paragraph on the main plugin 
page to document the problem. Unless someone comes up with a new solution, as 
none of the alternatives above seem acceptable to me.

> 1.8 version introduces bug in other plugins
> -------------------------------------------
>
>                 Key: MPTEST-66
>                 URL: http://jira.codehaus.org/browse/MPTEST-66
>             Project: maven-test-plugin
>          Issue Type: Bug
>    Affects Versions: 1.8
>            Reporter: nicolas de loof
>            Assignee: Lukas Theussl
>             Fix For: 1.8.1
>
>         Attachments: MPTEST-66.patch
>
>
> When maven-war-plugin is run with maven.test.skip=true, the sources are not 
> compiled. 
> Latest version of test-plugin has removed prereqs on java:compile & 
> java:jar-resources.
> Assuming other plugins themself run the java:compile goal may have impact on 
> lots of plugin and can break many application builds. I think the "test:test" 
> goal may have a prereqs="java:compile,java:jar-resources", and the 
> "test:compile" goal only prereqs="test:prepare-filesystem,test:test-resources"

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

        

Reply via email to