我已经下载了 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]
但是,如果我使用网络浏览器向 URL 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 启动并运行,我该怎么做?