| View previous topic :: View next topic |
| Author |
Message |
Arthur Chang Guest
|
Posted: Wed Mar 21, 2007 8:13 am Post subject: Maven compiler source setting |
|
|
Hi all,
Anyone who knows how to set maven compiler source to jdk 1.5 for a Maven
project in JB2007.
tks. |
|
| Back to top |
|
 |
Gillmer J. Derge [TeamB] Guest
|
Posted: Wed Mar 21, 2007 8:14 am Post subject: Re: Maven compiler source setting |
|
|
Arthur Chang wrote:
| Quote: | Anyone who knows how to set maven compiler source to jdk 1.5 for a Maven
project in JB2007.
|
You should be able to put this in your pom.xml.
<properties>
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
</properties>
--
Gillmer J. Derge [TeamB] |
|
| Back to top |
|
 |
dingfelder Guest
|
Posted: Thu Mar 22, 2007 7:57 am Post subject: Re: Maven compiler source setting |
|
|
for example your pom could be:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.yourcompanyname</groupId>
<artifactId>projectname</artifactId>
<version>0.0.1</version>
<description>project description</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>LaunchClassFileName</mainClass>
<classpathPrefix>lib</classpathPrefix>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project> |
|
| Back to top |
|
 |
|