Skip to content

Commit 2accd93

Browse files
committed
fix: javadoc / sources generation
1 parent a3dd30d commit 2accd93

File tree

2 files changed

+36
-7
lines changed

2 files changed

+36
-7
lines changed

maven-central-publish.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
# Deploy maven artefact in current directory into Maven central repository
4+
# using maven-release-plugin goals
5+
6+
read -p "Really publish to maven cetral repository (yes/no)? "
7+
8+
if ( [ "$REPLY" == "yes" ] ) then
9+
eval `ssh-agent`
10+
ssh-add ~/.ssh/id_rsa
11+
ssh-add -l
12+
mvn deploy -e
13+
ssh-add -D
14+
else
15+
echo 'Exit without deploy'
16+
fi

pom.xml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@
5151
</pluginManagement>
5252

5353
<plugins>
54+
<plugin>
55+
<groupId>org.apache.maven.plugins</groupId>
56+
<artifactId>maven-source-plugin</artifactId>
57+
<executions>
58+
<execution>
59+
<id>attach-sources</id>
60+
<goals>
61+
<goal>jar</goal>
62+
</goals>
63+
</execution>
64+
</executions>
65+
</plugin>
5466
<plugin>
5567
<groupId>org.apache.maven.plugins</groupId>
5668
<artifactId>maven-release-plugin</artifactId>
@@ -92,12 +104,6 @@
92104
</configuration>
93105
</plugin>
94106

95-
<plugin>
96-
<groupId>org.apache.maven.plugins</groupId>
97-
<artifactId>maven-source-plugin</artifactId>
98-
<version>3.3.0</version>
99-
</plugin>
100-
101107
<plugin>
102108
<groupId>org.codehaus.mojo</groupId>
103109
<artifactId>license-maven-plugin</artifactId>
@@ -134,12 +140,19 @@
134140
<plugin>
135141
<groupId>org.apache.maven.plugins</groupId>
136142
<artifactId>maven-javadoc-plugin</artifactId>
137-
<version>3.6.3</version>
138143
<configuration>
139144
<failOnWarnings>false</failOnWarnings>
140145
<charset>UTF-8</charset>
141146
<encoding>UTF-8</encoding>
142147
</configuration>
148+
<executions>
149+
<execution>
150+
<id>attach-javadocs</id>
151+
<goals>
152+
<goal>jar</goal>
153+
</goals>
154+
</execution>
155+
</executions>
143156
</plugin>
144157
<plugin>
145158
<artifactId>maven-surefire-plugin</artifactId>

0 commit comments

Comments
 (0)