J'utilise le plugin antrun pour pouvoir lancer une tache ant.

Voici le code dans le pom :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>compile</id>
            <phase>compile</phase>
            <configuration>
              <tasks>
                <ant antfile="build.xml" inheritRefs="true">
                  <target name="dist"/>
                </ant>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
Malheureusement j'ai un problème lors de cette tâche :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
[INFO] [antrun:run {execution: compile}]
[INFO] Executing tasks
 
compile:
    [javac] Compiling 1 source file to C:\Program Files\Apache Software Foundation\continuum-1.0.3\apps\continuum\working-directory\24\build
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks
 
Embedded error: The following error occurred while executing this line:
C:\Program Files\Apache Software Foundation\continuum-1.0.3\apps\continuum\working-directory\24\build.xml:10: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
Je suis sous Windows XP

Mes variables systèmes sont les suivantes :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
 
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_01
CLASSPATH=.;%JAVA_HOME%\lib\tools.jar
PAHT=[...];%JAVA_HOME\bin
Merci d'avance