Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove plugins to restore source and javadoc jar #17680

Merged
merged 1 commit into from
Nov 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 0 additions & 115 deletions sdk/spring/azure-spring-boot-starter-keyvault-certificates/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,121 +53,6 @@
</rules>
</configuration>
</plugin>
<!-- BEGIN: Empty Java Doc & Sources -->
<!-- The following code will generate an empty javadoc with just a README.md. This is necessary
to pass the required checks on Maven. The way this works is by setting the classesDirectory
to a directory that only contains the README.md, which we need to copy. If the classesDirectory
is set to the root, where the README.md lives, it still won't have javadocs but the jar file
will contain a bunch of files that shouldn't be there. The faux sources directory is deleted
and recreated with the README.md being copied every time to guarantee that, when building locally,
it'll have the latest copy of the README.md file.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-javadoc-plugin;external_dependency} -->
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version> <!-- {x-version-update;org.apache.maven.plugins:maven-jar-plugin;external_dependency} -->
<executions>
<!-- BEGIN: Empty Java Doc -->
<execution>
<id>empty-javadoc-jar-with-readme</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>javadoc</classifier>
<classesDirectory>${project.basedir}/javadocTemp</classesDirectory>
</configuration>
</execution>
<!-- END: Empty Java Doc -->
<!-- BEGIN: Empty Sources -->
<execution>
<id>empty-sources-jar-with-readme</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>sources</classifier>
<classesDirectory>${project.basedir}/sourceTemp</classesDirectory>
</configuration>
</execution>
<!-- END: Empty Sources -->
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version> <!-- {x-version-update;org.apache.maven.plugins:maven-antrun-plugin;external_dependency} -->
<executions>
<execution>
<id>copy-readme-to-javadocTemp</id>
<phase>prepare-package</phase>
<configuration>
<target>
<echo>Deleting existing ${project.basedir}/javadocTemp</echo>
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${project.basedir}/javadocTemp"/>
</delete>
<echo>Copying ${project.basedir}/README.md to
${project.basedir}/javadocTemp/README.md
</echo>
<copy file="${project.basedir}/README.md" tofile="${project.basedir}/javadocTemp/README.md"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>copy-readme-to-sourceTemp</id>
<phase>prepare-package</phase>
<configuration>
<target>
<echo>Deleting existing ${project.basedir}/sourceTemp</echo>
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${project.basedir}/sourceTemp"/>
</delete>
<echo>Copying ${project.basedir}/README.md to
${project.basedir}/sourceTemp/README.md
</echo>
<copy file="${project.basedir}/README.md" tofile="${project.basedir}/sourceTemp/README.md"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-source-plugin;external_dependency} -->
<executions>
<execution>
<id>attach-sources</id>
<phase>none</phase> <!-- The way to skip the sources attach is to set the phase to none, the skip config doesn't work for sources -->
</execution>
</executions>
</plugin>
<!-- END: Empty Java Doc & Sources -->
</plugins>
</build>
<properties>
Expand Down