Re: [M2] Force order of jar files in classpath

2006-04-18 Thread Brett Porter
Andreas,

I think you are missing my point. If you declare this:


  org.testng
  testng
  4.7
  jdk15
  

  bsh
  bsh

  


This will be as if testng did not declare it and yours will be used
instead. It may be a good idea to make it optional in the testng pom
if it really is optional, as well.

I'd certainly be in favour of having testng split this functionality
into a separate JAR to make it simpler, but its not a requirement.
Maybe Jesse K has an opinion?

- Brett

On 4/19/06, Andreas Guther <[EMAIL PROTECTED]> wrote:
> Brett,
>
> Beanshell classes are included in both TestNG jar files (1.4 and 1.5).
> Probably to make the inclusion on the classpath easier.  There are also
> other dependencies included.
>
> It might be better to have different flavors of jar files for TestNG.  I
> often see projects that have a all-dependency jar file in addition to
> "pure" onces we the developer has to include all dependencies and that
> might be a good suggestion for testng as well.
>
> I am going to write an email to the testng user mailing list.
>
> Andreas
>
>
> -Original Message-
> From: Brett Porter [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 17, 2006 5:18 PM
> To: Maven Users List
> Subject: Re: [M2] Force order of jar files in classpath
>
> On 4/18/06, Andreas Guther <[EMAIL PROTECTED]> wrote:
> > 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.
>
> I don't think either are deliberately maintaining the order of the
> pom, and because of transitive dependencies that would be fragile.
> Really what you want is to exclude test NG and its dependencies from
> your eclipse classpath because the eclipse testng plugin already takes
> care of it, right?
>
> Regardless, I'm not sure why the bsh from testng is added to the
> eclipse classpath. That could be a bug, or it could be that it is
> selected in preference to your own and just not seen during testing in
> Maven. Either way, the exclusions in your pom would solve the problem
> in eclipse.
>
> >
> > 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?
> >
>
> Someone has recently proposed contributing it to mojo.codehaus.org.
>
> - Brett
>
> -
> 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]



RE: [M2] Force order of jar files in classpath

2006-04-18 Thread Andreas Guther
Brett,

Beanshell classes are included in both TestNG jar files (1.4 and 1.5).
Probably to make the inclusion on the classpath easier.  There are also
other dependencies included.

It might be better to have different flavors of jar files for TestNG.  I
often see projects that have a all-dependency jar file in addition to
"pure" onces we the developer has to include all dependencies and that
might be a good suggestion for testng as well.

I am going to write an email to the testng user mailing list.

Andreas


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

On 4/18/06, Andreas Guther <[EMAIL PROTECTED]> wrote:
> 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.

I don't think either are deliberately maintaining the order of the
pom, and because of transitive dependencies that would be fragile.
Really what you want is to exclude test NG and its dependencies from
your eclipse classpath because the eclipse testng plugin already takes
care of it, right?

Regardless, I'm not sure why the bsh from testng is added to the
eclipse classpath. That could be a bug, or it could be that it is
selected in preference to your own and just not seen during testing in
Maven. Either way, the exclusions in your pom would solve the problem
in eclipse.

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

Someone has recently proposed contributing it to mojo.codehaus.org.

- Brett

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



Re: [M2] Force order of jar files in classpath

2006-04-17 Thread Brett Porter
On 4/18/06, Andreas Guther <[EMAIL PROTECTED]> wrote:
> 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.

I don't think either are deliberately maintaining the order of the
pom, and because of transitive dependencies that would be fragile.
Really what you want is to exclude test NG and its dependencies from
your eclipse classpath because the eclipse testng plugin already takes
care of it, right?

Regardless, I'm not sure why the bsh from testng is added to the
eclipse classpath. That could be a bug, or it could be that it is
selected in preference to your own and just not seen during testing in
Maven. Either way, the exclusions in your pom would solve the problem
in eclipse.

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

Someone has recently proposed contributing it to mojo.codehaus.org.

- Brett

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



RE: [M2] Force order of jar files in classpath

2006-04-17 Thread Andreas Guther
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.  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]



Re: [M2] Force order of jar files in classpath

2006-04-17 Thread Brett Porter
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.  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]



Re: [M2] Force order of jar files in classpath

2006-04-17 Thread dan tran
best to create a JIRA and state your scenario.

-D


On 4/17/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]
>
>


RE: [M2] Force order of jar files in classpath

2006-04-17 Thread Andreas Guther
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]



RE: [M2] Force order of jar files in classpath

2006-04-17 Thread Jeff Jensen
Is there a way with M1?  We have a "patch jar" that needs to load first.  I
was just in progress with setting this up...
 

-Original Message-
From: dan tran [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 17, 2006 1:50 AM
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]



Re: [M2] Force order of jar files in classpath

2006-04-16 Thread dan tran
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]
>
>