そのクラスが見つからないため、Java アプリとしてコンパイルしようとすると問題が発生します。
Web を検索した後、スタック オーバーフローにより、クラスをクラス パスにコピーする必要があることがわかりましたが、図でわかるように、その依存関係やプロジェクト内のクラスはありません。
ここに写真があります:
これは私の pom.xml です:
<dependencies>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.6.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math</artifactId>
<version>2.2</version>
<scope>compile</scope>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xmlbeans-maven-plugin</artifactId>
<version>2.3.3</version>
<inherited>true</inherited>
<configuration>
<download>true</download>
<schemaDirectory>src/main/resources</schemaDirectory>
<sourceGenerationDirectory>src/main/java</sourceGenerationDirectory>
<classGenerationDirectory>target/classes</classGenerationDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>package-jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>se.sigma.educational.Main</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>target/generated-sources/axis2/wsdl2code/resources</directory>
</resource>
<resource>
<directory>target/generated-sources/xmlbeans/resources</directory>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
(< / dependencies > タグが追加されていますが、ここには表示されていません)。
そのクラスがこのパッケージに含まれていることを示したいのですが、それを使用できるかどうかわかりません:
私はmaven buildとして実行し、その後maven installとして実行しましたが、この時点では問題ありません(ビルド成功)が、メインクラスから呼び出そうとするとエラーが発生します。
さらに詳しい情報が必要な場合は、お尋ねください。