attached are the pom.xml and build.xml files. 
run ant, generates the abc2 folder, but
run mvn antrun:run, generates nothing.

  ----- Original Message ----- 
  From: Qiner Yang 
  To: users@maven.apache.org 
  Sent: Tuesday, June 30, 2009 11:36 AM
  Subject: help: antrun does not do anything


  Because some functions not available or not easily accomplishable in maven, 
so I turned to the antrun in maven. But I can never get the antrun working, 
please help me out. 

  I read the Maven AntRun Plugnin page, 
http://maven.apache.org/plugins/maven-antrun-plugin/, and followed all the 
instructions and tried all the examples in the examples section,  
http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.html. 
But nothing is generated from the antrun. I tried a very simple ant command, 
<mkdir dir="abc" />, or an ant task                 
  <ant antfile="build.xml">
      <target name="test"/>
  </ant>
  between the maven <tasks>. The ant "test target" is to make a directory, 
which works fine when issuing "ant test", but nothing happen in mvn. Strange, 
the mvn command shows execution successful, see below:
  [INFO] Scanning for projects...
  [INFO] 
------------------------------------------------------------------------
  [INFO] Building RTJDBC
  [INFO]    task-segment: [antrun:run]
  [INFO] 
------------------------------------------------------------------------
  [INFO] [antrun:run]
  [INFO] Executing tasks
  [INFO] Executed tasks
  [INFO] 
------------------------------------------------------------------------
  [INFO] BUILD SUCCESSFUL
  [INFO] 
------------------------------------------------------------------------
  [INFO] Total time: 1 second
  [INFO] Finished at: Tue Jun 30 11:04:56 PDT 2009
  [INFO] Final Memory: 2M/5M
  [INFO] 
------------------------------------------------------------------------

  I tried removing the antrun plugin from the pom.xml, the mvn antrun output is 
exactly the same as above. Got confused.
  thanks for any help.

  Qiner
<project>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>my-test-app</artifactId>
  <groupId>my-test-group</groupId>
  <version>1.0-SNAPSHOT</version>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>compile</id>
            <phase>compile</phase>
            <configuration>
              <tasks>
				<mkdir dir="abc" />
				<ant />
				<ant antfile="build.xml">
				    <target name="test"/>
				</ant>				
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
<project name="" basedir="." default="test">  	
    <target name="test">
		<mkdir dir="abc2"/>
    </target>

</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to