Try something like this in your POM (or external profiles.xml file... which
would probably be better)

<build>
 <plugins>
   <plugin>
     <artifactId>maven-antrun-plugin</artifactId>
     <executions>
       <execution>
         <goals><goal>run</goal></goals>
         <phase>compile<phase>
       </execution>
       <execution>
         <goals><goal>run</goal></goals>
         <phase>test<phase>
       </execution>
     </executions>
     <configuration>
       <tasks><echo>java.class.path=${java.class.path}
</echo><echo>CLASSPATH=${env.CLASSPATH}</echo></tasks>
     </configuration>
   ...

Eric

On 11/20/06, Deluigi Marcus <[EMAIL PROTECTED]> wrote:

We ported an existing project from ant to maven and it seems as if the
classpath of one module is different to the classpath to the parent
modules which causes the junit tests to fail in the parent modules.

Since the junit tests fail, it is not possible to proceed to the install
phase.
I was hoping to be able to print the java class path for the compile
phase and the test phase separately.

Greetings,
Marcus

> -----Original Message-----
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]
> Sent: Montag, 20. November 2006 15:03
> To: Maven Users List
> Subject: Re: Classpath
>
> On 11/20/06, Deluigi Marcus <[EMAIL PROTECTED]> wrote:
>
> > It seems like a stupid question, but how do I let maven print the
actual
> > class path within a specific module?
> > I did not find any information about this anywhere.
>
> If you add -X to the command line:
>
>   mvn install -X
>
> it will print out more than you ever wanted to know, including a tree
> view of the dependencies, and, underneath,
>
> [DEBUG] Configuring mojo
> 'org.apache.maven.plugins:maven-compiler-plugin:2.0.1:compile' -->
>
> one of the items is classpathElements.
>
> HTH,
> --
> Wendy
>
> ---------------------------------------------------------------------
> 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]




--
Eric Redmond
http://codehaus.org/~eredmond

Reply via email to