简体   繁体   English

java maven编译错误:找不到符号

[英]java maven COMPILATION ERROR : cannot find symbol

java maven COMPILATION ERROR : cannot find symbol I am using eclipse to build a java maven project from a remote linux machine. java maven编译错误:找不到符号我正在使用eclipse从远程linux机器上构建Java maven项目。 I get connected to project using Eclipse Remote System Explorer (RSE). 我使用Eclipse远程系统资源管理器(RSE)连接到项目。 When I want to clean install the project, it seems that maven cannot find some of my classes. 当我要全新安装项目时,似乎maven找不到我的某些类。

This is the error and I the project POM file. 这是错误,我是项目POM文件。

Error: 错误:

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ rule_miner ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\pita\eclipse-workspace\RemoteSystemsTempFiles\192.168.45.102\home\ubuntu\newRR\rudik\target  classes

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/pita/eclipse-workspace/RemoteSystemsTempFiles/192.168.45.102/home/ubuntu/newRR/rudik/src/main/java/asu/edu/rule_miner/rudik/model/horn_rule/HornRule.java:[13,32] cannot 
find symbol
  symbol:   class RuleMinerException
  location: package asu.edu.rule_miner.rudik
[ERROR] /C:/Users/pita/eclipse-workspace/RemoteSystemsTempFiles/192.168.45.102/home/ubuntu/newRR/rudik/src/main/java/asu/edu/rule_miner/rudik/model/horn_rule/HornRule.java:[14,46] package 
asu.edu.rule_miner.rudik.configuration does not exist
....
....
....
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, 
please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

POM: POM:

<build>

    <!-- Plugin management -->
    <pluginManagement>

        <plugins>
            <!-- Configure the SSH/SCP connector -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-ssh</artifactId>
                        <version>1.0</version>
                    </dependency>
                </dependencies>
            </plugin>

        </plugins>

    </pluginManagement>

    <!-- Plugins used to modify build-lifecycle behaviour -->
    <plugins>

        <!-- Generate and install source, bound to verify phase, it is active 
            in case of install and deploy -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.1.2</version>
            <executions>
                <execution>
                    <id>attach-sources</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>jar-no-fork</goal>
                        <goal>test-jar-no-fork</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <!-- Generate javadoc, bound to deploy phase -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8.1</version>
            <executions>
                <execution>
                    <id>attach-javadocs</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <!-- Forces the compiler to 1.8 (source and target) -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>

        <!-- Site generation plugin -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.3</version>
            <configuration>

                <reportPlugins>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-project-info-reports-plugin</artifactId>
                        <version>2.7</version>
                        <reportSets>
                            <reportSet>
                                <reports>
                                    <report>dependencies</report>
                                    <report>project-team</report>
                                    <report>license</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>

                        <reportSets>
                            <reportSet>
                                <id>default</id>
                                <reports>
                                    <report>javadoc</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                    </plugin>
                </reportPlugins>
            </configuration>
        </plugin>

    </plugins>
</build>

Looks like 看起来像

asu.edu.rule_miner.rudik.configuration asu.edu.rule_miner.rudik.configuration

is not in your class path. 不在您的课程路径中。 Add the dependency to you pom or check if class is accessible. 将依赖项添加到pom或检查类是否可访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM