jar:jar has a pre-req of test:test

test:test has a pre-req of test:compile

test:compile has a pre-req of 
java:compile,java:jar-resources,test:prepare-filesystem,test:test-resources

Can you post your project.xml?
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/


John Farrell <[EMAIL PROTECTED]> wrote on 05/08/2003 04:48:03 PM:

> I am running maven beta 10, and cannot get resources copied into my jar 
file. 
> I have made extensive investigations. In the POM, I have this:
> 
>     <resources>
>       <resource>
>         <directory>${basedir}/src/res</directory>
>         <includes>
>           <include>*.properties</include>
>         </includes>
>       </resource>
>     </resources>
> 
> I found this goal which seems to copy resources as I need:
> 
>   <goal name="java:jar-resources"
>         description="Copy any resources that must be present in the 
deployed 
> JAR file">
> 
>     <j:if test="${!pom.build.resources.isEmpty()}">
>       <echo>${pom.build.resources}</echo>
>       <resources:copy
>         resources="${pom.build.resources}"
>         todir="${maven.build.dest}"
>       />
>     </j:if>
>   </goal>
> 
> Notice I have added an echo there, so when I do "maven 
java:jar-resources", I 
> get:
> 
> java:jar-resources:
>     [echo] [[dir = /home/john/mainline/mp-base/src/res]]
> BUILD SUCCESSFUL
> 
> It looks to me as if the setting in the POM is accessible from 
> java:jar-resources. But what calls java:jar-resources? java:jar does 
not, it 
> just calls jar:jar. jar:jar does not. Nothing seems to, actually.
> 
> I tried adding a preGoal to maven.xml, 
> 
>     <preGoal name="jar:jar">
>       <attainGoal name="java:jar-resources" />
>     </preGoal>
> 
> but that didn't seem to achieve it, because there are still no resources 
in 
> the jar. Could someone please advise on how it's supposed to work, and 
what 
> I'm doing wrong? Thanks,
> 
> John
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to