I think this is a known problem, dunno if it's in jira. I know I've experienced something very similar if not out right identical and I *think* there was some discussion of it here a week or two ago. As I recall it has something to do with the goals getting "lost" when the reactor is invoked the second time around.


My workaround is gross and nasty but it'll work until the bug finds itself squashed.

<goal name="install-all">
  ...
  <m:reactor ... goals="reactor-ejb-install" .../>
  ...
/>

Here comes the gross part:

<goal name="reactor-ejb-install">
     <exec executable="${maven.command}"
           failonerror="true"
           >
       <arg value="ejb:install"/>
     </exec>
</goal>

You might need this also:
 <condition property="maven.script" value="maven.bat">
   <and>
     <os family="windows" />
     <equals arg1="${maven.script}" arg2="$${maven.script}" />
   </and>
 </condition>
 <condition property="maven.script" value="maven">
   <equals arg1="${maven.script}" arg2="$${maven.script}" />
 </condition>

<property name="maven.command" value="${maven.home}/bin/${maven.script}"/>


Boris Ekelchik wrote:


I meant "ejb:install", "jar:install" works fine.

-----Original Message-----
From: Boris Ekelchik Sent: Thursday, July 31, 2003 5:16 PM
To: '[EMAIL PROTECTED]'
Subject: install not working with reactor


Top level maven.xml has:

   <goal name="install-all">
       <!-- Install non-EJB jars -->
       <m:reactor basedir="${basedir}"
           includes="*/project.xml"
           excludes="application/ejb/project.xml "
           goals="jar:install"
           banner="Installing JAR files"
           ignoreFailures="false"/>

       <!-- Install EJB jar -->
       <m:reactor basedir="${basedir}"
           includes="application/ejb/project.xml"
           goals="ejb:install"
           banner="Installing EJB JAR file"
           ignoreFailures="false"/>
   </goal>

Everything up to and including "ejb:ejb" goal completes fine, but
ejb:install fails:

[. . .]
ejb:ejb:
   [echo] Building ejb application.ejb-1.0
   [jar] Building jar: C:\cvsroot\v5\target\application.ejb-1.0.jar

BUILD FAILED
File...... file:/c:/cvsroot/v5/
Element... m:reactor
Line...... 36
Column.... 37
Unable to obtain goal [install] --
file:/c:/cvsroot/v5/application/ejb/:13:37: <m:reactor> Unable to obtain
goal [ejb:install] -- file:/C:/Documents and
Settings/boek2827/.maven/plugins/maven-ejb-plugin-1.1-SNAPSHOT/:119:27:
<artifact:install> null

"ejb:install" works just fine when invoked directly:

[. . .]
Copying: from
'c:\cvsroot\v5\application\ejb\..\..\target\application.ejb-1.0.jar' to:
'C:\Documents and
Settings\boek2827\.maven\repository\application\ejbs\application.ejb-1.0.jar
'
BUILD SUCCESSFUL

Is there a workaround for this? Thanks in advance.






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to