Maven 1.x EJB Plugin

ejb:init does not compile java code if tests are not run

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.7.3
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

When there are no tests, or maven.test.skip=true, then the build classes and resources are not included in the ejb jar file.

As a workaround, you can set java:compile and java:jar-resources as preGoals for ejb:ejb in your maven.xml:

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

Issue Links

Activity

Hide
Shinobu Kawai added a comment -

Patch to fix bug.

Show
Shinobu Kawai added a comment - Patch to fix bug.
Hide
dion gillard added a comment -

This is a showstopper for another 1.1 beta release for me, as well.

Show
dion gillard added a comment - This is a showstopper for another 1.1 beta release for me, as well.
Hide
Shinobu Kawai added a comment -

This should be revisited once MPTEST-66 is fixed one way or another.

Show
Shinobu Kawai added a comment - This should be revisited once MPTEST-66 is fixed one way or another.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: