Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

classpath error: unable to find org.aspectj.lang.JoinPoint

I am using maven to build my project. It was compiling successfully earlier. It has started to give an error when I do mvn clean install.

[ERROR] classpath error: unable to find org.aspectj.lang.JoinPoint (check that aspectjrt.jar is in your classpath)

Below is my 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>com.guavus</groupId>
    <artifactId>Exporter</artifactId>
    <version>atlas2.1</version>
    <packaging>jar</packaging>

    <name>Exporter</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <aspectj.version>1.6.10</aspectj.version>
        <org.springframework.version>3.0.5.RELEASE</org.springframework.version>        
    </properties>

    <build>
         <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.0-beta-2</version>
                <configuration>
                    <reportPlugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <version>2.7</version>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-jxr-plugin</artifactId>
                            <version>2.1</version>
                            <configuration>
                                <aggregate>true</aggregate>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-report-plugin</artifactId>
                            <version>2.6</version>
                        </plugin>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>cobertura-maven-plugin</artifactId>
                            <version>2.4</version>
                            <configuration>
                                <formats>
                                    <format>xml</format>
                                    <format>html</format>
                                </formats>
                            </configuration>
                        </plugin>
                        <!--
                            plugin> <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-checkstyle-plugin</artifactId>
                            <version>2.6</version> </plugin
                        -->
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-pmd-plugin</artifactId>
                            <version>2.5</version>
                            <configuration>
                                <rulesets>
                                    <ruleset>/rulesets/basic.xml</ruleset>
                                    <ruleset>/rulesets/design.xml</ruleset>
                                    <ruleset>/rulesets/logging-java.xml</ruleset>
                                </rulesets>
                                <targetJdk>1.5</targetJdk>
                                <format>xml</format>
                                <linkXref>true</linkXref>
                                <sourceEncoding>utf-8</sourceEncoding>
                                <minimumTokens>100</minimumTokens>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-project-info-reports-plugin</artifactId>
                            <version>2.3.1</version>
                        </plugin>
                    </reportPlugins>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.3</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <aspectDirectory>src/main/aspect</aspectDirectory>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>       <!-- use this goal to weave all your main classes -->
                        </goals>
                    </execution>
               </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
           </plugin>        
        </plugins>
    </build>

    <dependencies>
    <!-- local snapshots  -->
        <dependency>
            <groupId>com.guavus</groupId>
            <artifactId>CubeCreator</artifactId>
            <version>atlas2.1</version>
        </dependency>
        <dependency>
            <groupId>com.guavus</groupId>
            <artifactId>ConcurrentFlows</artifactId>
            <version>atlas2.1</version>
        </dependency>
        <dependency>
            <groupId>ps</groupId>
            <artifactId>thriftGenerated</artifactId>
            <version>atlas2.1</version>
        </dependency>
    <!-- local snapshots  -->
    <!-- local 3rd Party -->
        <dependency>
            <groupId>apache</groupId>
            <artifactId>libthrift</artifactId>
            <version>0.5.0</version>
        </dependency>
    <!-- local 3rd Party -->
    <!-- remote 3rd Party -->
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-core</artifactId>
            <version>0.20.203.0</version>
        </dependency>
        <dependency>
          <groupId>com.google.code.gson</groupId>
          <artifactId>gson</artifactId>
          <version>1.7.1</version>
        </dependency>

    <!-- remote 3rd Party -->
        <!-- test libs -->
        <!-- test libs -->
    <dependency>
                <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                <version>1.2.16</version>
        </dependency>
                <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.6.4</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-access</artifactId>
                <version>1.0.1</version>
        </dependency>
        <dependency>
                <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
                <version>1.0.1</version>
        </dependency>
        <dependency>
                <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
                <version>1.0.1</version>
        </dependency>


    </dependencies>

</project>
like image 677
Archit Thakur Avatar asked Jan 21 '13 06:01

Archit Thakur


1 Answers

I would guess you are missing a dependency? Some Googling suggests you might need to import:

<dependency>
  <groupId>aspectj</groupId>
  <artifactId>aspectjrt</artifactId>
  <version>1.5.4</version>
</dependency>

Note that 1.5.4 is the latest version as reported by: http://mvnrepository.com/artifact/aspectj/aspectjrt

like image 199
Duncan Jones Avatar answered Nov 02 '22 14:11

Duncan Jones