NutzCN Logo
问答 NB maven下载jar包时报错 version miss
发布于 2544天前 作者 loveexception 2999 次浏览 复制 上一个帖子 下一个帖子
标签:
Multiple annotations found at this line:
	- For artifact {org.nutz:nutzboot-starter-swagger:null:jar}: The version cannot be empty. (org.apache.maven.plugins:maven-
	 resources-plugin:2.6:resources:default-resources:process-resources) org.apache.maven.artifact.InvalidArtifactRTException: For 
	 artifact {org.nutz:nutzboot-starter-swagger:null:jar}: The version cannot be empty. at 
	 org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:148) at 
	 org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:123) at 
	 org.apache.maven.artifact.factory.DefaultArtifactFactory.createArtifact(DefaultArtifactFactory.java:157) at 
	 org.apache.maven.artifact.factory.DefaultArtifactFactory.createDependencyArtifact(DefaultArtifactFactory.java:57) at 
	 org.apache.maven.project.artifact.MavenMetadataSource.createDependencyArtifact(MavenMetadataSource.java:328) at 
	 org.apache.maven.project.artifact.MavenMetadataSource.createArtifacts(MavenMetadataSource.java:503) at 
	 org.apache.maven.lifecycle.internal.DefaultProjectArtifactFactory.createArtifacts(DefaultProjectArtifactFactory.java:50) at 
	 org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:
	 119) at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:330) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360) at 
	 org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200) at org.eclipse.core.internal.events.BuildManager
	 $2.run(BuildManager.java:735) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager
	 $1.run(BuildManager.java:301) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) at 
	 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) at 
	 org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) at 
	 org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:
	 55)
	- For artifact {org.nutz:nutzboot-starter-swagger:null:jar}: The version cannot be empty. (org.apache.maven.plugins:maven-
	 resources-plugin:2.6:testResources:default-testResources:process-test-resources) 
	 org.apache.maven.artifact.InvalidArtifactRTException: For artifact {org.nutz:nutzboot-starter-swagger:null:jar}: The version cannot 
	 be empty. at org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:148) at 
	 org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:123) at 
	 org.apache.maven.artifact.factory.DefaultArtifactFactory.createArtifact(DefaultArtifactFactory.java:157) at 
	 org.apache.maven.artifact.factory.DefaultArtifactFactory.createDependencyArtifact(DefaultArtifactFactory.java:57) at 
	 org.apache.maven.project.artifact.MavenMetadataSource.createDependencyArtifact(MavenMetadataSource.java:328) at 
	 org.apache.maven.project.artifact.MavenMetadataSource.createArtifacts(MavenMetadataSource.java:503) at 
	 org.apache.maven.lifecycle.internal.DefaultProjectArtifactFactory.createArtifacts(DefaultProjectArtifactFactory.java:50) at 
	 org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:
	 119) at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:330) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360) at 
	 org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200) at org.eclipse.core.internal.events.BuildManager
	 $2.run(BuildManager.java:735) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager
	 $1.run(BuildManager.java:301) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) at 
	 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) at 
	 org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) at 
	 org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:
	 55)
<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>io.nutz</groupId>
	<artifactId>demo</artifactId>
	<version>1.0-SNAPSHOT</version>
	<packaging>jar</packaging>
	<properties>
		<nutzboot.version>2.0-SNAPSHOT</nutzboot.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.nutz</groupId>
				<artifactId>nutzboot-parent</artifactId>
				<version>${nutzboot.version}</version>
				<type>pom</type>
            	<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-swagger</artifactId>
		</dependency>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-jetty</artifactId>
		</dependency>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-nutz-mvc</artifactId>
		</dependency>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-nutz-dao</artifactId>
		</dependency>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-jdbc</artifactId>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid</artifactId>
		</dependency>
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>1.4.196</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<repositories>
		<repository>
			<id>nutz</id>
			<url>https://jfrog.nutz.cn/artifactory/jcenter</url>
		</repository>
		<repository>
			<id>nutz-snapshots</id>
			<url>https://jfrog.nutz.cn/artifactory/snapshots</url>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>always</updatePolicy>
			</snapshots>
			<releases>
				<enabled>false</enabled>
			</releases>
		</repository>
	</repositories>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.7.0</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<compilerArgs>
						<arg>-parameters</arg>
					</compilerArgs>
					<useIncrementalCompilation>false</useIncrementalCompilation>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<configuration>
					<additionalparam>-Xdoclint:none</additionalparam>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							<mainClass>io.nutz.demo.MainLauncher</mainClass>
						</manifest>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
								<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
									<resource>META-INF/nutz/org.nutz.boot.starter.NbStarter</resource>
								</transformer>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<mainClass>io.nutz.demo.MainLauncher</mainClass>
								</transformer>
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>

19 回复

使用的是 get.nutz.cn 生成的pom.xml

版本问题, 改成2.1-SNAPSHOT

看来得把老版本去掉了

改了也有这个问题

命令行下吗?

