我使用 Eclipse (Indigo) 和 maven 的 M2E 插件。现在由于某种原因,自动构建器在他满意之前继续重建项目大约 50 次没有任何变化,这需要大量资源并且是一个主要的痛苦......
我一次又一次地得到以下输出:
14.12.11 12:32:17 MEZ: Maven Builder: AUTO_BUILD requireFullBuild
14.12.11 12:32:17 MEZ: [WARN] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
14.12.11 12:32:17 MEZ: [INFO] Copying 2 resources
14.12.11 12:32:17 MEZ: [INFO] Nothing to compile - all classes are up to date
14.12.11 12:32:17 MEZ: [WARN] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
14.12.11 12:32:17 MEZ: [INFO] Copying 5 resources
我尝试禁用 Auto Builder 并将 Maven 设置为脱机,但似乎没有任何帮助。为什么他甚至“需要完整的构建”?
这种行为也会由代码中的任何内容更改触发,无论多么微小(例如将最终变量设置为不同的 int 值)。
我如何才能将其追溯到源头?其他项目似乎没有表现出这种行为..我不明白 M2E 如何获得需要完全重建的印象,即使它确实做到了......
谢谢!
根据评论编辑:
我们的 pom 中有以下插件设置:
<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <!-- Javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Source Jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-java2ws-plugin</artifactId>
                <version>${cxf.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.cxf</groupId>
                        <artifactId>cxf-rt-frontend-jaxws</artifactId>
                        <version>${cxf.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.cxf</groupId>
                        <artifactId>cxf-rt-frontend-simple</artifactId>
                        <version>${cxf.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>process-classes</id>
                        <phase>process-classes</phase>
                        <configuration>
                            <className>path.to.PersonService</className>
                            <genWsdl>true</genWsdl>
                            <verbose>true</verbose>
                        </configuration>
                        <goals>
                            <goal>java2ws</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-webdav-jackrabbit</artifactId>
                <version>1.0</version>
            </extension>
        </extensions>
    </build>