Skip to content

Commit

Permalink
Fixes #413 - fix maven site generation (#414)
Browse files Browse the repository at this point in the history
fix javadoc errors
exclude modello-generated classes from javadocs
remove plugin dependencies already defined (with newer versions) in parent pom
  • Loading branch information
stefanseifert committed Jun 24, 2020
1 parent 9915931 commit 0b90014
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 56 deletions.
32 changes: 11 additions & 21 deletions pom.xml
Expand Up @@ -114,7 +114,7 @@
<doxiaVersion>1.9.1</doxiaVersion>
<doxia-sitetoolsVersion>1.7</doxia-sitetoolsVersion>
<pluginVersion>${project.version}</pluginVersion>
<sitePluginVersion>3.6</sitePluginVersion>
<sitePluginVersion>3.7</sitePluginVersion>
</properties>

<dependencies>
Expand Down Expand Up @@ -267,21 +267,6 @@
<artifactId>modello-maven-plugin</artifactId>
<version>1.11</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.14</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.6</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down Expand Up @@ -412,6 +397,16 @@
<mavenOpts>-Xmx256m</mavenOpts>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- Exclude packages generated by Modello in JavaDocs -->
<excludePackageNames>
org.codehaus.mojo.versions.model,
org.codehaus.mojo.versions.model.io.xpp3
</excludePackageNames>
</configuration>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -448,11 +443,6 @@
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
</plugin>
</plugins>
</reporting>

