Brett,

To be more clear I have to explain that I do not encounter the problem
during the Maven 2 build process.  TestNG is not included in the compile
scope but only in the test scope.

The problem occurred while creating the classpath for Eclipse with the
eclipse plug-in.  Since eclipse does not distinguish between scopes all
gets put on the classpath as generated to the .classpath file.  After
moving the reference to the testng jar to the end of the classpath
entries in the .classpath file I got rid of the problem.  Now that I
write this down I realize that the problem does not occure with IntelliJ
and I suppose that the IntelliJ plug-in keeps the order as listed in the
pom.

Maybe it is indeed in this particular case a problem with the eclipse
plug-in and the request should go against the eclipse plug-in to honor
the order of dependencies within the pom.xml.

Regarding jaxb:  I am using the xjc with a modified jaxb2-maven-plugin.
I have removed in the modified plug-in all Java 5 usage in order to get
it to run with Jaxb1.

Is there another jaxb1 plug-in available that might do the job for me?

Andreas


-----Original Message-----
From: Brett Porter [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 17, 2006 4:32 PM
To: Maven Users List
Subject: Re: [M2] Force order of jar files in classpath

This is nothing to do with order - things should not be included
twice. I don't think that is actually happening - instead, TestNG's is
being selected over your one which must have been pulled in
transitively. <exclusions/> in the testng dependency for beanshell is
the appropriate change to the pom.

I'm not sure about the jaxb 1 scenario. I've never encountered it. Is
that while running the pap, or xjc?

- Brett

On 4/18/06, Andreas Guther <[EMAIL PROTECTED]> wrote:
> One problem I have is that I am using TestNG as unit test framework.
> TestNG is using Beanshell with a most recent version.  Our product is
> using Beanshell as well, but for some reason we have to go with an
older
> version.  If TestNG is in the classpath first, the compiler cannot
find
> classes available in the older version that are not available in the
> newer version or moved to other folders.  In that case I get a
> compilation error.
>
> Another problem I recently had to deal with and had to give up with
> Maven 2 is using Jaxb 1 with JDK 5 and JDK 1.4.  JDK 5 has some
classes
> per default that are not available under Java 1.4.  Since I am not
able
> to force the order of the classpath, I was not able to solve the
problem
> with Maven 2 and Java 1.4 and the lib files that come with the Jaxb 1
> distribution.
>
> I think from time to time there will be situations where it is
desirable
> to force the order of jars within the classpath.
>
> Andreas
>
>
> -----Original Message-----
> From: dan tran [mailto:[EMAIL PROTECTED]
> Sent: Sunday, April 16, 2006 11:50 PM
> To: Maven Users List
> Subject: Re: [M2] Force order of jar files in classpath
>
> There is no way to do that in maven2,  Just wonder,  What is your
> usecase
> that requires this
> feature.
>
> -D
>
> On 4/16/06, Andreas Guther <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I am encountering different situations where it would be helpful to
> force
> > the order of the jar files within the classpath.  So far I could not
> figure
> > out if Maven 2 allows this to configure at all as well as how the
> order of
> > the jar files is compiled from the dependency section.  Is this
> arbitrary?
> >
> > Is there a mechanism that allows defining the order of jar files
> within
> > the classpath?
> >
> > Andreas
> >
> >
> >
> >
> >
> >
> >
---------------------------------------------------------------------
> > 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]
>
>

---------------------------------------------------------------------
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]

Reply via email to