I tried that within my java project:
System.out.println(System.property(..))
Unfortunately, it's not working.
All I see is a global classpath which points to a Maven jar.
Maven is using a customized classloader, so it's hard to get the
module-specific classpath.

When using the '-X' switch, the only difference that I can see is that a
dependent project gets the status 'active' when executing the test from
a parent project. This prevents the test from finding some resources
from the parents.

How does it affect the classpath if a module is active?

Marcus

> -----Original Message-----
> From: Eric Redmond [mailto:[EMAIL PROTECTED]
> Sent: Montag, 20. November 2006 16:12
> To: Maven Users List
> Subject: Re: Classpath
> 
> 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

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

Reply via email to