Brent,

Thanks for the immediate response!

Let me see if I understand this correctly. What you're saying is that
the only JDK M2
ever needs to know about the the one running it, and that needs to be
at least 1.4.

In my case, I have specified to the 1.4 compiler that I want it to
generate code that
will run in a 1.3 JVM. How am I doing so far?

I'm not sure what the conclusion is though. Are you saying:

A) In some circumstances, based on the specific 1.3 runtime JVM, the
code generated by the 1.4 compiler will not successfully run?

B) In some cases, based on the code generated by the 1.4 compiler, the
generated code will not successfully run in a 1.3 JVM?

C) There is a bug in the M2 compiler plugin that will be fixed at some
point, that will enable A dn/or B to work?

D) None of the above. Some completely different meaning.

Looking forward to better understanding this issue.
Thanks, Derek

On 8/4/05, Brett Porter <[EMAIL PROTECTED]> wrote:
> Hi Derek,
> 
> Those settings will generate code that will run on a 1.3 JVM. It is
> built with the 1.4 JVM you ran under, and there is a risk under some
> specific conditions that it might have an incompatiblity in the Java
> runtime. If you are able to test completely under 1.3 then this would
> be sufficient.
> 
> To guarantee it, you should fork the compiler and use your target JDK
> directly. However, the compiler plugin doesn't support this just yet -
> we are planning to work on such enhancements very soon.
> 
> - Brett
> 
> On 8/4/05, Derek Lane <[EMAIL PROTECTED]> wrote:
> > Howdy Folks,
> >
> > I'm in the process of trying to convert a rather hefty existing
> > codebase to M2. This codebase
> > needs to generate JARs, WARs, and EARs, as well as numerous
> > configuration and property
> > files. However I need to compile all of this using JDK 1.3, and of
> > course M2 requires 1.4.
> >
> > I have M2 successfully installed, and it seems to be working find for
> > small, sample projects.
> > I have JAVA_HOME set to my JDK 1.4 installation before running M2.
> >
> > According to the M2 FAQ and the only threads I could find from
> > searching the archives, in
> > order to use JDK 1.3 w/ M2, I need to specify the desired JDK in the
> > <configurarion> element
> > for the maven-compiler-plugin. Here's what I've done:
> >
> > <project>
> >  <--- top level elements including dependencies. -->
> >
> >   <build>
> >     <plugins>
> >       <plugin>
> >         <groupId>org.apache.maven.plugins</groupId>
> >         <artifactId>maven-compiler-plugin</artifactId>
> >         <configuration>
> >           <source>1.3</source>
> >           <target>1.3</target>
> >         </configuration>
> >       </plugin>
> >     </plugins>
> >   </build>
> > </project>
> >
> > From what I can tell, this is how I should tell M2 to use the 1.3 JDK
> > to compile the code.
> > This seems to execute successfully, however when I look at the
> > MANIFEST.MF for the
> > generated JAR file after doing a "m2 install" I see:
> >
> > Manifest-Version: 1.0
> > Archiver-Version: Plexus Archiver
> > Created-By: Apache Maven
> > Build-Jdk: 1.4.2_08
> >
> > Which leads me to believe that the 1.4 JDK which is running M2 is
> > being used for the
> > compile, NOT the 1.3 JDK I specified.
> >
> > This leads me to at least a couple of questions:
> >
> > 1) Do I have the 1.3 JDK specified correctly?
> >
> > 2) If so, does the 1.4 JDK generate 1.3 code, or do I need to tell M2
> > where JAVE_HOME is
> > for the 1.3 JDK?
> >
> > 3) Is there something else I'm completely missing about how this
> > works, and how I need
> > to configure M2 or my POM?
> >
> > Thanks, Derek
> >
> > ---------------------------------------------------------------------
> > 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