Spring-plugin构建错误

时间:2014-04-28 17:25:55

标签: java spring maven bundlor

我已经下载了spring-plugin(https://github.com/spring-projects/spring-plugin)。我已经解压缩它,当尝试使用maven(版本3.1.0)安装它时,我收到了一个错误。

原始POM文件如下:

<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.springframework.plugin</groupId>
    <artifactId>spring-plugin</artifactId>
    <packaging>pom</packaging>
    <name>Spring Plugin</name>
    <version>1.1.0.BUILD-SNAPSHOT</version>
    <description>Simple plugin infrastructure</description>

    <organization>
        <name>Pivotal, Inc.</name>
        <url>http://www.springsource.org</url>
    </organization>
    <inceptionYear>2008</inceptionYear>
    <url>https://github.com/SpringSource/spring-plugin</url>

    <modules>
        <module>core</module>
        <module>metadata</module>
        <module>integration</module>
    </modules>

    <properties>
        <spring.version>3.2.7.RELEASE</spring.version>
        <slf4j.version>1.7.5</slf4j.version>
    </properties>

    <developers>
        <developer>
            <id>gierke</id>
            <name>Oliver Gierke</name>
            <email>ogierke@gopivotal.com</email>
            <url>http://www.olivergierke.de</url>
            <organization>Pivtoal</organization>
            <organizationUrl>http://www.gopivotal.com</organizationUrl>
            <roles>
                <role>Project lead</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <dependencies>

        <!-- Common test dependencies -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.9.5</version>
            <scope>test</scope>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.0.13</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.springsource.bundlor</groupId>
                <artifactId>com.springsource.bundlor.maven</artifactId>
                <version>1.0.0.RELEASE</version>
                <executions>
                    <execution>
                        <id>bundlor</id>
                        <goals>
                            <goal>bundlor</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
                <configuration>
                    <failOnWarnings>true</failOnWarnings>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <useDefaultManifestFile>true</useDefaultManifestFile>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <scm>
        <url>https://github.com/spring-projects/spring-plugin</url>
        <connection>scm:git:git://github.com/spring-projects/spring-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:spring-projects/spring-plugin.git</developerConnection>
    </scm>

    <ciManagement>
        <system>Bamboo</system>
        <url>https://build.springsource.org/browse/PLUGIN-MASTER</url>
    </ciManagement>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/spring-projects/spring-plugin/issues</url>
    </issueManagement>

    <repositories>
        <repository>
            <id>spring-libs-release</id>
            <url>http://repo.spring.io/libs-release</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>spring-plugins-release</id>
            <url>http://repo.spring.io/plugins-release</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

</project>

我正在尝试使用以下命令行安装它

 c:\myPathToSpringPlugin> mvn clean install

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Spring Plugin
[INFO] Spring Plugin - Core
[INFO] Spring Plugin - Metadata Extension
[INFO] Spring Plugin - Spring Integration integration
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spring Plugin 1.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.spring.io/pluginsrelease/com/springsource/bundlor/com.springsource.bundlor.maven/1.0.0.RELEASE/com.springsource.bundlor.maven-1.0.0.RELEASE.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spring Plugin ..................................... FAILURE [21.581s]
[INFO] Spring Plugin - Core .............................. SKIPPED
[INFO] Spring Plugin - Metadata Extension ................ SKIPPED
[INFO] Spring Plugin - Spring Integration integration .... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.704s
[INFO] Finished at: Mon Apr 28 19:13:03 CEST 2014
[INFO] Final Memory: 8M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin com.springsource.bundlor:com.springsource.bundlor.maven:1.0.0.RELEASE or     one of its dependencies could not be resolved: Failed to read artifact descriptor for    com.springsource.bundlor:com.springsource.bundlor.maven:jar:1.0.0.RELEASE: Could not transfer artifact com.springsource.bundlor:com.springsource.bundlor.maven:pom:1.0.0.RELEASE from/to spring-plugins-release (http://repo.spring.io/plugins-release): Connection to (MY PROXY) refused: Connection timed out: connect -> [Help 1]
[ERROR]

但是如果我使用网络浏览器向网址发送请求     http://repo.spring.io/pluginsrelease/com/springsource/bundlor/com.springsource.bundlor.maven/1.0.0.RELEASE/com.springsource.bundlor.maven-1.0.0.RELEASE.pom

我收到了POM文件。

为了让spring-plugin启动并运行,我该怎么做?

2 个答案:

答案 0 :(得分:0)

你看到pom的事实并不代表什么......!

阅读日志,我认为这是一个简单的连接错误,日志说&#34;代理拒绝连接&#34; ...所以也许你有一个代理并且没有配置(或者可能没有以正确的方式配置)settings.xml中的代理设置..

你可以粘贴你的setting.xml文件....?

答案 1 :(得分:0)

我尝试下载和构建它并且正在工作:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spring Plugin ..................................... SUCCESS [ 30.553 s]
[INFO] Spring Plugin - Core .............................. SUCCESS [  9.290 s]
[INFO] Spring Plugin - Metadata Extension ................ SUCCESS [  1.844 s]
[INFO] Spring Plugin - Spring Integration integration .... SUCCESS [  9.929 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.837 s
[INFO] Finished at: 2014-04-29T00:52:23+07:00
[INFO] Final Memory: 22M/104M
[INFO] ------------------------------------------------------------------------

从您的maven错误:

  

from / to spring-plugins-release(http://repo.spring.io/plugins-release):连接到(MY PROXY)被拒绝:连接超时:connect - &gt; [帮助1]

我认为您在使用代理时遇到了问题!