This should work better :

     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <configuration>
             <compilerVersion>1.3</compilerVersion>
             <source>1.3</source>
             <target>1.3</target>
<bootclasspath>${pom.getDependencyPath('jara:rt')}</bootclasspath>
       </configuration>
     </plugin>
...

   <dependency>
         <groupId>java</groupId>
         <artifactId>rt</artifactId>
         <version>1.3</version>
         <scope>system</scope>
   </dependency>

Now, how to set the (computer specific) location of the "system" scoped dependency ?

http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html only says the dependency will not be looked-up from repository, but HOW to provide it ?

Nico.


Nicolas De Loof a écrit :

Could it be possible to set this "rt.jar" as a (system ?) dependency, something like this :

<bootclasspath>${getDependencyPath("java:rt:1.3")}</bootclasspath>


Siegmann Daniel, NY a écrit :
I too have had to override the JAVA_HOME JDK, though in my case it was to compile for 1.3 rather than 1.4. What you seem to be missing is setting the
bootclasspath to the correct Java runtime library. Below is the
configuration I use. I hope this helps.

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.3</source>
          <target>1.3</target>
          <compilerArguments>
<bootclasspath>..\..\tools\jdk\1.3.1_15\jre\lib\rt.jar</bootclasspath>
          </compilerArguments>
        </configuration>
      </plugin>

--
Daniel Siegmann
FJA-US, Inc.
(212) 840-2618 ext. 139

-----Original Message-----
From: Mang Jun Lau [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 5:28 PM
To: users@maven.apache.org
Subject: [M2] Compiling with JDK 1.4


Hi,

I've searched and tried the methods given before but things haven't been working for me. My JAVA_HOME points to the 1.5 JDK. I would like to compile my code to be able to run under JDK 1.4. So, in my
<snip>
Hope someone has done this successfully before.  Thanks.


_Mang Lau


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


This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.


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


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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

Reply via email to