In Maven, to get additional artifacts -sourcesand -javadoc, add the following to your POM file:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
:
mvn clean package
target.
.pom install, target. , pom.xml Maven , , .
mvn clean install
Maven ( ) path_to_cache/.m2/repository/your_groupId/your_artifactId/your_version/. .pom, ( Maven).
: , , jar , , , Maven.
, build pom:
<profiles>
<profile>
<id>prepare-distribution</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
, :
mvn clean install -Pprepare-distribution
. -P , prepare-distribution.
Maven 3 super pom, ( javadoc), . :
mvn clean install -Prelease-profile
,
mvn clean install -DperformRelease=true
, , ( Maven 3 3.3.9) )
. POM
, , Maven Release Plugin, useReleaseProfile release:perform.
, maven ( ),