<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>io.nutz</groupId>
	<artifactId>demo</artifactId>
	<version>1.0-SNAPSHOT</version>
	<packaging>jar</packaging>
	<properties>
		<nutzboot.version>2.0</nutzboot.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.nutz</groupId>
				<artifactId>nutzboot-parent</artifactId>
				<version>${nutzboot.version}</version>
				<type>pom</type>
            	<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-swagger</artifactId>
		</dependency>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-jetty</artifactId>
		</dependency>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-nutz-mvc</artifactId>
		</dependency>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-nutz-dao</artifactId>
		</dependency>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-jdbc</artifactId>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid</artifactId>
		</dependency>
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>1.4.196</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<repositories>
		<repository>
			<id>nutz</id>
			<url>https://jfrog.nutz.cn/artifactory/jcenter</url>
		</repository>
		<repository>
			<id>nutz-snapshots</id>
			<url>https://jfrog.nutz.cn/artifactory/snapshots</url>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>always</updatePolicy>
			</snapshots>
			<releases>
				<enabled>false</enabled>
			</releases>
		</repository>
	</repositories>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.7.0</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<compilerArgs>
						<arg>-parameters</arg>
					</compilerArgs>
					<useIncrementalCompilation>false</useIncrementalCompilation>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<configuration>
					<additionalparam>-Xdoclint:none</additionalparam>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							<mainClass>io.nutz.demo.MainLauncher</mainClass>
						</manifest>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
								<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
									<resource>META-INF/nutz/org.nutz.boot.starter.NbStarter</resource>
								</transformer>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<mainClass>io.nutz.demo.MainLauncher</mainClass>
								</transformer>
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
Multiple annotations found at this line:
	- For artifact {org.nutz:nutzboot-starter-swagger:null:jar}: The version cannot be empty. (org.apache.maven.plugins:maven-
	 resources-plugin:2.6:resources:default-resources:process-resources) org.apache.maven.artifact.InvalidArtifactRTException: For 
	 artifact {org.nutz:nutzboot-starter-swagger:null:jar}: The version cannot be empty. at 
	 org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:148) at 
	 org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:123) at 
	 org.apache.maven.artifact.factory.DefaultArtifactFactory.createArtifact(DefaultArtifactFactory.java:157) at 
	 org.apache.maven.artifact.factory.DefaultArtifactFactory.createDependencyArtifact(DefaultArtifactFactory.java:57) at 
	 org.apache.maven.project.artifact.MavenMetadataSource.createDependencyArtifact(MavenMetadataSource.java:328) at 
	 org.apache.maven.project.artifact.MavenMetadataSource.createArtifacts(MavenMetadataSource.java:503) at 
	 org.apache.maven.lifecycle.internal.DefaultProjectArtifactFactory.createArtifacts(DefaultProjectArtifactFactory.java:50) at 
	 org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:
	 119) at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:330) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360) at 
	 org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200) at org.eclipse.core.internal.events.BuildManager
	 $2.run(BuildManager.java:735) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager
	 $1.run(BuildManager.java:301) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) at 
	 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) at 
	 org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) at 
	 org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:
	 55)
	- For artifact {org.nutz:nutzboot-starter-swagger:null:jar}: The version cannot be empty. (org.apache.maven.plugins:maven-
	 resources-plugin:2.6:testResources:default-testResources:process-test-resources) 
	 org.apache.maven.artifact.InvalidArtifactRTException: For artifact {org.nutz:nutzboot-starter-swagger:null:jar}: The version cannot 
	 be empty. at org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:148) at 
	 org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:123) at 
	 org.apache.maven.artifact.factory.DefaultArtifactFactory.createArtifact(DefaultArtifactFactory.java:157) at 
	 org.apache.maven.artifact.factory.DefaultArtifactFactory.createDependencyArtifact(DefaultArtifactFactory.java:57) at 
	 org.apache.maven.project.artifact.MavenMetadataSource.createDependencyArtifact(MavenMetadataSource.java:328) at 
	 org.apache.maven.project.artifact.MavenMetadataSource.createArtifacts(MavenMetadataSource.java:503) at 
	 org.apache.maven.lifecycle.internal.DefaultProjectArtifactFactory.createArtifacts(DefaultProjectArtifactFactory.java:50) at 
	 org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:
	 119) at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:330) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at 
	 org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360) at 
	 org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at 
	 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86) at 
	 org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200) at org.eclipse.core.internal.events.BuildManager
	 $2.run(BuildManager.java:735) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager
	 $1.run(BuildManager.java:301) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) at 
	 org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) at 
	 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) at 
	 org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) at 
	 org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:
	 55)

我说的是改成 2.1-SNAPSHOT呢, 你没改呢... 还是<nutzboot.version>2.0</nutzboot.version>

Eclipse Java EE IDE for Web Developers.
Version: Neon.3 Release (4.6.3)

Build id: 20170314-1500

M2E - Maven Integration for Eclipse
Version:1.70

