为什么我不能打包这个maven项目?

时间:2022-09-03 22:57:23

when I open the maven project in eclipse it compiles fine but when I do "mvn package" it fails.

当我在eclipse中打开maven项目它编译得很好但是当我做“mvn package”它失败了。

How do I solve this problem?

我该如何解决这个问题?

3 个解决方案

#1


0  

AnnotationProcessorFactory (APT) is a standard tool and supplied as part of the JDK. You are missing tools.jar into your classpath. Check your Java installation.

AnnotationProcessorFactory(APT)是一种标准工​​具,作为JDK的一部分提供。您在类路径中缺少tools.jar。检查Java安装。

#2


0  

Make sure that you are running Maven from a JDK. Also, for Java 7, try to force a Dependency to tools.jar

确保从JDK运行Maven。此外,对于Java 7,尝试强制依赖于tools.jar

<dependency>
   <groupId>com.sun</groupId>
   <artifactId>tools</artifactId>
   <version>${java.version}</version>
   <scope>system</scope>
   <systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>

#3


0  

I solved the problem by doing "update maven project" from within eclipse.

我通过在eclipse中做“更新maven项目”解决了这个问题。

#1


0  

AnnotationProcessorFactory (APT) is a standard tool and supplied as part of the JDK. You are missing tools.jar into your classpath. Check your Java installation.

AnnotationProcessorFactory(APT)是一种标准工​​具,作为JDK的一部分提供。您在类路径中缺少tools.jar。检查Java安装。

#2


0  

Make sure that you are running Maven from a JDK. Also, for Java 7, try to force a Dependency to tools.jar

确保从JDK运行Maven。此外,对于Java 7,尝试强制依赖于tools.jar

<dependency>
   <groupId>com.sun</groupId>
   <artifactId>tools</artifactId>
   <version>${java.version}</version>
   <scope>system</scope>
   <systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>

#3


0  

I solved the problem by doing "update maven project" from within eclipse.

我通过在eclipse中做“更新maven项目”解决了这个问题。