maven项目在pom.xml中设置JDK编译版本

xml
概要:

每次update project项目JRE System Lib都会变化,那么,可以再pom.xml的<build>上加上 

| |目录

每次update project项目JRE System Lib都会变化,那么,可以再pom.xml的<build>上加上 

<plugins>
            <!-- 编译的时候使用JDK7和UTF8编码 ,-->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- <version>3.0</version> -->
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <!-- 编译jar包 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>


评论关闭
评论 还能输入200
评论关闭
评论 还能输入200
资料加载中...
已关注 , 取消