maven-2

what does those doing in the maven pom.xml


What does the following do in pom.xml?

 <build>         
    <plugins>      
           <plugin>           
          <groupId>org.apache.maven.plugins</groupId>    
                 <artifactId>maven-compiler-plugin</artifactId>              
          <configuration>         
                <source>1.6</source>                   
                <target>1.6</target>              
       </configuration>            
       </plugin>      
       </plugins>   
      </build> 

Solution

  • Configures the compiler compliance level. Source 1.6 means your source code must be according to java 1.6, and target means the generated bytecode should be compatible with a 1.6 compliant JVM.