2016-06-23 3 views
2

Eclipse 4.5 (화성)의 https://github.com/ihsanhaikalz/testMaven에있는 Maven 프로젝트를 실행하고 싶습니다만, 다음과 같이 pom.xml에 오류가 발생했습니다. :종속성 오류 AspectJ Maven 플러그인 설치 com : sun : tools : jar

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를 통해 이클립스 4.5 AJDT를 설치하고 내 GitHub의에서 가져온 때 이클립스 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> 

입니다. 감사합니다

+0

Java 홈이 올바르게 설정되어 있습니까? – uniknow

+0

@uniknow 예 환경 변수에서 사용한 jdk에 이미 자바 홈을 설정했지만 여전히 오류가 발생했습니다. –

+0

이걸 지나간 적이 있습니까? 나는 동일한 문제가 있습니다 ... – HDave

답변

1

결국이 문제를 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> 
+0

이것은 해결책. 내 대답을 보라. – kriegaex