<plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                                <execution>
                                        <id>build_xu</id>
                                        <phase>generate_libraries</phase>
                                        <configuration>
                                                <tasks>
                                                        <property 
refid="maven.compile.classpath" name="mvndepClasspath" />
                                                        <property name="source" 
value="1.4"/>
                                                        <property name="target" 
value="1.4"/>
                                                        <property 
environment="env" />
                                                        
                                                        <taskdef 
resource="net/sf/antcontrib/antcontrib.properties" 
classpath="${mvndepClasspath}" />
                                                        
                                                        <condition 
property="isWindows">
                                                                <os 
family="windows" />
                                                        </condition>
                                                        <condition 
property="isUnix">
                                                                <os 
family="unix" />
                                                        </condition>

                                                        <if>
                                                                <equals 
arg1="${isUnix}" arg2="true" />
                                                                <then>
                                                                        
<property name="antPath" value="${env.ANT_HOME}/bin/ant"/>
                                                                        
<property name="jdkPath" value="${basedir}/../../../tools/unix/jdk160_05"/>
                                                                </then>
                                                        </if>
                                                        <if>
                                                                <equals 
arg1="${isWindows}" arg2="true" />
                                                                <then>
                                                                        
<property name="antPath" value="${env.ANT_HOME}/bin/ant.bat"/>
                                                                        
<property name="jdkPath" value="${basedir}\..\..\..\tools\windows\jdk160_05"/>
                                                                </then>
                                                        </if>
                                                        <echo>Compiling 
client.exchangeutility using JDK: ${jdkPath}</echo>
                                                        <exec dir="${basedir}" 
executable="${antPath}" failonerror="true">

                                                                <arg 
line="build" />
                                                                <env 
key="JAVA_HOME" value="${jdkPath}"/>
                                                        </exec>
                                                </tasks>
                                        </configuration>
                                        <goals>
                                                <goal>run</goal>
                                        </goals>
                                </execution>
                        </executions>
                </plugin>


--- On Wed, 2/11/09, Mick Knutson <[email protected]> wrote:

> From: Mick Knutson <[email protected]>
> Subject: Re: Can maven-antrun-plugin run before code compiled?
> To: "Maven Users List" <[email protected]>
> Date: Wednesday, February 11, 2009, 4:18 PM
> Please include your plugin setting?
> 
> ---
> Thank You…
> 
> Mick Knutson, President
> 
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile
> Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
> 
> Website: http://baselogic.com
> Linked IN: http://linkedin.com/in/mickknutson
> Twitter: http://twitter.com/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
> 
> 
> 
> On Wed, Feb 11, 2009 at 3:51 PM, Mike Wallace
> <[email protected]>wrote:
> 
> >
> > I have a java project where the code depends on
> several libraries being
> > built.
> > What I'd like to do is have Maven run an Ant task
> that builds those
> > libraries first, then Maven would go on to compile the
> code.
> >
> > Currently, my pom file contains the
> maven-antrun-plugin plugin that should
> > execute the ant task.  However, when I run it, I get
> compile errors because
> > I think it's trying to compile the java code
> first, but because the ant task
> > hasn't been run yet, there are no libraries
> available and it will obviously
> > fail.
> >
> > This make sense?
> >
> > Thanks,
> > Mike
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [email protected]
> > For additional commands, e-mail:
> [email protected]
> >
> >




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to