|
144 | 144 |
|
145 | 145 | </dependencies> |
146 | 146 |
|
| 147 | + |
| 148 | + <profiles> |
| 149 | + <profile> |
| 150 | + <!-- |
| 151 | + This profile is needed when making a deployment to Maven Central. |
| 152 | +
|
| 153 | + 0) make sure you are on the "master" branch |
| 154 | +
|
| 155 | + 1) update release_notes.md before preparing a new release |
| 156 | +
|
| 157 | + 2) manually update <version> in thi file. Typically just remove the -SNAPSHOT tag. |
| 158 | + Git commit/push. |
| 159 | +
|
| 160 | + 3) run: |
| 161 | + mvn -P release -DskipTests deploy |
| 162 | +
|
| 163 | + IMPORTANT: must make sure you are building with JDK 8!!! |
| 164 | +
|
| 165 | + make sure it is visible at: |
| 166 | + https://central.sonatype.com/artifact/com.webfuzzing/commons |
| 167 | + if not, check publishing status at |
| 168 | + https://central.sonatype.com/publishing/deployments (requires login) |
| 169 | +
|
| 170 | + 4) run: |
| 171 | + git tag v<x.y.z> |
| 172 | + git push origin v<x.y.z> |
| 173 | +
|
| 174 | + 5) increase version number, and put back -SNAPSHOT. |
| 175 | + Git commit/push. |
| 176 | + --> |
| 177 | + <id>release</id> |
| 178 | + <build> |
| 179 | + <plugins> |
| 180 | + <plugin> |
| 181 | + <groupId>org.apache.maven.plugins</groupId> |
| 182 | + <artifactId>maven-gpg-plugin</artifactId> |
| 183 | + </plugin> |
| 184 | + <plugin> |
| 185 | + <groupId>org.sonatype.central</groupId> |
| 186 | + <artifactId>central-publishing-maven-plugin</artifactId> |
| 187 | + </plugin> |
| 188 | + </plugins> |
| 189 | + </build> |
| 190 | + </profile> |
| 191 | + </profiles> |
| 192 | + |
| 193 | + |
| 194 | + |
147 | 195 | <build> |
| 196 | + <pluginManagement> |
| 197 | + <plugins> |
| 198 | + <!-- To deploy to Maven Central |
| 199 | + https://central.sonatype.com/account |
| 200 | + https://central.sonatype.org/publish/publish-portal-maven/ |
| 201 | + --> |
| 202 | + <plugin> |
| 203 | + <groupId>org.sonatype.central</groupId> |
| 204 | + <artifactId>central-publishing-maven-plugin</artifactId> |
| 205 | + <version>0.7.0</version> |
| 206 | + <extensions>true</extensions> |
| 207 | + <configuration> |
| 208 | + <publishingServerId>central</publishingServerId> |
| 209 | + <autoPublish>true</autoPublish> |
| 210 | + </configuration> |
| 211 | + </plugin> |
| 212 | + <!-- To sign Jar files before uploading them to Maven Central --> |
| 213 | + <plugin> |
| 214 | + <groupId>org.apache.maven.plugins</groupId> |
| 215 | + <artifactId>maven-gpg-plugin</artifactId> |
| 216 | + <version>1.6</version> |
| 217 | + <executions> |
| 218 | + <execution> |
| 219 | + <id>sign-artifacts</id> |
| 220 | + <phase>deploy</phase> |
| 221 | + <goals> |
| 222 | + <goal>sign</goal> |
| 223 | + </goals> |
| 224 | + </execution> |
| 225 | + </executions> |
| 226 | + </plugin> |
| 227 | + </plugins> |
| 228 | + </pluginManagement> |
| 229 | + |
| 230 | + |
148 | 231 | <plugins> |
149 | 232 | <plugin> |
150 | 233 | <groupId>org.apache.maven.plugins</groupId> |
|
166 | 249 | <runOrder>alphabetical</runOrder> |
167 | 250 | </configuration> |
168 | 251 | </plugin> |
| 252 | + <plugin> |
| 253 | + <groupId>org.apache.maven.plugins</groupId> |
| 254 | + <artifactId>maven-source-plugin</artifactId> |
| 255 | + <version>3.2.0</version> |
| 256 | + <executions> |
| 257 | + <execution> |
| 258 | + <id>create-sources</id> |
| 259 | + <phase>verify</phase> |
| 260 | + <goals> |
| 261 | + <goal>jar</goal> |
| 262 | + </goals> |
| 263 | + </execution> |
| 264 | + </executions> |
| 265 | + </plugin> |
| 266 | + <plugin> |
| 267 | + <groupId>org.apache.maven.plugins</groupId> |
| 268 | + <artifactId>maven-javadoc-plugin</artifactId> |
| 269 | + <version>3.1.1</version> |
| 270 | + <configuration> |
| 271 | + <source>8</source> |
| 272 | + </configuration> |
| 273 | + <executions> |
| 274 | + <execution> |
| 275 | + <id>create-javadocs</id> |
| 276 | + <phase>verify</phase> |
| 277 | + <goals> |
| 278 | + <goal>jar</goal> |
| 279 | + </goals> |
| 280 | + </execution> |
| 281 | + </executions> |
| 282 | + </plugin> |
169 | 283 | </plugins> |
170 | 284 | </build> |
171 | 285 |
|
|
0 commit comments