Add maven source plugin for deploy source code jar

This commit is contained in:
hongqiaowei
2021-11-08 18:21:29 +08:00
parent 934351f1dd
commit 3fbb5d5cb7
5 changed files with 64 additions and 0 deletions

View File

@@ -116,6 +116,10 @@
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin> <plugin>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version> <version>3.2.4</version>

View File

@@ -345,4 +345,13 @@
</snapshots> </snapshots>
</repository> </repository>
</repositories> </repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@@ -260,4 +260,12 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@@ -262,4 +262,12 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

35
pom.xml
View File

@@ -462,6 +462,29 @@
</license> </license>
</licenses> </licenses>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles> <profiles>
<!--<profile> <!--<profile>
<id>local</id> <id>local</id>
@@ -566,4 +589,16 @@
</distributionManagement> </distributionManagement>
</profile> </profile>
</profiles> </profiles>
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>local private nexus</name>
<url>http://gzmaven.bestwehotel.com/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>local private nexus</name>
<url>http://gzmaven.bestwehotel.com/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project> </project>