为什么没有为胖罐中的方法显示注释?

时间:2015-12-07 15:21:19

标签: java maven javadoc maven-assembly-plugin maven-javadoc-plugin

同事们,我有一个创建胖罐的POM:

<properties>
        <java.version>1.8</java.version>
        <jdk.version>1.8</jdk.version>
        <spring.version>4.2.2.RELEASE</spring.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>



    <dependencies>


        <!-- Spring framework -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>4.2.3.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>4.2.3.RELEASE</version>
        </dependency>


        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>

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



        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.11.0</version>
        </dependency>



    </dependencies>

    <build>


        <plugins>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19</version>
                    <executions>
                    <execution>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>


                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit47</artifactId>
                        <version>2.19</version>
                    </dependency>
                </dependencies>

                <configuration>
                    <includes>
                        <include>AdapterAppTest.java</include>
                    </includes>
                </configuration>
            </plugin>



            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                <!-- TODO исключить ряд библиотек  -->
                <appendAssemblyId>false</appendAssemblyId>
                    <archive>
                        <manifest>
                            <mainClass>com.comp.adapter</mainClass>
                        </manifest>
                    </archive>
                     <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs> 
                </configuration>
            </plugin>



        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
             <executions>
                <execution>
                    <id>attach-javadocs</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>javadoc</goal>
                    </goals>
                    <configuration>
                        <excludePackageNames>com.comp.entities</excludePackageNames>
                        <additionalparam>-Xdoclint:none</additionalparam> 
                        <reportOutputDirectory>${project.build.directory}/classes/</reportOutputDirectory>
                    </configuration>
                </execution>
            </executions> 
        </plugin>

        </plugins>
    </build>

因此,我在文件夹\ target \ classes \ apidocs中有胖jar和javadoс描述。  之后我将这个胖罐加入到新项目中(Add External Jar),但是在使用方法时我没有看到方法描述。为什么和我做错了什么?

更新

Ide eclipse

更新2 jar中没有* .java文件。

0 个答案:

没有答案