Expand Down
Expand Up @@ -141,7 +141,7 @@ public abstract class AbstractVersionsDependencyUpdaterMojo
/**
* Should the project/dependencies section of the pom be processed.
*
* @return returns <code>true if the project/dependencies section of the pom should be processed.
* @return returns <code>true</code> if the project/dependencies section of the pom should be processed.
* @since 1.0-alpha-3
*/
public boolean isProcessingDependencies()
Expand All @@ -152,7 +152,7 @@ public boolean isProcessingDependencies()
/**
* Should the project/dependencyManagement section of the pom be processed.
*
* @return returns <code>true if the project/dependencyManagement section of the pom should be processed.
* @return returns <code>true</code> if the project/dependencyManagement section of the pom should be processed.
* @since 1.0-alpha-3
*/
public boolean isProcessingDependencyManagement()
Expand All @@ -163,7 +163,7 @@ public boolean isProcessingDependencyManagement()
/**
* Should the project/parent section of the pom be processed.
*
* @return returns <code>true if the project/parent section of the pom should be processed.
* @return returns <code>true</code> if the project/parent section of the pom should be processed.
* @since 2.3
*/
public boolean isProcessingParent()
Expand All @@ -174,7 +174,7 @@ public boolean isProcessingParent()
/**
* Should the artifacts produced in the current reactor be excluded from processing.
*
* @return returns <code>true if the artifacts produced in the current reactor should be excluded from processing.
* @return returns <code>true</code> if the artifacts produced in the current reactor should be excluded from processing.
* @since 1.0-alpha-3
*/
public boolean isExcludeReactor()
Expand All @@ -185,7 +185,7 @@ public boolean isExcludeReactor()
/**
* Should the dependency be updated itself or is it handled by properties.
*
* @param dependency
* @param dependency Dependency
* @return true if the version starts with '${'
* @since 2.8
*/
Expand All @@ -197,8 +197,8 @@ protected boolean isHandledByProperty(Dependency dependency) {
/**
* Try to find the dependency artifact that matches the given dependency.
*
* @param dependency
* @return
* @param dependency Dependency
* @return Artifact
* @since 1.0-alpha-3
*/
protected Artifact findArtifact( Dependency dependency )
Expand All @@ -222,8 +222,9 @@ protected Artifact findArtifact( Dependency dependency )
/**
* Try to find the dependency artifact that matches the given dependency.
*
* @param dependency
* @return
* @param dependency Dependency
* @throws MojoExecutionException Mojo execution exception
* @return Artifact
* @since 1.0-alpha-3
*/
protected Artifact toArtifact( Dependency dependency )
Expand Down Expand Up @@ -344,8 +345,8 @@ private boolean compare( MavenProject project, Dependency dep )
* Compare and artifact to a dependency. Returns true only if the groupId, artifactId, type, and classifier are all
* equal.
*
* @param artifact
* @param dep
* @param artifact Artifact
* @param dep Dependency
* @return true if artifact and dep refer to the same artifact
*/
private boolean compare( Artifact artifact, Dependency dep )
Expand Down
Expand Up @@ -253,6 +253,7 @@ protected void executeReport( Locale locale )
* @param locale the locale to generate the report for.
* @param sink the report formatting tool.
* @throws MavenReportException when things go wrong.
* @throws MojoExecutionException if something goes wrong.
*/
protected abstract void doGenerateReport( Locale locale, Sink sink )
throws MavenReportException, MojoExecutionException;
Expand All @@ -263,9 +264,10 @@ protected abstract void doGenerateReport( Locale locale, Sink sink )
* @param artifact The artifact.
* @param versionRange The version range.
* @param allowingSnapshots <code>null</code> for no override, otherwise the local override to apply.
* @param usePluginRepositories Use plugin repositories
* @return The latest version of the specified artifact that matches the specified version range or
* <code>null</code> if no matching version could be found.
* @throws MojoExecutionException If the artifact metadata could not be found.
* @throws MavenReportException If the artifact metadata could not be found.
* @since 1.0-alpha-1
*/
protected ArtifactVersion findLatestVersion( Artifact artifact, VersionRange versionRange,
Expand Down
Expand Up @@ -258,10 +258,11 @@ public void execute()
* @param artifact The artifact.
* @param versionRange The version range.
* @param allowingSnapshots <code>null</code> for no override, otherwise the local override to apply.
* @param usePluginRepositories
* @param usePluginRepositories Use plugin repositories
* @return The latest version of the specified artifact that matches the specified version range or
* <code>null</code> if no matching version could be found.
* @throws ArtifactMetadataRetrievalException If the artifact metadata could not be found.
* @throws MojoExecutionException if something goes wrong.
* @since 1.0-alpha-1
*/
protected ArtifactVersion findLatestVersion( Artifact artifact, VersionRange versionRange,
Expand Down Expand Up @@ -401,6 +402,7 @@ protected final void writeFile( File outFile, StringBuilder input )
* @throws MojoExecutionException If things go wrong.
* @throws MojoFailureException If things go wrong.
* @throws javax.xml.stream.XMLStreamException If things go wrong.
* @throws ArtifactMetadataRetrievalException if something goes wrong.
* @since 1.0-alpha-1
*/
protected abstract void update( ModifiedPomXMLEventReader pom )
Expand Down Expand Up @@ -453,9 +455,9 @@ protected boolean shouldApplyUpdate( Artifact artifact, String currentVersion, A
* Based on the passed flags, determines which segment is unchangable. This can be used when determining an upper
* bound for the "latest" version.
*
* @param allowMajorUpdates
* @param allowMinorUpdates
* @param allowIncrementalUpdates
* @param allowMajorUpdates Allow major updates
* @param allowMinorUpdates Allow minor updates
* @param allowIncrementalUpdates Allow incremental updates
* @return Returns the segment that is unchangable. If any segment can change, returns -1.
*/
protected int determineUnchangedSegment( boolean allowMajorUpdates, boolean allowMinorUpdates,
Expand Down
Expand Up @@ -91,8 +91,6 @@ public class CompareDependenciesMojo

/**
* Update dependency versions stored in properties
*
* @parameter property="updatePropertyVersions" default-value="false"
*/
@Parameter( property = "updatePropertyVersions", defaultValue = "false" )
protected boolean updatePropertyVersions;
Expand Down
Expand Up @@ -117,7 +117,7 @@ public void render()

/**
* Method wraps value in xml tag. In ex: to wrap foo in tag bar you have to pass foo as value and bar as tag. As a
* result you will get: <bar>foo</bar>
* result you will get: &lt;bar&gt;foo&lt;/bar&gt;
*
* @param value - string to wrap
* @param tag - name of tag
Expand Down
Expand Up @@ -180,7 +180,7 @@ public class DefaultVersionsHelper
* Constructs a new {@link DefaultVersionsHelper}.
*
* @param artifactFactory The artifact factory.
* @param artifactResolver
* @param artifactResolver Artifact resolver
* @param artifactMetadataSource The artifact metadata source to use.
* @param remoteArtifactRepositories The remote artifact repositories to consult.
* @param remotePluginRepositories The remote plugin repositories to consult.
Expand All @@ -193,6 +193,7 @@ public class DefaultVersionsHelper
* @param mavenSession The maven session information.
* @param pathTranslator The path translator component. @throws org.apache.maven.plugin.MojoExecutionException If
* things go wrong.
* @throws MojoExecutionException if something goes wrong.
* @since 1.0-alpha-3
*/
public DefaultVersionsHelper( ArtifactFactory artifactFactory, ArtifactResolver artifactResolver,
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/codehaus/mojo/versions/api/PomHelper.java
Expand Up @@ -1572,9 +1572,9 @@ public static String getGAV( Model model )
/**
* Reads imported POMs from the dependency management section.
*
* @param pom
* @param pom POM
* @return a non-null list of {@link Dependency} for each imported POM
* @throws XMLStreamException
* @throws XMLStreamException XML stream exception
* @see <a href="https://github.com/mojohaus/versions-maven-plugin/issues/134">bug #134</a>
* @since 2.4
*/
Expand Down
15 changes: 9 additions & 6 deletions src/main/java/org/codehaus/mojo/versions/api/UpdateScope.java
Expand Up @@ -34,7 +34,7 @@
* Scopes of version updates.
*
* @author Stephen Connolly
* @todo convert this class to a Java 1.5 enum once we move to Java 1.5
* todo: convert this class to a Java 1.5 enum once we move to Java 1.5
* @since 1.0-beta-1
*/
public abstract class UpdateScope
Expand Down Expand Up @@ -246,7 +246,6 @@ public ArtifactVersion[] getAllUpdates( VersionDetails versionDetails, ArtifactV
* @param currentVersion The current version.
* @param includeSnapshots Whether to include snapshots.
* @return The next version within this scope or <code>null</code> if there is no version within this scope.
* @throws ArtifactMetadataRetrievalException if there was a problem retrieving the list of available versions.
*/
public abstract ArtifactVersion getOldestUpdate( VersionDetails versionDetails, ArtifactVersion currentVersion,
boolean includeSnapshots );
Expand Down Expand Up @@ -281,10 +280,11 @@ public abstract ArtifactVersion[] getAllUpdates( VersionDetails versionDetails,

/**
* Returns the name of this enum constant, exactly as declared in its enum declaration.
* <p/>
* <p>
* <b>Most programmers should use the {@link #toString} method in preference to this one, as the toString method may
* return a more user-friendly name.</b> This method is designed primarily for use in specialized situations where
* correctness depends on getting the exact name, which will not vary from release to release.
* </p>
*
* @return the name of this enum constant
*/
Expand All @@ -296,16 +296,18 @@ public final String name()
/**
* The ordinal of this enumeration constant (its position in the enum declaration, where the initial constant is
* assigned an ordinal of zero).
* <p/>
* <p>
* Most programmers will have no use for this field.
* </p>
*/
private final int ordinal;

/**
* Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial
* constant is assigned an ordinal of zero).
* <p/>
* <p>
* Most programmers will have no use for this method.
* </p>
*
* @return the ordinal of this enumeration constant
*/
Expand Down Expand Up @@ -366,9 +368,10 @@ protected final Object clone()
/**
* Compares this enum with the specified object for order. Returns a negative integer, zero, or a positive integer
* as this object is less than, equal to, or greater than the specified object.
* <p/>
* <p>
* Enum constants are only comparable to other enum constants of the same enum type. The natural order implemented
* by this method is the order in which the constants are declared.
* </p>
*/
public final int compareTo( Object o )
{
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/codehaus/mojo/versions/api/VersionDetails.java
Expand Up @@ -103,7 +103,7 @@ public interface VersionDetails
* @param upperBound the upper bound or <code>null</code> if the upper limit is unbounded.
* @param includeSnapshots <code>true</code> if snapshots are to be included.
* @param includeLower <code>true</code> if the lower bound is inclusive.
* @param includeUpper <code>true> if the upper bound is inclusive.
* @param includeUpper <code>true</code> if the upper bound is inclusive.
* @return all available versions within the specified version range.
* @since 1.0-beta-1
*/
Expand All @@ -119,7 +119,7 @@ ArtifactVersion[] getVersions( ArtifactVersion lowerBound, ArtifactVersion upper
* @param upperBound the upper bound or <code>null</code> if the upper limit is unbounded.
* @param includeSnapshots <code>true</code> if snapshots are to be included.
* @param includeLower <code>true</code> if the lower bound is inclusive.
* @param includeUpper <code>true> if the upper bound is inclusive.
* @param includeUpper <code>true</code> if the upper bound is inclusive.
* @return all available versions within the specified version range.
* @since 1.0-beta-1
*/
Expand Down Expand Up @@ -158,7 +158,7 @@ ArtifactVersion getNewestVersion( ArtifactVersion lowerBound, ArtifactVersion up
* @param upperBound the upper bound or <code>null</code> if the upper limit is unbounded.
* @param includeSnapshots <code>true</code> if snapshots are to be included.
* @param includeLower <code>true</code> if the lower bound is inclusive.
* @param includeUpper <code>true> if the upper bound is inclusive.
* @param includeUpper <code>true</code> if the upper bound is inclusive.
* @return the latest version between lowerBound and upperBound or <code>null</code> if no version is available.
* @since 1.0-alpha-3
*/
Expand All @@ -175,7 +175,7 @@ ArtifactVersion getNewestVersion( ArtifactVersion lowerBound, ArtifactVersion up
* @param upperBound the upper bound or <code>null</code> if the upper limit is unbounded.
* @param includeSnapshots <code>true</code> if snapshots are to be included.
* @param includeLower <code>true</code> if the lower bound is inclusive.
* @param includeUpper <code>true> if the upper bound is inclusive.
* @param includeUpper <code>true</code> if the upper bound is inclusive.
* @return the latest version between lowerBound and upperBound or <code>null</code> if no version is available.
* @since 1.0-alpha-3
*/
Expand Down Expand Up @@ -233,7 +233,7 @@ ArtifactVersion getOldestVersion( ArtifactVersion lowerBound, ArtifactVersion up
* @param upperBound the upper bound or <code>null</code> if the upper limit is unbounded.
* @param includeSnapshots <code>true</code> if snapshots are to be included.
* @param includeLower <code>true</code> if the lower bound is inclusive.
* @param includeUpper <code>true> if the upper bound is inclusive.
* @param includeUpper <code>true</code> if the upper bound is inclusive.
* @return the oldest version between lowerBound and upperBound or <code>null</code> if no version is available.
* @since 1.0-beta-1
*/
Expand All @@ -249,7 +249,7 @@ ArtifactVersion getOldestVersion( ArtifactVersion lowerBound, ArtifactVersion up
* @param upperBound the upper bound or <code>null</code> if the upper limit is unbounded.
* @param includeSnapshots <code>true</code> if snapshots are to be included.
* @param includeLower <code>true</code> if the lower bound is inclusive.
* @param includeUpper <code>true> if the upper bound is inclusive.
* @param includeUpper <code>true</code> if the upper bound is inclusive.
* @return the oldest version between lowerBound and upperBound or <code>null</code> if no version is available.
* @since 1.0-beta-1
*/
Expand Down
Expand Up @@ -190,6 +190,7 @@ ArtifactVersions lookupArtifactUpdates( Artifact artifact, boolean allowSnapshot
* @param usePluginRepositories Search the plugin repositories.
* @return A map, keyed by dependency, with values of type {@link org.codehaus.mojo.versions.api.ArtifactVersions}.
* @throws ArtifactMetadataRetrievalException When things go wrong.
* @throws InvalidVersionSpecificationException if something goes wrong.
* @since 1.0-beta-1
*/
Map<Dependency, ArtifactVersions> lookupDependenciesUpdates( Set<Dependency> dependencies,
Expand All @@ -203,6 +204,7 @@ Map<Dependency, ArtifactVersions> lookupDependenciesUpdates( Set<Dependency> dep
* @param usePluginRepositories Search the plugin repositories.
* @return The details of updates to the dependency.
* @throws ArtifactMetadataRetrievalException When things go wrong.
* @throws InvalidVersionSpecificationException if something goes wrong.
* @since 1.0-beta-1
*/
ArtifactVersions lookupDependencyUpdates( Dependency dependency, boolean usePluginRepositories )
Expand All @@ -215,6 +217,7 @@ ArtifactVersions lookupDependencyUpdates( Dependency dependency, boolean usePlug
* @param allowSnapshots Include snapshots in the list of updates.
* @return A map, keyed by plugin, with values of type {@link org.codehaus.mojo.versions.PluginUpdatesDetails}.
* @throws ArtifactMetadataRetrievalException When things go wrong.
* @throws InvalidVersionSpecificationException if something goes wrong.
* @since 1.0-beta-1
*/
Map<Plugin, PluginUpdatesDetails> lookupPluginsUpdates( Set<Plugin> plugins, boolean allowSnapshots )
Expand Down Expand Up @@ -266,6 +269,8 @@ Map<Property, PropertyVersions> getVersionPropertiesMap( MavenProject project, P
*
* @param artifact The artifact to resolve.
* @param usePluginRepositories whether to resolve from the plugin repositories or the regular repositories.
* @throws ArtifactResolutionException if something goes wrong.
* @throws ArtifactNotFoundException if something goes wrong.
* @since 1.3
*/
void resolveArtifact( Artifact artifact, boolean usePluginRepositories )
Expand Down
Expand Up @@ -34,7 +34,7 @@
/**
* Represents the modified pom file. Note: implementations of the StAX API (JSR-173) are not good round-trip rewriting
* <b>while</b> keeping all unchanged bytes in the file as is. For example, the StAX API specifies that <code>CR</code>
* characters will be stripped. Current implementations do not keep &quot; and &apos; characters consistent.
* characters will be stripped. Current implementations do not keep &quot; and ' characters consistent.
*
* @author Stephen Connolly
*/
Expand Down

0 comments on commit 0b90014

Please sign in to comment.