You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kevin TierOne <ke...@gmail.com> on 2007/12/10 18:30:35 UTC

setting compiler options for all modules

Hello,

I'm looking for a way to set compiler options for all of my modules.
My application structure looks something like this.


root/pom.xml
root/app1/pom.xml
root/app2/pom.xml
root/app3/pom.xml

I currently have the following text pasted in the pom files in each
app directory.
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                    <debug>false</debug>
                </configuration>
            </plugin>


Is there a way to set the <source>, <target>, and <debug> parameters
in a single place so they are not copied in all 3 pom files?  Is it
possible to define these parameters in the root/pom.xml?

Thank you.
Kevin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: setting compiler options for all modules

Posted by Jeff MAURY <je...@jeffmaury.com>.
Define root/pom.xml as the parent for your sub poms.

Jeff



On 12/10/07, Kevin TierOne <ke...@gmail.com> wrote:
>
> Hello,
>
> I'm looking for a way to set compiler options for all of my modules.
> My application structure looks something like this.
>
>
> root/pom.xml
> root/app1/pom.xml
> root/app2/pom.xml
> root/app3/pom.xml
>
> I currently have the following text pasted in the pom files in each
> app directory.
>        <plugins>
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-compiler-plugin</artifactId>
>                <configuration>
>                    <source>1.5</source>
>                    <target>1.5</target>
>                    <debug>false</debug>
>                </configuration>
>            </plugin>
>
>
> Is there a way to set the <source>, <target>, and <debug> parameters
> in a single place so they are not copied in all 3 pom files?  Is it
> possible to define these parameters in the root/pom.xml?
>
> Thank you.
> Kevin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
La mélancolie c'est communiste
Tout le monde y a droit de temps en temps
La mélancolie n'est pas capitaliste
C'est même gratuit pour les perdants
La mélancolie c'est pacifiste
On ne lui rentre jamais dedans
La mélancolie oh tu sais ça existe
Elle se prend même avec des gants
La mélancolie c'est pour les syndicalistes
Il faut juste sa carte de permanent

Miossec (2006)

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com