maven小例子,要编译成jar包。但是install不通过。求教!
[INFO]---maven-resources-plugin:2.6:resources(default-resources)@assembler---[WARNING...
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ assembler ---
[WARNING] Error injecting: org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering
java.lang.NoClassDefFoundError: Lorg/sonatype/plexus/build/incremental/BuildContext;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2300)
at java.lang.Class.getDeclaredFields(Class.java:1745)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:661)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:366)
at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:165)
at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:609)
[WARNING] Error injecting: org.apache.maven.plugin.resources.ResourcesMojo
java.lang.NoClassDefFoundError: Lorg/sonatype/plexus/build/incremental/BuildContext;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2300)
at java.lang.Class.getDeclaredFields(Class.java:1745) 展开
[WARNING] Error injecting: org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering
java.lang.NoClassDefFoundError: Lorg/sonatype/plexus/build/incremental/BuildContext;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2300)
at java.lang.Class.getDeclaredFields(Class.java:1745)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:661)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:366)
at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:165)
at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:609)
[WARNING] Error injecting: org.apache.maven.plugin.resources.ResourcesMojo
java.lang.NoClassDefFoundError: Lorg/sonatype/plexus/build/incremental/BuildContext;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2300)
at java.lang.Class.getDeclaredFields(Class.java:1745) 展开
2个回答
展开全部
编译jar包没必要install,只要package就可以了
更多追问追答
追问
package也报上面的错啊。
追答
NoClassDefFoundError表示有依赖未引入,可以加入依赖:
org.sonatype.plexus plexus-build-api 0.0.7
version 是版本号,目前最新是0.0.7
http://mvnrepository.com/artifact/org.sonatype.plexus/plexus-build-api
2014-01-20
展开全部
<dependency> <groupId>org.sonatype.plexus</groupId> <artifactId>plexus-build-api</artifactId> <version>****</version> </dependency>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询