这是maven项目的总结
mvn -v
Apache Maven 3.3.3 (79941 ... d4a06; 2015-04-22T17:57:37+06:00)
Maven home: /path/to/apache-maven-3.3.3
Java version: 1.7.0_67, vendor: Oracle Corporation
Java home: /path/to/java/jdk1.7.0_67/jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
和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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>chorke-base-parent</artifactId>
<groupId>com.chorke.base</groupId>
<version>1.0.00-SNAPSHOT</version>
<name>chorke-base-parent</name>
<packaging>pom</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.4.RELEASE</version>
<relativePath />
</parent>
<properties>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>EEE, MMM dd yyyy, HH:mm Z</maven.build.timestamp.format>
</properties>
<distributionManagement>
<repository>
<id>releases.ftp</id>
<url>ftp://127.0.0.1/maven2/releases</url>
</repository>
<snapshotRepository>
<id>snapshots.ftp</id>
<url>ftp://127.0.0.1/maven2/snapshots</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
<modules>
<module>chorke-comn-parent</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<configuration>
<excludes>
<exclude>**/*.md</exclude>
<exclude>**/*.groovy</exclude>
<exclude>**/.gitkeep</exclude>
<exclude>**/.gitignore</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>2.4</version>
</extension>
</extensions>
</build>
<repositories>
<repository>
<id>snapshots</id>
<url>http://127.0.0.1/maven2/snapshots</url>
<snapshots><enabled>true</enabled><updatePolicy>interval:240</updatePolicy></snapshots>
<releases><enabled>false</enabled><updatePolicy>never</updatePolicy></releases>
</repository>
<repository>
<id>releases</id>
<url>http://127.0.0.1/maven2/releases</url>
<snapshots><enabled>false</enabled><updatePolicy>never</updatePolicy></snapshots>
<releases><enabled>true</enabled><updatePolicy>daily</updatePolicy></releases>
</repository>
</repositories>
</project>
尽管settings.xml
<settings 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/settings-1.0.0.xsd">
<localRepository>/path/to/local/repo</localRepository>
<servers>
<server>
<id>releases</id>
<configuration>
<httpHeaders>
<property>
<name>Authorization</name>
<value>Basic bWF2ZW46cGFzc3dvcmQ==</value>
</property>
</httpHeaders>
</configuration>
</server>
<server>
<id>snapshots</id>
<configuration>
<httpHeaders>
<property>
<name>Authorization</name>
<value>Basic bWF2ZW46cGFzc3dvcmQ==</value>
</property>
</httpHeaders>
</configuration>
</server>
<server>
<id>releases.ftp</id>
<username>maven</username>
<password>password</password>
</server>
<server>
<id>snapshots.ftp</id>
<username>maven</username>
<password>password</password>
</server>
</servers>
</settings>
这个项目成功地执行mvn clean install deploy -N
和执行。例如,当我附加部署时:它会生成以下轨迹:jdk1.6.0_##
mvn clean install -N
jdk1.7.0_##
jdk1.7.0_##
mvn clean install deploy -N
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project chorke-base-parent: Failed to retrieve remote metadata com.chorke.base:chorke-base-parent:2.0.00-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.chorke.base:chorke-base-parent:2.0.00-SNAPSHOT/maven-metadata.xml from/to snapshots.ftp (ftp://127.0.0.1/maven2/snapshots): Error transferring file via FTP: Connection reset -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project chorke-base-parent: Failed to retrieve remote metadata com.chorke.base:chorke-base-parent:2.0.00-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.chorke.base:chorke-base-parent:2.0.00-SNAPSHOT/maven-metadata.xml from/to snapshots.ftp (ftp://127.0.0.1/maven2/snapshots): Error transferring file via FTP
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:154)
at java.io.BufferedReader.read(BufferedReader.java:175)
... more
您能帮我wagon-ftp
完美地配置spring-boot
子模块jdk1.7.0_##
或更高版本吗?
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.4.RELEASE</version>
<relativePath />
</parent>