maven编译插件版本配置案例

 <!-- Build Settings 构建设置 -->
    <build>
        <finalName>${project.artifactId}</finalName>
        <resources>
            <resource>
                <directory>${basedir}\src\main\resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>${basedir}\src\test\resources</directory>
            </testResource>
        </testResources>
        <!-- plugins setting 插件设置  -->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <!-- 源目录 -->
                    <warSourceDirectory>${basedir}\WebRoot</warSourceDirectory>
                    <workDirectory>${project.build.directory}\work</workDirectory>
                    <useCache>false</useCache>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.appfuse.plugins</groupId>
                <artifactId>maven-warpath-plugin</artifactId>
                <version>2.1.0-M1</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>add-classes</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>UTF-8</encoding>
                    <optimize>true</optimize>
                    <debug>true</debug>
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>false</showWarnings>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <classpathContainers>
                        <classpathContainer>
                            org.eclipse.jdt.launching.JRE_CONTAINER
                        </classpathContainer>
                    </classpathContainers>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.5</version>
            </plugin>
        </plugins>
    </build>

 

posted @ 2016-11-08 18:19  浪荡小新  阅读(1494)  评论(0编辑  收藏  举报