|
149 | 149 | <property name="jar-file" location="dist/${artifactId}-${version}.jar" /> |
150 | 150 | <property name="sources-jar-file" location="dist/${artifactId}-${version}-sources.jar" /> |
151 | 151 | <property name="documentation-file" location="dist/${artifactId}-${version}-docs.zip" /> |
152 | | - |
153 | | - <!-- defined maven snapshots and staging repository id and url --> |
154 | | - <property name="maven-snapshots-repository-id" value="sonatype-nexus-snapshots" /> |
155 | | - <property name="maven-snapshots-repository-url" value="https://oss.sonatype.org/content/repositories/snapshots/" /> |
156 | | - <property name="maven-staging-repository-id" value="sonatype-nexus-staging" /> |
157 | | - <property name="maven-staging-repository-url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" /> |
| 152 | + <property name="fake-javadoc-file" location="dist/${artifactId}-${version}-javadoc.jar" /> |
158 | 153 |
|
159 | 154 | <!-- GPG settings --> |
160 | 155 | <property name="gpg.exe" value="gpg" /> |
|
446 | 441 | <zip destfile="${documentation-file}" encoding="${build.encoding}"> |
447 | 442 | <zipfileset dir="${documentation-dir}" prefix="${artifactId}-${version}"/> |
448 | 443 | </zip> |
| 444 | + <zip destfile="${fake-javadoc-file}" encoding="${build.encoding}"> |
| 445 | + <mappedresources> |
| 446 | + <string>The forbiddenapis plugin provides no Javadocs. The full user documentation for Ant/Maven/Gradle usage is provided by the artifact with classifier 'docs' and type 'zip'. </string> |
| 447 | + <mergemapper to="README.txt"/> |
| 448 | + </mappedresources> |
| 449 | + </zip> |
449 | 450 | </target> |
450 | 451 |
|
451 | 452 | <target name="jar" depends="compile,-install-tasks,maven-descriptor" description="Create the binary JAR"> |
|
498 | 499 | <target name="stage" depends="-stage.snapshots,-stage.release" description="Create the distribution"/> |
499 | 500 |
|
500 | 501 | <target name="-stage.snapshots" depends="dist" if="isSnapshot"> |
| 502 | + <!-- |
501 | 503 | <artifact:deploy file="${jar-file}"> |
502 | 504 | <pom refid="maven.deploy.pom"/> |
503 | | - <attach file="${sources-jar-file}" classifier="sources"/> |
| 505 | + <attach file="${sources-jar-file}" classifier="sources" type="jar"/> |
| 506 | + <attach file="${fake-javadoc-file}" classifier="javadoc" type="jar"/> |
504 | 507 | <attach file="${documentation-file}" classifier="docs" type="zip"/> |
505 | 508 | </artifact:deploy> |
| 509 | + --> |
| 510 | + <echo level="warn" message="Deploying Maven Snapshots to Sonatype is currently not supported. Working on a fix with support..."/> |
506 | 511 | </target> |
507 | 512 |
|
508 | 513 | <target name="sign-artifacts" depends="dist" unless="isSnapshot"> |
|
537 | 542 | <target name="-stage.release" depends="sign-artifacts" unless="isSnapshot"> |
538 | 543 | <artifact:deploy file="${jar-file}"> |
539 | 544 | <pom refid="maven.deploy.pom"/> |
540 | | - <attach file="${sources-jar-file}" classifier="sources"/> |
| 545 | + <attach file="${sources-jar-file}" classifier="sources" type="jar"/> |
| 546 | + <attach file="${fake-javadoc-file}" classifier="javadoc" type="jar"/> |
541 | 547 | <attach file="${documentation-file}" classifier="docs" type="zip"/> |
542 | 548 | <!-- signatures: --> |
543 | 549 | <attach file="${pom-file}.asc" type="pom.asc"/> |
544 | 550 | <attach file="${jar-file}.asc" type="jar.asc"/> |
545 | 551 | <attach file="${sources-jar-file}.asc" classifier="sources" type="jar.asc"/> |
| 552 | + <attach file="${fake-javadoc-file}.asc" classifier="javadoc" type="jar.asc"/> |
546 | 553 | <attach file="${documentation-file}.asc" classifier="docs" type="zip.asc"/> |
547 | 554 | </artifact:deploy> |
548 | 555 | </target> |
|
0 commit comments