2015-06-10 30 views
0

好了,所以我有我的原因項目建設永遠的一個錯誤。Eclipse的自動構建永恆循環

我有一個自定義Ant構建腳本,基本上運行的Maven .pom文件(我做到了,所以它只是節省了我的時間手工做的事情)及其完成後,在Eclipse中各保存。

但是一個特別的項目是在一個循環中,完成和永遠建立你又來了。

<?xml version="1.0" encoding="UTF-8"?> 
<!-- Configuration of Ant build task to generate a Jar file each time project is updated --> 
<project name="orderlystatsse" default="execute-pom"> 
    <target name="execute-pom" description="Execute orderlystatsse.pom file"> 
     <!-- 
     <exec dir="." executable="cmd"> 
      <arg line="/c mvn -T 4C install -Dmaven.test.skip=true" /> 
     </exec> 
     --> 
     <exec dir="." executable="sh"> 
      <arg line="-c 'mvn -T 4C clean compile install -Dmaven.test.skip=true'" /> 
     </exec> 
    </target> 
</project> 

所以它是一個簡單的ant構建腳本。

的Maven POM文件

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>com.orderlysoftware</groupId> 
    <artifactId>orderlystatsse</artifactId> 
    <version>0.1</version> 
    <packaging>war</packaging> 
    <properties> 
     <jdk.version>1.7</jdk.version> 
    </properties> 
    <build> 
     <finalName>${project.artifactId}</finalName> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <version>2.3.2</version> 
       <configuration> 
        <source>${jdk.version}</source> 
        <target>${jdk.version}</target> 
       </configuration> 
      </plugin> 
      <plugin> 
       <!-- JAR PLUGIN --> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-jar-plugin</artifactId> 
       <version>2.3.2</version> 
       <executions> 
        <execution> 
         <id>orderly-stats-se</id> 
         <goals> 
          <goal>jar</goal> 
         </goals> 
         <configuration> 
          <finalName>${project.artifactId}</finalName> 
          <classifier>base</classifier> 
          <!-- <outputDirectory>C:/tomcat/lib</outputDirectory> --> 
          <outputDirectory>/opt/tomcat7/lib</outputDirectory> 
         </configuration> 
        </execution> 
       </executions> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-war-plugin</artifactId> 
       <version>2.4</version> 
       <configuration> 
        <outputDirectoryURI>WORKSPACE_LOC/OrderlyTelecomsMVN/mvn-output/war-files</outputDirectoryURI> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-eclipse-plugin</artifactId> 
       <version>2.9</version> 
       <configuration> 
        <linkedResources> 
         <linkedResource> 
          <name>src/main/webapp/realtime</name> 
          <type>2</type> 
          <locationURI>WORKSPACE_LOC/OrderlyTelecomsMVN/orderlyq/src/main/webapp/realtime</locationURI> 
         </linkedResource> 
         <linkedResource> 
          <name>src/main/webapp/reports</name> 
          <type>2</type> 
          <locationURI>WORKSPACE_LOC/OrderlyTelecomsMVN/orderlystats/src/main/webapp/reports</locationURI> 
         </linkedResource> 
        </linkedResources> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 
    <!-- Reporting --> 
    <reporting> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-project-info-reports-plugin</artifactId> 
       <version>2.6</version> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-javadoc-plugin</artifactId> 
       <version>2.9.1</version> 
       <configuration></configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.codehaus.mojo</groupId> 
       <artifactId>findbugs-maven-plugin</artifactId> 
       <version>2.5.3</version> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-pmd-plugin</artifactId> 
       <version>3.1</version> 
      </plugin> 
     </plugins> 
    </reporting> 
    <!-- Project Dependencies --> 
    <!-- If there is any dependency that does not belong to OrderlyCalls But 
     its required for OrderlyStats declare the required Dependencies in this section --> 
    <dependencies> 
     <dependency> 
      <groupId>org.apache.tomcat.embed</groupId> 
      <artifactId>tomcat-embed-core</artifactId> 
      <version>7.0.53</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>javax.mail</groupId> 
      <artifactId>mail</artifactId> 
      <version>1.4.7</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>net.sf.trove4j</groupId> 
      <artifactId>trove4j</artifactId> 
      <version>3.0.3</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.orderlysoftware</groupId> 
      <artifactId>orderlyshared</artifactId> 
      <version>0.1</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.orderlysoftware</groupId> 
      <artifactId>orderlycalls</artifactId> 
      <version>0.1</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.orderlysoftware</groupId> 
      <artifactId>orderlyq</artifactId> 
      <version>0.1</version> 
      <classifier>base</classifier> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.orderlysoftware</groupId> 
      <artifactId>orderlystats</artifactId> 
      <version>0.1</version> 
      <classifier>base</classifier> 
      <scope>provided</scope> 
     </dependency> 
    </dependencies> 
</project> 

任何想法可能會導致生成器腳本處理完成後,可以從頭再來過?

PS。我是在Linux上(如果有什麼差別)

+0

你爲什麼從'MVN改變...安裝...''到... MVN編譯安裝...?' –

+0

@GeroldBroser所以它更加透明,這是什麼命令正在執行。我知道安裝正在做所有以前的任務,但不熟悉maven的人可能不知道......無論如何,這是如何解決問題的? –

+0

如果只用'install'循環,我會說我只是好奇,因爲它不是必需的。 –

回答

0

嘗試沒有-T 4C?我已經看到了奇怪的事情發生了與並行編譯。而且,它似乎it's still experimental。您不使用中提到的版本之前的版本已知的非線程安全庫,是嗎?