Update version of Javadoc and author for all files?

I need to synchronize the tag of @versionall Javadocs classes in my project, as well as the tag @author. However, I do not know how to do this.

Is there a plugin (preferably a maven plugin) that can do this? And no, the maven-release plugin will not do this for me.

+1
source share
2 answers

The way I use @versionis related to @since. IMHO, I think, @versionrepresents the software version when this class was changed, and @sincerepresents the software version when this file / class was created.

@author - , - (- ) .

, , / . , , . , , .

, - .

+5

, , :

src/main/java <resource> outputDirectory. javadoc jar, - :

<build>
    <resources>
        <resource>
            <directory>src/main/java</directory>
            <targetPath>sources</targetPath>
            <filtering>true</filtering>
        </resource>
    </resources>

    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.6.1</version>
            <configuration>
                <sourcepath>${project.build.outputDirectory}/sources</sourcepath>
            </configuration>
            <!-- other config stripped -->
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.3</version>
            <configuration>
                <excludes>
                    <exclude>sources/**</exclude>
                </excludes>
            </configuration>
            <!-- other config stripped -->
        </plugin>
    </plugins>
</build>

maven (. maven )

+2

Source: https://habr.com/ru/post/1782681/


All Articles