1

java maven コンパイル エラー: シンボルが見つかりません Eclipse を使用して、リモートの Linux マシンから Java maven プロジェクトをビルドしています。Eclipse Remote System Explorer (RSE) を使用してプロジェクトに接続します。プロジェクトをクリーン インストールしたい場合、maven がクラスの一部を見つけられないようです。

これがエラーで、プロジェクトの POM ファイルです。

エラー:

[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:

<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>
4

1 に答える 1