gpt4 book ai didi

java - com :sun:tools:jar 的 AspectJ Maven 插件安装依赖错误

转载 作者:行者123 更新时间:2023-11-30 08:35:53 24 4
gpt4 key购买 nike

我想运行我在 https://github.com/ihsanhaikalz/testMaven 上的 Maven 项目在 Eclipse 4.5 (Mars) 中,但它在 pom.xml 中给我一个错误,如下所示:

1 problem was encountered while building the effective model for
org.codehaus.mojo:aspectj-maven-plugin:1.8 [ERROR]
'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an
absolute path but is ${toolsjarSystemPath} @

我已经通过 http://download.eclipse.org/tools/ajdt/45/dev/update 安装了 AJDT for Eclipse 4.5|当我从我的 github 中拉出时,Eclipse 开始下载 Maven 插件连接器和 AJDT 的 Maven 集成,但错误仍然存​​在。我已经尝试关注 thisthis仍然没有运气。

这是我的 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>testMaven</groupId>
<artifactId>testMaven</artifactId>
<version>0.0.1-SNAPSHOT</version>

<properties>

<java.version>1.8</java.version>
<aspectj.version>1.8.9</aspectj.version>
<!-- Maven Plugin Versions -->
<maven.compiler.plugin.version>3.2</maven.compiler.plugin.version>

</properties>

<repositories>
<repository>
<id>anon.inf.tu-dresden.de-snapshots</id>
<url>http://anon.inf.tu-dresden.de/artifactory/repo/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>

<build>

<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.8</version>
<configuration>
<complianceLevel>${java.version}</complianceLevel>
<source>${java.version}</source>
<target>${java.version}</target>
<showWeaveInfo>true</showWeaveInfo>
</configuration>
<executions>
<execution>
<id>AspectJ-Classes</id>
<phase>process-classes</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>AspectJ-Test-Classes</id>
<phase>process-test-classes</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>

</build>
</project>

感谢任何帮助。谢谢

最佳答案

最后我无法 100% 解决这个问题,但我通过将 aspectj-maven-plugin 的版本从 1.8 更改为 1.7 找到了解决这个问题的替代方案。以下是新 pom.xml 的摘录:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<complianceLevel>${java.version}</complianceLevel>
<source>${java.version}</source>
<target>${java.version}</target>
<showWeaveInfo>true</showWeaveInfo>
</configuration>
<executions>
<execution>
<id>AspectJ-Classes</id>
<phase>process-classes</phase>
<goals>
<goal>compile</goal>
</goals>
<execution>
<execution>
<id>AspectJ-Test-Classes</id>
<phase>process-test-classes</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>

关于java - com :sun:tools:jar 的 AspectJ Maven 插件安装依赖错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37994466/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com