Board index » jbuilder » Maven compiler source setting

Maven compiler source setting


2007-03-21 11:13:31 AM
jbuilder13
Hi all,
Anyone who knows how to set maven compiler source to jdk 1.5 for a Maven
project in JB2007.
tks.
 
 

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]
 

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>
 

{smallsort}