刚刚更新了一下,把老版本的生成去掉了

<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>io.nutz</groupId>
	<artifactId>demo</artifactId>
	<version>1.0-SNAPSHOT</version>
	<packaging>jar</packaging>
	<properties>
		<nutzboot.version>2.1-SNAPSHOT</nutzboot.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.nutz</groupId>
				<artifactId>nutzboot-parent</artifactId>
				<version>${nutzboot.version}</version>
				<type>pom</type>
            	<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-swagger</artifactId>
		</dependency>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-jetty</artifactId>
		</dependency>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzboot-starter-nutz-mvc</artifactId>
		</dependency>
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<repositories>
		<repository>
			<id>nutz</id>
			<url>https://jfrog.nutz.cn/artifactory/jcenter</url>
		</repository>
		<repository>
			<id>nutz-snapshots</id>
			<url>https://jfrog.nutz.cn/artifactory/snapshots</url>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>always</updatePolicy>
			</snapshots>
			<releases>
				<enabled>false</enabled>
			</releases>
		</repository>
	</repositories>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.7.0</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<compilerArgs>
						<arg>-parameters</arg>
					</compilerArgs>
					<useIncrementalCompilation>false</useIncrementalCompilation>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<configuration>
					<additionalparam>-Xdoclint:none</additionalparam>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							<mainClass>io.nutz.demo.MainLauncher</mainClass>
						</manifest>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
								<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
									<resource>META-INF/nutz/org.nutz.boot.starter.NbStarter</resource>
								</transformer>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<mainClass>io.nutz.demo.MainLauncher</mainClass>
								</transformer>
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>

运行 eclipse 中的maven install

[INFO] Scanning for projects...
[INFO] Downloading: https://jfrog.nutz.cn/artifactory/jcenter/org/nutz/nutzboot-parent/2.1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-parent/2.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.nutz:nutzboot-parent:2.1-SNAPSHOT/maven-metadata.xml from/to nutz (https://jfrog.nutz.cn/artifactory/jcenter): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[WARNING] Could not transfer metadata org.nutz:nutzboot-parent:2.1-SNAPSHOT/maven-metadata.xml from/to nutz-snapshots (https://jfrog.nutz.cn/artifactory/snapshots): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[INFO] Downloading: https://jfrog.nutz.cn/artifactory/jcenter/org/nutz/nutzboot-parent/2.1-SNAPSHOT/nutzboot-parent-2.1-SNAPSHOT.pom
[INFO] Downloading: https://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-parent/2.1-SNAPSHOT/nutzboot-parent-2.1-SNAPSHOT.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not transfer artifact org.nutz:nutzboot-parent:pom:2.1-SNAPSHOT from/to nutz (https://jfrog.nutz.cn/artifactory/jcenter): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target @ line 14, column 16
[ERROR] 'dependencies.dependency.version' for org.nutz:nutzboot-starter-swagger:jar is missing. @ line 24, column 15
[ERROR] 'dependencies.dependency.version' for org.nutz:nutzboot-starter-jetty:jar is missing. @ line 28, column 15
[ERROR] 'dependencies.dependency.version' for org.nutz:nutzboot-starter-nutz-mvc:jar is missing. @ line 32, column 15
[ERROR] 'dependencies.dependency.version' for org.slf4j:slf4j-log4j12:jar is missing. @ line 59, column 15
[ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @ line 64, column 15
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project io.nutz:demo:1.0-SNAPSHOT (/Users/maodajun/Downloads/5i85qvf8c2jdqqus2o393rqa65/pom.xml) has 6 errors
[ERROR]     Non-resolvable import POM: Could not transfer artifact org.nutz:nutzboot-parent:pom:2.1-SNAPSHOT from/to nutz (https://jfrog.nutz.cn/artifactory/jcenter): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target @ line 14, column 16 -> [Help 2]
[ERROR]     'dependencies.dependency.version' for org.nutz:nutzboot-starter-swagger:jar is missing. @ line 24, column 15
[ERROR]     'dependencies.dependency.version' for org.nutz:nutzboot-starter-jetty:jar is missing. @ line 28, column 15
[ERROR]     'dependencies.dependency.version' for org.nutz:nutzboot-starter-nutz-mvc:jar is missing. @ line 32, column 15
[ERROR]     'dependencies.dependency.version' for org.slf4j:slf4j-log4j12:jar is missing. @ line 59, column 15
[ERROR]     'dependencies.dependency.version' for junit:junit:jar is missing. @ line 64, column 15
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

看README哦, JDK版本不能太低了, JDK8已经update 152了

最低支持多少版本?

最新版的jdk8就行啦

jdk 8-152 安装完成
但是:问题依旧

贴当前报错信息

命令行 mvn install 成功
基本确定 eclipse m2e 的版本有问题
不能解析 没有version的XML

@loveexception 额,难道你的eclipse版本很低,感觉不应该啊,是不是没执行 maven -- update project?

添加回复
请先登陆
回到顶部