Travis CI编译卡住

0

今天使用了一下Travis CI,但是发现编译时卡住不动然后失败了。

开始我以为以为gpg签名导致的,添加-D gpg.skip=true发现并没有解决。

后来发现打包时需要拷贝两个资源文件配置的路径是/,猜想可能是这个问题导致的,改为./编译成功。

<directory>/</directory>改为<directory>./</directory>

pom.xml:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-resources-plugin</artifactId>
	<version>${maven.resources.version}</version>
	<configuration>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<!-- 配置文件属性替换:properties -->
				<filtering>false</filtering>
				<includes>
					<include>**</include>
				</includes>
				<!-- 排除环境资源文件 -->
				<excludes>
					<exclude>profiles/**</exclude>
				</excludes>
			</resource>
			<resource>
				<!-- travis-ci配置斜杠编译卡住 -->
				<directory>./</directory>
				<filtering>false</filtering>
				<targetPath>META-INF/</targetPath>
				<!-- 开源协议、README -->
				<includes>
					<include>LICENSE</include>
					<include>README.md</include>
				</includes>
			</resource>
		</resources>
	</configuration>
	<executions>
		<!-- 自动复制环境资源 -->
		<execution>
			<id>auto-copy-resources-profiles</id>
			<phase>compile</phase>
			<goals>
				<goal>copy-resources</goal>
			</goals>
			<configuration>
				<!-- 覆盖资源 -->
				<overwrite>true</overwrite>
				<outputDirectory>${project.build.outputDirectory}</outputDirectory>
				<resources>
					<!-- 环境资源 -->
					<resource>
						<directory>src/main/resources/profiles/${package.environment}</directory>
						<filtering>false</filtering>
					</resource>
				</resources>
			</configuration>
			<inherited></inherited>
		</execution>
	</executions>
</plugin>