Removing JDK from compile classpath

2012-07-06 Thread Manfred Moser
Hi!

Some users of the Android Maven plugin are having trouble with the
compilation because the android.jar that includes all classes from harmony
is on the classpath together with the Oracle JDK.

When method signatures between the two differ e.g. like mentioned here

http://stackoverflow.com/questions/11250352/base-java-classes-still-in-the-classpath-during-maven-android-build/

it seems the compiler plugin always uses the JDK methods first and
compilation fails.

Is there a way to configure the compiler plugin to remove the JDK itself
from the compliation classpath to fix this problem? Or could some sort of
patch of the compiler plugin achieve that?

It must be possible somehow since the Ant build and the respective Javac
invocation can build these apps just fine..

Any ideas would be greatly appreciated.

manfred

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: Removing JDK from compile classpath

2012-07-06 Thread Robert Scholte

There are two things I'm thinking of, not sure if they will work:
1. Use toolchains [1]
2. Specify a compilerId, which would also mean writing the implementation  
for it. [2] [3]


-Robert

[1] http://maven.apache.org/guides/mini/guide-using-toolchains.html
[2]  
http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#compilerId

[3] http://plexus.codehaus.org/plexus-components/plexus-compiler/

Op Fri, 06 Jul 2012 23:13:11 +0200 schreef Manfred Moser  
manf...@mosabuam.com:



Hi!

Some users of the Android Maven plugin are having trouble with the
compilation because the android.jar that includes all classes from  
harmony

is on the classpath together with the Oracle JDK.

When method signatures between the two differ e.g. like mentioned here

http://stackoverflow.com/questions/11250352/base-java-classes-still-in-the-classpath-during-maven-android-build/

it seems the compiler plugin always uses the JDK methods first and
compilation fails.

Is there a way to configure the compiler plugin to remove the JDK itself
from the compliation classpath to fix this problem? Or could some sort of
patch of the compiler plugin achieve that?

It must be possible somehow since the Ant build and the respective Javac
invocation can build these apps just fine..

Any ideas would be greatly appreciated.

manfred

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: Removing JDK from compile classpath

2012-07-06 Thread Manfred Moser
Thanks... I will look into this.

On Fri, July 6, 2012 2:28 pm, Robert Scholte wrote:
 There are two things I'm thinking of, not sure if they will work:
 1. Use toolchains [1]
 2. Specify a compilerId, which would also mean writing the implementation
 for it. [2] [3]

 -Robert

 [1] http://maven.apache.org/guides/mini/guide-using-toolchains.html
 [2]
 http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#compilerId
 [3] http://plexus.codehaus.org/plexus-components/plexus-compiler/

 Op Fri, 06 Jul 2012 23:13:11 +0200 schreef Manfred Moser
 manf...@mosabuam.com:

 Hi!

 Some users of the Android Maven plugin are having trouble with the
 compilation because the android.jar that includes all classes from
 harmony
 is on the classpath together with the Oracle JDK.

 When method signatures between the two differ e.g. like mentioned here

 http://stackoverflow.com/questions/11250352/base-java-classes-still-in-the-classpath-during-maven-android-build/

 it seems the compiler plugin always uses the JDK methods first and
 compilation fails.

 Is there a way to configure the compiler plugin to remove the JDK itself
 from the compliation classpath to fix this problem? Or could some sort
 of
 patch of the compiler plugin achieve that?

 It must be possible somehow since the Ant build and the respective Javac
 invocation can build these apps just fine..

 Any ideas would be greatly appreciated.

 manfred

 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org

 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org