詹金斯的Maven错误

时间:2015-03-04 11:57:59

标签: maven jenkins build

我正在运行Jenkins 1.599。我创建了一个新的freeStyle项目,它执行批处理命令mvn clean install。 如果我从windows shell运行相同的批处理命令,则maven命令会成功运行。

然而,当Jenkins执行它时,我得到了maven失败,如下所示:

C:\Program Files (x86)\Jenkins\jobs\AppHistData Freestyle\workspace>[workspace] $ cmd /c call C:\Windows\TEMP\hudson3523791316528515292.bat

C:\Program Files (x86)\Jenkins\jobs\AppHistData Freestyle\workspace>C:\\develop\\AppHistData\\AppHistDataMvn\\maven_run.bat

C:\Program Files (x86)\Jenkins\jobs\AppHistData Freestyle\workspace>cd C:\develop\AppHistData\AppHistDataMvn 

C:\develop\AppHistData\AppHistDataMvn>C:\maven-3.2.5\bin\mvn clean install 
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building AppHistDataMvn 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for TradingInstrument:TradingInstrument:jar:1 is missing, no dependency information available
[WARNING] The POM for allinonetrade:allinonetrade:jar:1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.823 s
[INFO] Finished at: 2015-03-04T12:21:16+01:00
[INFO] Final Memory: 15M/491M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project AppHistDataMvn: Could not resolve dependencies for project com.deepfieldcapital:AppHistDataMvn:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: TradingInstrument:TradingInstrument:jar:1, allinonetrade:allinonetrade:jar:1: Failure to find TradingInstrument:TradingInstrument:jar:1 in http://bits.netbeans.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.netbeans.maven2 has elapsed or updates are forced -> [Help 1]
[ERROR] 

POM.xml如下:

<?xml version="1.0" encoding="UTF-8"?>
<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>deepFieldCapital</groupId>
    <artifactId>TradeInstManager</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name>TradeInstManager</name>
    <organization>
        <name>Deep Field Capital</name>
    </organization>
    <build> 
        <plugins> 
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>com.deepfieldcapital.tradeinstmanager.TradeInstrumentManagerMain</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins> 
    </build>  
    <repositories>
        <repository>
            <id>lib</id>
            <url>file:../lib</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.3.6.Final</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.31</version>
        </dependency>
        <dependency>
            <groupId>org.swinglabs</groupId>
            <artifactId>swing-layout</artifactId>
            <version>1.0.3</version>
        </dependency>
        <dependency>
            <groupId>TradingInstrument</groupId>
            <artifactId>TradingInstrument</artifactId>
            <version>1</version>
        </dependency>
        <dependency>
            <groupId>BrokerOld</groupId>
            <artifactId>BrokerOld</artifactId>
            <version>1</version>
        </dependency>
        <dependency>
            <groupId>Utilities</groupId>
            <artifactId>Utilities</artifactId>
            <version>1</version>
        </dependency>
        <dependency>
            <groupId>allinonetrade</groupId>
            <artifactId>allinonetrade</artifactId>
            <version>1</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.14</version>
            <type>jar</type>
        </dependency>
    </dependencies>
</project>

0 个答案:

没有答案