2017-02-18 11 views
0

Eclipse Mars.2 4.5.2を使用しています。 Mavenビルドは成功です。展開時に、私は次のエラーを取得する:配備中のMavenビルドワークスがクラスが見つかりません。

にjava.lang.ClassNotFoundException:

}} ":[サービスモジュールローダからモジュール\ "メインの\ deployment.mavenFlowChartDB5.war"]でcom.authy.AuthyApiClientからMavenの依存関係のディレクトリが、私は依存関係のエントリの下にクラスに関連した依存関係を参照してください。

ライブラリ> Mavenの依存関係> authy-のjava-1.1.0.jar> com.auth.AuthyApiCLient

ない理由デプロイメントに欠けているクラスがありますか?

<?xml version="1.0" encoding="UTF-8"?> 
<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.mycompany</groupId> 
     <artifactId>mavenFlowChartDB5</artifactId> 
     <version>1.0-SNAPSHOT</version> 
    <packaging>war</packaging> 

    <name>mavenFlowChartDB5</name> 

    <properties> 
     <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    </properties> 

    <dependencies> 
     <dependency> 
      <groupId>org.primefaces</groupId> 
      <artifactId>primefaces</artifactId> 
      <version>6.0</version> 
     </dependency> 

     <dependency> 
      <groupId>commons-fileupload</groupId> 
      <artifactId>commons-fileupload</artifactId> 
      <version>1.3</version> 
     </dependency> 
     <dependency> 
      <groupId>commons-io</groupId> 
      <artifactId>commons-io</artifactId> 
      <version>2.4</version> 
     </dependency> 

     <dependency> 
      <groupId>org.apache.httpcomponents</groupId> 
      <artifactId>httpclient</artifactId> 
      <version>4.5.1</version> 
     </dependency> 

     <dependency> 
      <groupId>org.eclipse.persistence</groupId> 
      <artifactId>eclipselink</artifactId> 
      <version>2.5.1</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.eclipse.persistence</groupId> 
      <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId> 
      <version>2.5.1</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>javax</groupId> 
      <artifactId>javaee-web-api</artifactId> 
      <version>7.0</version> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
    <groupId>org.postgresql</groupId> 
    <artifactId>postgresql</artifactId> 
    <version>9.2-1002-jdbc4</version> 
</dependency> 
<dependency> 
    <groupId>com.amazonaws</groupId> 
    <artifactId>aws-java-sdk</artifactId> 
    <version>1.8.2</version> 
</dependency> 
<dependency> 
    <groupId>org.jboss.ejb3</groupId> 
    <artifactId>jboss-ejb3-ext-api</artifactId> 
    <version>2.1.0</version> 
</dependency> 
     <dependency> 
      <groupId>com.authy</groupId> 
      <artifactId>authy-java</artifactId> 
      <version>1.1.0</version> 
     </dependency> 
    </dependencies> 

    <build> 
     <plugins> 
      <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> 
        <compilerArguments> 
         <endorseddirs>${endorsed.dir}</endorseddirs> 
        </compilerArguments> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-war-plugin</artifactId> 
       <version>2.3</version> 
       <configuration> 
        <failOnMissingWebXml>false</failOnMissingWebXml> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-dependency-plugin</artifactId> 
       <version>2.6</version> 
       <executions> 
        <execution> 
         <phase>validate</phase> 
         <goals> 
          <goal>copy</goal> 
         </goals> 
         <configuration> 
          <outputDirectory>${endorsed.dir}</outputDirectory> 
          <silent>true</silent> 
          <artifactItems> 
           <artifactItem> 
            <groupId>javax</groupId> 
            <artifactId>javaee-endorsed-api</artifactId> 
            <version>7.0</version> 
            <type>jar</type> 
           </artifactItem> 
          </artifactItems> 
         </configuration> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 
    </build> 
    <repositories> 
     <repository> 
      <url>http://repository.primefaces.org/</url> 
      <id>PrimeFaces-maven-lib</id> 
      <layout>default</layout> 
      <name>Repository for library PrimeFaces-maven-lib</name> 
     </repository> 
     <repository> 
      <id>jboss-public-repository-group</id> 
      <name>JBoss Public Maven Repository Group</name> 
      <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url> 
      <layout>default</layout> 
      <releases> 
      <enabled>true</enabled> 
      <updatePolicy>never</updatePolicy> 
      </releases> 
      <snapshots> 
      <enabled>true</enabled> 
      <updatePolicy>never</updatePolicy> 
      </snapshots> 
     </repository> 
     </repositories> 
     <pluginRepositories> 
     <pluginRepository> 
      <id>jboss-public-repository-group</id> 
      <name>JBoss Public Maven Repository Group</name> 
      <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url> 
      <layout>default</layout> 
      <releases> 
      <enabled>true</enabled> 
      <updatePolicy>never</updatePolicy> 
      </releases> 
      <snapshots> 
      <enabled>true</enabled> 
      <updatePolicy>never</updatePolicy> 
      </snapshots> 
     </pluginRepository> 
     </pluginRepositories> 
</project> 

これは更新されたpom.xmlです。私はまだ同じエラーが発生します。私はmaven-compiler-pluginが数回繰り返されていることに気付きました。私はこの部分を追加しました。

<manifest> 
          <addClasspath>true</addClasspath> 
         </manifest> 

<build> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <version>3.1</version> 
       <configuration> 
        <archive> 
         <manifest> 
          <addClasspath>true</addClasspath> 
         </manifest> 
        </archive> 
        <source>1.8</source> 
        <target>1.8</target> 
        <compilerArguments> 
         <endorseddirs>${endorsed.dir}</endorseddirs> 
        </compilerArguments> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-war-plugin</artifactId> 
       <version>2.3</version> 
       <configuration> 
        <failOnMissingWebXml>false</failOnMissingWebXml> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-dependency-plugin</artifactId> 
       <version>2.6</version> 
       <executions> 
        <execution> 
         <phase>validate</phase> 
         <goals> 
          <goal>copy</goal> 
         </goals> 
         <configuration> 
          <outputDirectory>${endorsed.dir}</outputDirectory> 
          <silent>true</silent> 
          <artifactItems> 
           <artifactItem> 
            <groupId>javax</groupId> 
            <artifactId>javaee-endorsed-api</artifactId> 
            <version>7.0</version> 
            <type>jar</type> 
           </artifactItem> 
          </artifactItems> 
         </configuration> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 
    </build> 
+0

pom.xmlを提供できますか? –

+0

Eclipseからデプロイしていますか?そうでない場合はどう? –

+0

はいEclipseからデプロイしています。 – Android

答えて

0

あなたがmavenFlowChartDB5戦争のためにマニフェストのクラスパスエントリを追加していないためと考えられます。 thisのドキュメントを使用して追加してみてください。

+0

私は以下を追加しました: true Android

関連する問題