You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendell Beckwith <We...@intervoice.com> on 2005/05/27 18:07:44 UTC

How to compile java 1.5 source with maven2

Is it possible to compile jdk 1.5 code with maven2?  I have added a
pom.xml and a project.properties file to my project and set
"maven.compile.source=1.5" in the properties file, but I still get the
following error when compiling.
 
D:\dev\workspace\MyProject\src\main\java\com\intervoice\core\internal\ap
plication\Understand.java:[29,-1]  generics are not supported in -source
1.3
 
Wb
 

This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are the intended recipient, you must treat the information in confidence and in accordance with all laws related to the privacy and confidentiality of such information.  If you are not the intended recipient or their designee, please notify the sender immediately by return e-mail and delete all copies of this email, including all attachments.

Re: How to compile java 1.5 source with maven2

Posted by Hugo Palma <hp...@digitalis.pt>.
Put this in your pom.xml file:

<build>
<plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
        </plugins>
</build>

Cheers

Hugo



Wendell Beckwith wrote:

>Is it possible to compile jdk 1.5 code with maven2?  I have added a
>pom.xml and a project.properties file to my project and set
>"maven.compile.source=1.5" in the properties file, but I still get the
>following error when compiling.
> 
>D:\dev\workspace\MyProject\src\main\java\com\intervoice\core\internal\ap
>plication\Understand.java:[29,-1]  generics are not supported in -source
>1.3
> 
>Wb
> 
>
>This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are the intended recipient, you must treat the information in confidence and in accordance with all laws related to the privacy and confidentiality of such information.  If you are not the intended recipient or their designee, please notify the sender immediately by return e-mail and delete all copies of this email, including all attachments.
>  
>