简体   繁体   中英

Does the POM file configuration overwrite the default settings of Spring Tool Suite configuration?

After checking this link No Compiler is provided in this environment I observed that POM file configuration is overwriting STS default settings. This might be the reason whenever project is run on server, it is generating the error as mentioned in above link. This might be the code which is overwriting the STS default configuration:

<plugin>  
    <groupId>org.apache.maven.plugins</groupId>  
    <artifactId>maven-compiler-plugin</artifactId>              
    <configuration>  
        <source>${jdk.version}</source>  
        <target>${jdk.version}</target>  
    </configuration>  
</plugin>  

This is a feature of the Maven support in Eclipse (which is also included in STS). It automatically maps your JDK version setting in your pom file to the compiler settings in Eclipse/STS. Otherwise you would end up having the IDE compile for a different JDK version than your Maven build - which would be a bit strange.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM