Hi All,

I'm migrating a project from maven 1 to maven 2. It's a BIG jelly based 
project, having a main module with 20 sub-modules.
So, I'm using a set of plugins to do my stuffs and I'm using also 
maven-antrun-plugin to do some other stuffs.

I have in one sub-module :

       <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-antrun-plugin</artifactId>
             <version>1.1</version>
             <executions>

                 <execution>
                      <id>compile-something</id>
                      <phase>test-compile</phase>
                      <configuration>
                          <tasks>
                              <javac --> something here
                              </javac>
                      </tasks>
                    </configuration>
                    <goals>
                        <goal>run</goal>
                    </goals>
                  </execution>

                  <execution>
                      <id>run-something</id>
                      <phase>test</phase>
                      <configuration>
                          <tasks>
                              <java --> something here
                              </java>
                      </tasks>
                    </configuration>
                    <goals>
                        <goal>run</goal>
                    </goals>
                  </execution>

             </executions>
             <dependencies>
               <dependency>
                 <groupId>com.sun</groupId>
                 <artifactId>tools</artifactId>
                 <version>1.4.2</version>
                 <scope>compile</scope>
               </dependency>
             </dependencies>
        </plugin>

When I run mvn install inside this subproject, everything workes fine, but if I 
try to run from the root project, the execution will fail like this :

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: 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
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant 
tasks
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)


Looks like it's loosing the class path references when I run from the master 
project... 
Does anybory have any idea about this ?

Thx in advance,
Marcio



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to