2015-06-10 31 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。您不使用中提到的版本之前的版本已知的非线程安全库,是吗?