2017-06-13 2 views
0

generieren Ich möchte Javadoc aus meinem Code in Intellij Idee generieren. Ich gehe Schritt für Schritt von This link. aber ich bekomme kein passendes Ergebnis.kann nicht javadoc über javadoc-maven-plugin

Aber nach "mvn Paket" gibt es keine "attach-Source-javadoc-1.0-SNAPSHOT-javadoc.jar" und "attach-Source-javadoc-1.0-SNAPSHOT-sources.jar" Dateien unter Zielordnern zu tun.

Das ist die ganze pom-Datei:

<?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> 
     <packaging>war</packaging> 
     <groupId>gdg</groupId> 
     <artifactId>dfgdfg</artifactId> 
     <version>1.0-SNAPSHOT</version> 
     <properties> 
     ........... 
    </properties> 

    <dependencies> 

     ............... 
    </dependencies> 
    <build> 
     <pluginManagement> 
      <plugins> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-source-plugin</artifactId> 
        <executions> 
         <execution> 
          <id>attach-sources</id> 
          <goals> 
           <goal>jar</goal> 
          </goals> 
         </execution> 
        </executions> 
       </plugin> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-javadoc-plugin</artifactId> 
        <executions> 
         <execution> 
          <id>attach-javadocs</id> 
          <goals> 
           <goal>jar</goal> 
          </goals> 
         </execution> 
        </executions> 
       </plugin> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-compiler-plugin</artifactId> 
        <version>3.1</version> 
        <configuration> 
         <source>1.7</source> 
         <target>1.7</target> 
         <skip>true</skip> 
        </configuration> 
       </plugin> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-war-plugin</artifactId> 
        <version>2.6</version> 
        <configuration> 
         <warSourceDirectory>src/main/webapp</warSourceDirectory> 
         <failOnMissingWebXml>false</failOnMissingWebXml> 
        </configuration> 


       </plugin> 
       </plugins> 
      </pluginManagement> 
     </build> 

    </project> 
+0

Können Sie die komplette pom.xml hinzufügen? – Jens

+0

@Jens Der Code wird aktualisiert. – user5621266

Antwort

0

Sie haben das Plugin zum <pluginManagement hinzugefügt>, die nicht ausgeführt wird.

Sie haben diese direkt in <plugins> setzen:

<build> 
      <plugins> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-source-plugin</artifactId> 
        <executions> 
         <execution> 
          <id>attach-sources</id> 
          <goals> 
           <goal>jar</goal> 
          </goals> 
         </execution> 
        </executions> 
       </plugin> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-javadoc-plugin</artifactId> 
        <executions> 
         <execution> 
          <id>attach-javadocs</id> 
          <goals> 
           <goal>jar</goal> 
          </goals> 
         </execution> 
        </executions> 
     <configuration> 
      <failOnError>false</failOnError> 
     </configuration> 
       </plugin> 
    </plugins> 
<build> 
+0

Ich habe einige persische Charakter hartcodiert, nachdem mvn Paket schreiben es Fehler gibt: – user5621266

+0

@ user5621266 können Sie die Fehlermeldung fügen Sie bitte – Jens

+0

@ user5621266 fügen Sie folgendes: \t \t \t \t ' \t \t \t \t \t false \t \t \t \t ' – Jens

Verwandte Themen