1

我正在开发一个由 jenkins-server 构建的 maven 项目。工作正常。但是由于我使用的是构建插件(具有完整的依赖项),并将 javaversion 更改为 1.6,因此令人不安

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.278s
[INFO] Finished at: Wed Oct 02 07:32:07 CEST 2013
[INFO] Final Memory: 17M/141M
[INFO] ------------------------------------------------------------------------
[JENKINS] Archiving /var/lib/jenkins/workspace/MavenTest/pom.xml to MavenTest/MavenTest/0.0.1-SNAPSHOT/MavenTest-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving /var/lib/jenkins/workspace/MavenTest/target/MavenTest-0.0.1-SNAPSHOT.jar to MavenTest/MavenTest/0.0.1-SNAPSHOT/MavenTest-0.0.1-SNAPSHOT.jar
[JENKINS] Archiving /var/lib/jenkins/workspace/MavenTest/target/MavenTest-0.0.1-SNAPSHOT-jar-with-dependencies.jar to MavenTest/MavenTest/0.0.1-SNAPSHOT/MavenTest-0.0.1-SNAPSHOT-jar-with-dependencies.jar
channel stopped
FATAL: hudson.maven.MavenBuild.pickArtifactManager()Ljenkins/model/ArtifactManager;
java.lang.NoSuchMethodError: hudson.maven.MavenBuild.pickArtifactManager()Ljenkins/model/ArtifactManager;
    at hudson.maven.MavenBuild$ProxyImpl.performArchiving(MavenBuild.java:455)
    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:815)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567)
    at hudson.model.Run.execute(Run.java:1604)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:506)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:246)

这是我的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>MavenTest</groupId>
    <artifactId>MavenTest</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>MavenTest</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>my.maven.example.Main</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
                        <phase>package</phase> <!-- bind to the packaging phase -->
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

我怎样才能解决这个问题?

//编辑:它在 ubuntu 12.04 上的 jenkins,本机安装。

4

1 回答 1

1

乍一看,这似乎是哈德逊罐的问题。您可以尝试以下操作:

  1. 弹跳 hudson 服务器并清理项目的工作区,再试一次。
  2. 如果这不起作用并且您遇到相同的错误,请尝试创建一个新的 hudson 作业并查看它是否有效。
  3. 如果 abve 2 失败,那么问题确实出在 Hudson jar 上,请更换 jar。
于 2013-10-02T05:48:18.423 回答