好的,所以我有一个错误,导致我的一个项目永远构建。
我有一个自定义的 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 构建脚本。
马文聚甲醛文件
<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>
任何想法可能导致构建器脚本在完成后重新运行
?附言。我在 Linux 上(如果这有什么不同的话)
不用-T 4C?
尝试一下,我已经看到这些并行构建发生了奇怪的事情。而且,它似乎仍处于实验阶段。您不会使用已知非线程安全库中提到的版本之前的版本,是吗?