Eclipse Auto-build eternal loop

394 views Asked by At

Ok so i have a bug which causes one of my project to build forever.

I have a custom ANT builder script, which essentially runs Maven .pom file (I did it so it just saves me time on doing things manually) and its done after each save in eclipse.

However One particular project is building forever in a loop, finishes and of you go again.

<?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>

So its a simple ant build script.

Maven POM file

<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>

Any ideas what might be causing the builder script to be run all over again once it finishes ?

PS. I am on Linux (if that makes any difference)

1

There are 1 answers

0
Gerold Broser On

Try it without -T 4C? I've seen weird things happening with those parallel builds. And, it seems it's still experimental. You don't use versions prior to those mentioned in Known non-thread safe libraries, do you?