You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Guillaume Bilodeau <gb...@yahoo.com> on 2006/06/28 12:41:01 UTC
AspectJ compiler with Java 1.3
Hi all,
I'm asking for your help once again. Our projects are currently compiled using Java 1.3 through a Maven 2.0.4 build. We want to add some aspects (through the new Spring 2.0 tags) and we need to switch to the AspectJ compiler, while still using the Java 1.3 classes as a reference (to avoid using APIs introduced in 1.4+). I've read the plugin documentation and it seems like the only thing we can do is to use the source and target configuration options, which is not sufficient.
Did anyone do anything similar?
Thanks,
GB
Re: AspectJ compiler with Java 1.3
Posted by Kaare Nilsen <ka...@gmail.com>.
On 28/06/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> Well, it's not the tools.jar that needs to be replaced, it's more the rt.jar. If I'm correct, tools.jar contains Sun-specific classes (not available in other JVMs) and rt.jar contains the official JDK classes.
>
> I've seen that the ajc compiler can use a bootclasspath parameter in its standalone form. Can this parameter be sent through the plugin?
Nope..
If you really need it, you must register an issue in the jira for the plugin
http://jira.codehaus.org/browse/MOJO using the aspectj component.
please add the wanted commandline result (you can see the one created
already by setting the -X switch on the mvn command)
>
> Thanks again for your answers,
> GB
>
>
> ----- Original Message ----
> From: Kaare Nilsen <ka...@gmail.com>
> To: Maven Users List <us...@maven.apache.org>
> Sent: Wednesday, June 28, 2006 4:50:08 PM
> Subject: Re: AspectJ compiler with Java 1.3
>
> On 28/06/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> > Yes, this is exactly what I want, but with the AspectJ compiler. The original pom.xml was using the configuration described in this page and was working great - but now we need (want?) to add aspects to the mix. Can this be done?
> > Thanks,
> > GB
>
> the tools.jar dependency is defined as this in the plugin. so I would
> suspect that is not easy to change the tools. jar used by the ajc
> compiler without cutting a new release of the plugin.
> But correct me if I am wrong.
>
> [from aspectj plugin pom.xml]
> ...
> <dependencies>
> <dependency>
> <groupId>com.sun</groupId>
> <artifactId>tools</artifactId>
> <version>1.4.2</version>
> <scope>system</scope>
> <systemPath>${java.home}/../lib/tools.jar</systemPath>
> </dependency>
> </dependencies>
> ...
> [end]
>
>
> >
> > ----- Original Message ----
> > From: Carlos Sanchez <ca...@apache.org>
> > To: Maven Users List <us...@maven.apache.org>
> > Sent: Wednesday, June 28, 2006 3:28:25 PM
> > Subject: Re: AspectJ compiler with Java 1.3
> >
> > I think he's talking about compiling to a different tools.jar,
> > http://maven.apache.org/plugins/maven-compiler-plugin/howto.html
> >
> > On 6/28/06, Kaare Nilsen <ka...@gmail.com> wrote:
> > > On 28/06/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> > > > Hi all,
> > > >
> > > > I'm asking for your help once again. Our projects are currently compiled using Java 1.3 through a Maven 2.0.4 build. We want to add some aspects (through the new Spring 2.0 tags) and we need to switch to the AspectJ compiler, while still using the Java 1.3 classes as a reference (to avoid using APIs introduced in 1.4+). I've read the plugin documentation and it seems like the only thing we can do is to use the source and target configuration options, which is not sufficient.
> > >
> > > Why is that ?
> > > When setting the source and the target to 1.3 or the complianceLevel
> > > option to 1.3 (shorthand which sets -source to 1.3 and -target 1.1).
> > > This should do the trick, and if it does not, it is a bug. Could you
> > > then please send me a testproject that will trigger it ?
> > >
> > > > Did anyone do anything similar?
> > > >
> > > > Thanks,
> > > > GB
> > > >
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > I could give you my word as a Spaniard.
> > No good. I've known too many Spaniards.
> > -- The Princess Bride
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: AspectJ compiler with Java 1.3
Posted by Guillaume Bilodeau <gb...@yahoo.com>.
Well, it's not the tools.jar that needs to be replaced, it's more the rt.jar. If I'm correct, tools.jar contains Sun-specific classes (not available in other JVMs) and rt.jar contains the official JDK classes.
I've seen that the ajc compiler can use a bootclasspath parameter in its standalone form. Can this parameter be sent through the plugin?
Thanks again for your answers,
GB
----- Original Message ----
From: Kaare Nilsen <ka...@gmail.com>
To: Maven Users List <us...@maven.apache.org>
Sent: Wednesday, June 28, 2006 4:50:08 PM
Subject: Re: AspectJ compiler with Java 1.3
On 28/06/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> Yes, this is exactly what I want, but with the AspectJ compiler. The original pom.xml was using the configuration described in this page and was working great - but now we need (want?) to add aspects to the mix. Can this be done?
> Thanks,
> GB
the tools.jar dependency is defined as this in the plugin. so I would
suspect that is not easy to change the tools. jar used by the ajc
compiler without cutting a new release of the plugin.
But correct me if I am wrong.
[from aspectj plugin pom.xml]
...
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.4.2</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
...
[end]
>
> ----- Original Message ----
> From: Carlos Sanchez <ca...@apache.org>
> To: Maven Users List <us...@maven.apache.org>
> Sent: Wednesday, June 28, 2006 3:28:25 PM
> Subject: Re: AspectJ compiler with Java 1.3
>
> I think he's talking about compiling to a different tools.jar,
> http://maven.apache.org/plugins/maven-compiler-plugin/howto.html
>
> On 6/28/06, Kaare Nilsen <ka...@gmail.com> wrote:
> > On 28/06/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> > > Hi all,
> > >
> > > I'm asking for your help once again. Our projects are currently compiled using Java 1.3 through a Maven 2.0.4 build. We want to add some aspects (through the new Spring 2.0 tags) and we need to switch to the AspectJ compiler, while still using the Java 1.3 classes as a reference (to avoid using APIs introduced in 1.4+). I've read the plugin documentation and it seems like the only thing we can do is to use the source and target configuration options, which is not sufficient.
> >
> > Why is that ?
> > When setting the source and the target to 1.3 or the complianceLevel
> > option to 1.3 (shorthand which sets -source to 1.3 and -target 1.1).
> > This should do the trick, and if it does not, it is a bug. Could you
> > then please send me a testproject that will trigger it ?
> >
> > > Did anyone do anything similar?
> > >
> > > Thanks,
> > > GB
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
> -- The Princess Bride
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: AspectJ compiler with Java 1.3
Posted by Kaare Nilsen <ka...@gmail.com>.
On 28/06/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> Yes, this is exactly what I want, but with the AspectJ compiler. The original pom.xml was using the configuration described in this page and was working great - but now we need (want?) to add aspects to the mix. Can this be done?
> Thanks,
> GB
the tools.jar dependency is defined as this in the plugin. so I would
suspect that is not easy to change the tools. jar used by the ajc
compiler without cutting a new release of the plugin.
But correct me if I am wrong.
[from aspectj plugin pom.xml]
...
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.4.2</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
...
[end]
>
> ----- Original Message ----
> From: Carlos Sanchez <ca...@apache.org>
> To: Maven Users List <us...@maven.apache.org>
> Sent: Wednesday, June 28, 2006 3:28:25 PM
> Subject: Re: AspectJ compiler with Java 1.3
>
> I think he's talking about compiling to a different tools.jar,
> http://maven.apache.org/plugins/maven-compiler-plugin/howto.html
>
> On 6/28/06, Kaare Nilsen <ka...@gmail.com> wrote:
> > On 28/06/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> > > Hi all,
> > >
> > > I'm asking for your help once again. Our projects are currently compiled using Java 1.3 through a Maven 2.0.4 build. We want to add some aspects (through the new Spring 2.0 tags) and we need to switch to the AspectJ compiler, while still using the Java 1.3 classes as a reference (to avoid using APIs introduced in 1.4+). I've read the plugin documentation and it seems like the only thing we can do is to use the source and target configuration options, which is not sufficient.
> >
> > Why is that ?
> > When setting the source and the target to 1.3 or the complianceLevel
> > option to 1.3 (shorthand which sets -source to 1.3 and -target 1.1).
> > This should do the trick, and if it does not, it is a bug. Could you
> > then please send me a testproject that will trigger it ?
> >
> > > Did anyone do anything similar?
> > >
> > > Thanks,
> > > GB
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
> -- The Princess Bride
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: AspectJ compiler with Java 1.3
Posted by Guillaume Bilodeau <gb...@yahoo.com>.
Yes, this is exactly what I want, but with the AspectJ compiler. The original pom.xml was using the configuration described in this page and was working great - but now we need (want?) to add aspects to the mix. Can this be done?
Thanks,
GB
----- Original Message ----
From: Carlos Sanchez <ca...@apache.org>
To: Maven Users List <us...@maven.apache.org>
Sent: Wednesday, June 28, 2006 3:28:25 PM
Subject: Re: AspectJ compiler with Java 1.3
I think he's talking about compiling to a different tools.jar,
http://maven.apache.org/plugins/maven-compiler-plugin/howto.html
On 6/28/06, Kaare Nilsen <ka...@gmail.com> wrote:
> On 28/06/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> > Hi all,
> >
> > I'm asking for your help once again. Our projects are currently compiled using Java 1.3 through a Maven 2.0.4 build. We want to add some aspects (through the new Spring 2.0 tags) and we need to switch to the AspectJ compiler, while still using the Java 1.3 classes as a reference (to avoid using APIs introduced in 1.4+). I've read the plugin documentation and it seems like the only thing we can do is to use the source and target configuration options, which is not sufficient.
>
> Why is that ?
> When setting the source and the target to 1.3 or the complianceLevel
> option to 1.3 (shorthand which sets -source to 1.3 and -target 1.1).
> This should do the trick, and if it does not, it is a bug. Could you
> then please send me a testproject that will trigger it ?
>
> > Did anyone do anything similar?
> >
> > Thanks,
> > GB
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
-- The Princess Bride
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: AspectJ compiler with Java 1.3
Posted by Carlos Sanchez <ca...@apache.org>.
I think he's talking about compiling to a different tools.jar,
http://maven.apache.org/plugins/maven-compiler-plugin/howto.html
On 6/28/06, Kaare Nilsen <ka...@gmail.com> wrote:
> On 28/06/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> > Hi all,
> >
> > I'm asking for your help once again. Our projects are currently compiled using Java 1.3 through a Maven 2.0.4 build. We want to add some aspects (through the new Spring 2.0 tags) and we need to switch to the AspectJ compiler, while still using the Java 1.3 classes as a reference (to avoid using APIs introduced in 1.4+). I've read the plugin documentation and it seems like the only thing we can do is to use the source and target configuration options, which is not sufficient.
>
> Why is that ?
> When setting the source and the target to 1.3 or the complianceLevel
> option to 1.3 (shorthand which sets -source to 1.3 and -target 1.1).
> This should do the trick, and if it does not, it is a bug. Could you
> then please send me a testproject that will trigger it ?
>
> > Did anyone do anything similar?
> >
> > Thanks,
> > GB
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
-- The Princess Bride
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: AspectJ compiler with Java 1.3
Posted by Guillaume Bilodeau <gb...@yahoo.com>.
For example, one class in our project implements java.sql.Connection. A method was added to this interface in Java 1.4 (or 5.0?) and so compiling this class with -source 1.3 and -target 1.3 gives the following error:
D:\dev\workspace\promo-head\server\src\main\java\promo\util\xsql\XConnection.java:[19,7] promo.util.xsql.XConnection is not abstract and does not override abstract method prepareStatement(java.lang.String,java.lang.String[]) in java.sql.Connection
There are similar errors, all related to the java.sql and javax.sql interfaces.
I've read that it's a question of changing the boot classpath, but I could be mistaken.
Thanks,
GB
----- Original Message ----
From: Kaare Nilsen <ka...@gmail.com>
To: Maven Users List <us...@maven.apache.org>
Sent: Wednesday, June 28, 2006 3:11:33 PM
Subject: Re: AspectJ compiler with Java 1.3
On 28/06/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> Hi all,
>
> I'm asking for your help once again. Our projects are currently compiled using Java 1.3 through a Maven 2.0.4 build. We want to add some aspects (through the new Spring 2.0 tags) and we need to switch to the AspectJ compiler, while still using the Java 1.3 classes as a reference (to avoid using APIs introduced in 1.4+). I've read the plugin documentation and it seems like the only thing we can do is to use the source and target configuration options, which is not sufficient.
Why is that ?
When setting the source and the target to 1.3 or the complianceLevel
option to 1.3 (shorthand which sets -source to 1.3 and -target 1.1).
This should do the trick, and if it does not, it is a bug. Could you
then please send me a testproject that will trigger it ?
> Did anyone do anything similar?
>
> Thanks,
> GB
Re: AspectJ compiler with Java 1.3
Posted by Kaare Nilsen <ka...@gmail.com>.
On 28/06/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> Hi all,
>
> I'm asking for your help once again. Our projects are currently compiled using Java 1.3 through a Maven 2.0.4 build. We want to add some aspects (through the new Spring 2.0 tags) and we need to switch to the AspectJ compiler, while still using the Java 1.3 classes as a reference (to avoid using APIs introduced in 1.4+). I've read the plugin documentation and it seems like the only thing we can do is to use the source and target configuration options, which is not sufficient.
Why is that ?
When setting the source and the target to 1.3 or the complianceLevel
option to 1.3 (shorthand which sets -source to 1.3 and -target 1.1).
This should do the trick, and if it does not, it is a bug. Could you
then please send me a testproject that will trigger it ?
> Did anyone do anything similar?
>
> Thanks,
> GB
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org