Hello,
I try to develop a maven-script-ant plugin. 
The idea is to migrate my project from an existing ant into a maven2
(2.0.4).

So my first step was to generalize my exising ANT targets and create 
Seperate Maven2 plugins. I do this reading the Guide:
http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html

But then the Problem started with the following ANT-TARGET:
I need to call a java runtime from the ant file with classpath...
A call to the call result in :

[INFO]
----------------------------------------------------------------------------
[INFO] [rexx:edit]

edit-target:
     [java] java.lang.NoClassDefFoundError: de/mytools/Editor
     [java] Exception in thread "main"
     [java] Java Result: 1
[INFO]
------------------------------------------------------------------------


Thanks in advance 
Regards Oliver Stauss


mytools.build.xml:
=============================
<project>
  <target name="edit-target">
    <java classname="de.mytools.Editor" fork="true">
          <arg value="test" />
          <classpath>
            <!-- ?????? -->
          </classpath>
    </java>
  </target>  
</project>
=============================


Mytools.mojos.xml:
=============================
<pluginMetadata>
  <mojos>
    <mojo>
      <goal>edit</goal>        
      <call>edit-target</call>
      <description>Start the Editor</description>
    </mojo>
  </mojos>
</pluginMetadata>
=============================


Pom.xml:
=============================
<project>
  <modelVersion>4.0.0</modelVersion>    
  <name>Editor Plugin</name>  
  <groupId>de.my.plugins</groupId>
  <artifactId>mytools-plugin</artifactId>
  <version>1.0-SNAPSHOT</version>    
  <packaging>maven-plugin</packaging>  
  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-script-ant</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>ant</groupId>
      <artifactId>ant</artifactId>
      <version>1.6.5</version>
    </dependency>  
    <dependency>
      <groupId>de.mytools/groupId>
      <artifactId>mytools</artifactId>
      <version>1.0</version>
    </dependency>
  </dependencies>  
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-tools-ant</artifactId>
            <version>2.0.4</version>
          </dependency>
        </dependencies>
        <configuration>
          <goalPrefix>mytools</goalPrefix>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
=============================



___ |X______________________________________________________________________
   X|

Dipl. Ing. Oliver Stauss
eXXcellent solutions gmbh
In der Wanne 55

D-89075 Ulm

e | [EMAIL PROTECTED]
t | +49 [0]731-55026 -0
f | +49 [0]731-55026 -99
i | http://www.exxcellent.de

____________________________________________________________________________

Geschäftsführer: Dr. Martina Maier, Wilhelm Zorn, Gerhard Gruber
Sitz der Gesellschaft: Ulm, Registergericht: Ulm HRB 4309


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

Reply via email to