You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Trevor Harmon <tr...@vocaro.com> on 2008/11/18 20:13:53 UTC

How does maven-compiler-plugin choose its defaults?

When I do "mvn help:effective-pom", it shows:

       <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
         <version>2.0.2</version>
         <inherited>true</inherited>
         <configuration>
           <source>1.4</source>
           <target>1.4</target>
         </configuration>
       </plugin>

I'm curious about the source and target settings. They're set to 1.4,  
but there's nothing in my POM that specifies 1.4. That means the  
plugin is somehow defaulting to 1.4 automatically. However, I looked  
in Maven's conf/settings.xml, and there's nothing there either. How  
exactly does the compiler plugin arrive at this default value? Thanks,

Trevor



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


Re: How does maven-compiler-plugin choose its defaults?

Posted by Trevor Harmon <tr...@vocaro.com>.
On Nov 18, 2008, at 4:50 PM, Stephen Connolly wrote:

> 1.3

Ah... There is indeed a file in the Maven sources, JavacCompiler.java,  
that sets -source to 1.3 and -target to 1.1. It is in a "bootstrap"  
package, but I assume it somehow propagates to maven-compiler-plugin  
as well. Thanks for the pointer.

Trevor


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


Re: How does maven-compiler-plugin choose its defaults?

Posted by Stephen Connolly <st...@gmail.com>.
1.3

Sent from my iPod

On 18 Nov 2008, at 21:30, Trevor Harmon <tr...@vocaro.com> wrote:

> On Nov 18, 2008, at 2:13 PM, Trevor Harmon wrote:
>
>> I'm curious about the source and target settings. They're set to  
>> 1.4, but there's nothing in my POM that specifies 1.4.
>
> Oops, never mind about that, there was actually a parent POM that  
> specified 1.4.
>
> So let me rephrase my question: If there's no explicit compiler  
> version specified, which compiler version is used? Is it just  
> whatever version of Java that Maven is running on?
>
> Trevor
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: How does maven-compiler-plugin choose its defaults?

Posted by Trevor Harmon <tr...@vocaro.com>.
On Nov 18, 2008, at 2:13 PM, Trevor Harmon wrote:

> I'm curious about the source and target settings. They're set to  
> 1.4, but there's nothing in my POM that specifies 1.4.

Oops, never mind about that, there was actually a parent POM that  
specified 1.4.

So let me rephrase my question: If there's no explicit compiler  
version specified, which compiler version is used? Is it just whatever  
version of Java that Maven is running on?

Trevor


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