Maven项目运行maven install 出错

_寸芒_ 发布于 2015/05/19 15:12
阅读 12K+
收藏 0
这是输出的错误详细信息,子类项目依赖父类项目,网上也找了很多办法,有说jdk的问题等等,尝试了很多办法就是没办法解决,真的很头疼啊,哪位大神帮帮忙 [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.song:redis-db🏺0.0.1 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ com.song:redis-db:[unknown-version], D:\EclipseWorkspace\redis-db\pom.xml, line 92, column 12 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ com.song:redis-base:0.0.1, D:\EclipseWorkspace\redis-base\pom.xml, line 200, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building redis-db 0.0.1 [INFO] ------------------------------------------------------------------------ [INFO] Downloading: https://repo.maven.apache.org/maven2/com/song/redis-base/0.0.1/redis-base-0.0.1.pom [INFO] Downloading: https://repo.maven.apache.org/maven2/com/redis/clients/jedis/2.4.2/jedis-2.4.2.pom [INFO] Downloading: https://repo.maven.apache.org/maven2/org/hyperic/sigar/1.6.4/sigar-1.6.4.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.862 s [INFO] Finished at: 2015-05-19T15:01:50+08:00 [INFO] Final Memory: 12M/113M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project redis-db: Could not resolve dependencies for project com.song:redis-db🏺0.0.1: Failed to collect dependencies at com.song:redis-core🏺0.0.1: Failed to read artifact descriptor for com.song:redis-core🏺0.0.1: Could not transfer artifact com.song:redis-base:pom:0.0.1 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
加载中
0
_寸芒_
_寸芒_

引用来自“alexgaoyh”的评论

很明显的错误啊??pom.xml, line 92, column 12 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing.

建议把pom.xml文件贴出来看一下··

引用来自“_寸芒_”的评论

<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>
	<parent>
		<groupId>com.song</groupId>
		<artifactId>redis-base</artifactId>
		<version>0.0.1</version>
		<relativePath>../redis-base/pom.xml</relativePath>
	</parent>
	<artifactId>redis-db</artifactId>
	<packaging>jar</packaging>
	<dependencies>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<dependency>
			<groupId>com.song</groupId>
			<artifactId>redis-core</artifactId>
		</dependency>
		<dependency>
			<groupId>redis.clients</groupId>
			<artifactId>jedis</artifactId>
		</dependency>
		<dependency>
			<groupId>com.redis.clients</groupId>
			<artifactId>jedis</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jdmk</groupId>
			<artifactId>jmxtools</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jmx</groupId>
			<artifactId>jmxri</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-pool2</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hyperic</groupId>
			<artifactId>sigar</artifactId>
			<version>1.6.4</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.zookeeper</groupId>
			<artifactId>zookeeper</artifactId>
		</dependency>
		<dependency>
			<groupId>com.netflix.blitz4j</groupId>
			<artifactId>blitz4j</artifactId>
		</dependency>
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz</artifactId>
			<version>2.2.1</version>
		</dependency>
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz-jobs</artifactId>
			<version>2.2.1</version>
		</dependency>
		<dependency>
			<groupId>javax.transaction</groupId>
			<artifactId>jta</artifactId>
			<version>1.1</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>



引用来自“alexgaoyh”的评论

根据报错,应该是没有build.plugins.plugin.version 对应的版本号的存在,根据项目依赖,看 redis-base/pom.xml 下有没有对应的 properties 定义,如果没有的话,添加上对应的version部分。
按照你说的,我看了下 redis-base/pom.xml下配置,不知道你说的是哪个,是maven-compiler-plugin这个artifactId的version吗?里面是有version的,不过还有maven-jar-plugin、maven-dependency-plugin这些没有version,以下是我redis-base/pom.xml里面的配置:
<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>com.song</groupId>
 <artifactId>redis-base</artifactId>
 <version>0.0.1</version>
 <packaging>pom</packaging>
 <modules>
 <module>../redis-core</module>
 <module>../redis-db-connection</module>
 </modules>
 <properties>
 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 <junit.version>4.10</junit.version>
 </properties>
<!-- 
 <repositories>
 <repository>
 <id>nexus</id>
 <name>Team Nexus Repository</name>
 <url>http://10.9.20.130:8081/nexus/content/groups/public/</url>


 </repository>




 </repositories>
 -->


 <dependencyManagement>
 <dependencies>
 <dependency>
 <groupId>com.song</groupId>
 <artifactId>redis-core</artifactId>
 <version>${project.version}</version>
 </dependency>
 <dependency>
 <groupId>junit</groupId>
 <artifactId>junit</artifactId>
 <version>${junit.version}</version>
 </dependency>
 <dependency>
 <groupId>org.codehaus.jackson</groupId>
 <artifactId>jackson-mapper-asl</artifactId>
 <version>1.9.13</version>
 </dependency>
 <dependency>
 <groupId>org.apache.zookeeper</groupId>
 <artifactId>zookeeper</artifactId>
 <version>3.4.6</version>
 </dependency>
 <dependency>
 <groupId>org.apache.curator</groupId>
 <artifactId>curator-framework</artifactId>
 <version>2.4.0</version>
 </dependency>
 <dependency>
 <groupId>org.apache.curator</groupId>
 <artifactId>curator-recipes</artifactId>
 <version>2.4.0</version>
 </dependency>
 <dependency>
 <groupId>org.apache.httpcomponents</groupId>
 <artifactId>httpclient</artifactId>
 <version>4.3</version>
 </dependency>
 <dependency>
 <groupId>org.slf4j</groupId>
 <artifactId>slf4j-log4j12</artifactId>
 <version>1.6.4</version>
 </dependency>
 <dependency>
 <groupId>commons-logging</groupId>
 <artifactId>commons-logging</artifactId>
 <version>1.1.3</version>
 </dependency>
 <dependency>
 <groupId>commons-collections</groupId>
 <artifactId>commons-collections</artifactId>
 <version>3.2.1</version>
 </dependency>
 <dependency>
 <groupId>org.apache.commons</groupId>
 <artifactId>commons-pool2</artifactId>
 <version>2.2</version>
 </dependency>
 <dependency>
 <groupId>com.google.guava</groupId>
 <artifactId>guava</artifactId>
 <version>15.0</version>
 </dependency>
 <dependency>
 <groupId>com.redis.clients</groupId>
 <artifactId>jedis</artifactId>
 <version>2.4.2</version>
 </dependency>
 <dependency>
 <groupId>redis.clients</groupId>
 <artifactId>jedis</artifactId>
 <version>2.5.1</version>
 </dependency>
 <dependency>
 <groupId>com.sun.jdmk</groupId>
 <artifactId>jmxtools</artifactId>
 <version>1.2.1</version>
 </dependency>
 <dependency>
 <groupId>com.sun.jmx</groupId>
 <artifactId>jmxri</artifactId>
 <version>1.2.1</version>
 </dependency>
 <dependency>
 <groupId>org.hyperic</groupId>
 <artifactId>sigar</artifactId>
 <version>1.6.4</version>
 </dependency>
 <dependency>
 <groupId>com.alibaba</groupId>
 <artifactId>fastjson</artifactId>
 <version>1.1.40</version>
 </dependency>
 <dependency>
 <groupId>com.101tec</groupId>
 <artifactId>zkclient</artifactId>
 <version>0.4</version>
 </dependency>
 <dependency>
 <groupId>common.toolkit</groupId>
 <artifactId>common-toolkit</artifactId>
 <version>0.0.4</version>
 </dependency>
 <dependency>
 <groupId>commons-dbutils</groupId>
 <artifactId>commons-dbutils</artifactId>
 <version>1.5</version>
 </dependency>
 <dependency>
 <groupId>mysql</groupId>
 <artifactId>mysql-connector-java</artifactId>
 <version>5.1.18</version>
 </dependency>
 <dependency>
 <groupId>com.netflix.blitz4j</groupId>
 <artifactId>blitz4j</artifactId>
 <version>1.35</version>
 </dependency>
 <dependency>
 <groupId>javax.jms</groupId>
 <artifactId>jms</artifactId>
 <version>3.1.2.2</version>
 </dependency>
 <dependency>
 <groupId>log4j</groupId>
 <artifactId>log4j</artifactId>
 <version>1.2.17</version>
 </dependency>
 </dependencies>
 </dependencyManagement>
 <build>
 <pluginManagement>
 <plugins>
 <plugin>
 <groupId>org.eclipse.m2e</groupId>
 <artifactId>lifecycle-mapping</artifactId>
 <version>1.0.0</version>
 <configuration>
 <lifecycleMappingMetadata>
 <pluginExecutions>
 <pluginExecution>
 <pluginExecutionFilter>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-dependency-plugin</artifactId>
 <versionRange>[2.0,)</versionRange>
 <goals>
 <goal>copy-dependencies</goal>
 <goal>unpack</goal>
 </goals>
 </pluginExecutionFilter>
 <action>
 <ignore />
 </action>
 </pluginExecution>
 </pluginExecutions>
 </lifecycleMappingMetadata>
 </configuration>
 </plugin>
 </plugins>
 </pluginManagement>
 <plugins>
 <plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-compiler-plugin</artifactId>
 <version>3.1</version>
 <configuration>
 <defaultLibBundleDir>lib</defaultLibBundleDir>
 <target>1.6</target>
 <encoding>UTF-8</encoding>
 </configuration>
 </plugin>
 <!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 -->
 <plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-jar-plugin</artifactId>
 <configuration>
 <archive>
 <manifest>
 <addClasspath>true</addClasspath>
 <classpathPrefix>lib/</classpathPrefix>
 <mainClass>com.song.redis.startup.RedisDBMain</mainClass>
 </manifest>
 </archive>
 </configuration>
 </plugin>
 <!-- 拷贝依赖的jar包到lib目录 -->
 <plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-dependency-plugin</artifactId>
 <executions>
 <execution>
 <id>copy</id>
 <phase>package</phase>
 <goals>
 <goal>copy-dependencies</goal>
 </goals>
 <configuration>
 <outputDirectory>${project.build.directory}/lib</outputDirectory>
 <excludeTransitive>false</excludeTransitive>
 </configuration>
 </execution>
 </executions>
 </plugin>
 <!-- 解决资源文件的编码问题 -->
 <plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-resources-plugin</artifactId>
 <version>2.4</version>
 <configuration>
 <encoding>UTF-8</encoding>
 </configuration>
 </plugin>
 <!-- 打包source文件为jar文件 -->
 <plugin>
 <artifactId>maven-source-plugin</artifactId>
 <version>2.1</version>
 <configuration>
 <attach>true</attach>
 <encoding>UTF-8</encoding>
 </configuration>
 <executions>
 <execution>
 <phase>compile</phase>
 <goals>
 <goal>jar</goal>
 </goals>
 </execution>
 </executions>
 </plugin>
 </plugins>
 </build>
 <!-- 
 <distributionManagement>
 <repository>
 <id>releases</id>
 <name>Nexus Release Repository</name>
 <url>http://10.9.20.130:8081/nexus/content/repositories/releases/</url>
 </repository>
 <snapshotRepository>
 <id>snapshots</id>
 <name>Nexus Snapshot Repository</name>
 <url>http://10.9.20.130:8081/nexus/content/repositories/snapshots/</url>
 </snapshotRepository>
 </distributionManagement> -->
</project> 



0
bandiandian
bandiandian

redis-core:jar:0.0.1这个包依赖是不是有问题,

可以先在pom中把该依赖去掉,看报不报错,排除下。

如果确定是,再找解决方法。

0
alexgaoyh
alexgaoyh

很明显的错误啊??pom.xml, line 92, column 12 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing.

建议把pom.xml文件贴出来看一下··

0
_寸芒_
_寸芒_

引用来自“alexgaoyh”的评论

很明显的错误啊??pom.xml, line 92, column 12 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing.

建议把pom.xml文件贴出来看一下··

<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>
	<parent>
		<groupId>com.song</groupId>
		<artifactId>redis-base</artifactId>
		<version>0.0.1</version>
		<relativePath>../redis-base/pom.xml</relativePath>
	</parent>
	<artifactId>redis-db</artifactId>
	<packaging>jar</packaging>
	<dependencies>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<dependency>
			<groupId>com.song</groupId>
			<artifactId>redis-core</artifactId>
		</dependency>
		<dependency>
			<groupId>redis.clients</groupId>
			<artifactId>jedis</artifactId>
		</dependency>
		<dependency>
			<groupId>com.redis.clients</groupId>
			<artifactId>jedis</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jdmk</groupId>
			<artifactId>jmxtools</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jmx</groupId>
			<artifactId>jmxri</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-pool2</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hyperic</groupId>
			<artifactId>sigar</artifactId>
			<version>1.6.4</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.zookeeper</groupId>
			<artifactId>zookeeper</artifactId>
		</dependency>
		<dependency>
			<groupId>com.netflix.blitz4j</groupId>
			<artifactId>blitz4j</artifactId>
		</dependency>
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz</artifactId>
			<version>2.2.1</version>
		</dependency>
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz-jobs</artifactId>
			<version>2.2.1</version>
		</dependency>
		<dependency>
			<groupId>javax.transaction</groupId>
			<artifactId>jta</artifactId>
			<version>1.1</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>



0
alexgaoyh
alexgaoyh

引用来自“alexgaoyh”的评论

很明显的错误啊??pom.xml, line 92, column 12 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing.

建议把pom.xml文件贴出来看一下··

引用来自“_寸芒_”的评论

<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>
	<parent>
		<groupId>com.song</groupId>
		<artifactId>redis-base</artifactId>
		<version>0.0.1</version>
		<relativePath>../redis-base/pom.xml</relativePath>
	</parent>
	<artifactId>redis-db</artifactId>
	<packaging>jar</packaging>
	<dependencies>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<dependency>
			<groupId>com.song</groupId>
			<artifactId>redis-core</artifactId>
		</dependency>
		<dependency>
			<groupId>redis.clients</groupId>
			<artifactId>jedis</artifactId>
		</dependency>
		<dependency>
			<groupId>com.redis.clients</groupId>
			<artifactId>jedis</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jdmk</groupId>
			<artifactId>jmxtools</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jmx</groupId>
			<artifactId>jmxri</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-pool2</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hyperic</groupId>
			<artifactId>sigar</artifactId>
			<version>1.6.4</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.zookeeper</groupId>
			<artifactId>zookeeper</artifactId>
		</dependency>
		<dependency>
			<groupId>com.netflix.blitz4j</groupId>
			<artifactId>blitz4j</artifactId>
		</dependency>
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz</artifactId>
			<version>2.2.1</version>
		</dependency>
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz-jobs</artifactId>
			<version>2.2.1</version>
		</dependency>
		<dependency>
			<groupId>javax.transaction</groupId>
			<artifactId>jta</artifactId>
			<version>1.1</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>



根据报错,应该是没有build.plugins.plugin.version 对应的版本号的存在,根据项目依赖,看 redis-base/pom.xml 下有没有对应的 properties 定义,如果没有的话,添加上对应的version部分。
0
_寸芒_
_寸芒_

引用来自“bandiandian”的评论

redis-core:jar:0.0.1这个包依赖是不是有问题,

可以先在pom中把该依赖去掉,看报不报错,排除下。

如果确定是,再找解决方法。

试了把依赖去掉但是会报错啊!
0
alexgaoyh
alexgaoyh
redis-db\pom.xml 文件下,94行 -95行 之间,加上 <version>2.17</version>   试一下···
0
_寸芒_
_寸芒_

引用来自“alexgaoyh”的评论

redis-db\pom.xml 文件下,94行 -95行 之间,加上 <version>2.17</version>   试一下···
其实那个是有version的,后来我自己看了下,由于疏忽父项目下的子项目又一个地方拼写错误,当时就是没法解决,后来才发现的。
返回顶部
顶部