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

Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.1 to 3.11.2 #2188

Merged
Show file tree
Hide file tree
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
24 changes: 20 additions & 4 deletions maven-plugins/java2wadl-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-toolchain</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand All @@ -147,6 +143,26 @@
<goalPrefix>cxf-java2wadl</goalPrefix>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<executions>
<execution>
<id>test-integration</id>
<goals>
<goal>install</goal>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<settingsFile>src/it/settings.xml</settingsFile>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<skipInvocation>${maven.test.skip.exec}</skipInvocation>
<localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
59 changes: 59 additions & 0 deletions maven-plugins/java2wadl-plugin/src/it/java-generate-rx/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.cxf.it</groupId>
<artifactId>java-generate-rx</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>java-generate-rx</name>

<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>@project.version@</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-java2wadl-plugin</artifactId>
<version>@project.version@</version>
<executions>
<execution>
<id>parsejavadoc</id>
<phase>generate-sources</phase>
<goals>
<goal>parsejavadoc</goal>
</goals>
</execution>
<execution>
<id>process-classes</id>
<phase>process-classes</phase>
<goals>
<goal>java2wadl</goal>
</goals>
<configuration>
<classResourceNames>
<classResourceName>application.Test1</classResourceName>
<classResourceName>application.Test2</classResourceName>
</classResourceNames>
<docProvider>org.apache.cxf.maven_plugin.javatowadl.ResourceMapJavaDocProvider</docProvider>
<attachWadl>true</attachWadl>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Created by Apache CXF WadlToJava code generator
**/
package application;

import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import java.util.concurrent.CompletableFuture;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;

@Path("/1")
public interface Test1 {

@PUT
@Consumes("multipart/mixed")
@Produces("text/plain")
CompletableFuture<String> put(@QueryParam("standalone") Boolean standalone, @Multipart("action") String action, @Multipart(value = "sources", required = false) String sources);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Created by Apache CXF WadlToJava code generator
**/
package application;

import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.QueryParam;

@Path("/2")
public interface Test2 {

@PUT
@Consumes("application/json")
void put(@QueryParam("snapshot") boolean snapshot, String flow);

}
45 changes: 45 additions & 0 deletions maven-plugins/java2wadl-plugin/src/it/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0"?>
<settings>
<profiles>
<profile>
<id>it-repo</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>local.central</id>
<url>@localRepositoryUrl@</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local.central</id>
<url>@localRepositoryUrl@</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>local.it</id>
<url>file://@project.build.directory@/it/repo</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Locale;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.doxia.tools.SiteTool;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
Expand All @@ -34,10 +36,10 @@
import org.apache.maven.plugins.javadoc.options.DocletArtifact;
import org.apache.maven.plugins.javadoc.resolver.ResourceResolver;
import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver;
import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver;
import org.apache.maven.toolchain.ToolchainManager;
import org.codehaus.plexus.archiver.manager.ArchiverManager;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.RepositorySystemSession;

/**
* @goal parsejavadoc
Expand Down Expand Up @@ -78,19 +80,6 @@ public class ParseJavaDocMojo extends AbstractMojo {
* @component
*/
private ResourceResolver resourceResolver;

/**
* @component
*/
private DependencyResolver dependencyResolver;


/**
* @component
*/
private ArtifactResolver artifactResolver;



/**
* @component
Expand All @@ -109,15 +98,6 @@ public class ParseJavaDocMojo extends AbstractMojo {
*/
private File dumpFileOutputDirectory;

/**
* The local maven repository.
*
* @parameter expression="${localRepository}"
* @required
* @readonly
*/
private ArtifactRepository localRepository;


/**
* Directory into which assembled {@link JavadocOptions} instances will be written before they
Expand All @@ -128,9 +108,37 @@ public class ParseJavaDocMojo extends AbstractMojo {
*/
private File javadocOptionsDir;

/**
* @component
*/
private RepositorySystem repoSystem;

/**
* @parameter default-value = "${repositorySystemSession}"
* @required
* @readonly
*/
private RepositorySystemSession repoSession;

/**
* @component
*/
private ArtifactHandlerManager artifactHandlerManager;

/**
* @component
*/
private SiteTool siteTool;

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
AbstractJavadocMojo mojo = new JavadocReport();
AbstractJavadocMojo mojo = new JavadocReport(siteTool,
archiverManager,
resourceResolver,
repoSystem,
artifactHandlerManager,
mavenProjectBuilder,
toolchainManager);
Locale locale = Locale.getDefault();
try {
Field f = AbstractJavadocMojo.class.getDeclaredField("doclet");
Expand Down Expand Up @@ -164,39 +172,10 @@ public void execute() throws MojoExecutionException, MojoFailureException {
}
f.set(mojo, docletArtifact);


f = AbstractJavadocMojo.class.getDeclaredField("mavenProjectBuilder");
f.setAccessible(true);
f.set(mojo, this.mavenProjectBuilder);

f = AbstractJavadocMojo.class.getDeclaredField("resourceResolver");
f.setAccessible(true);
f.set(mojo, this.resourceResolver);

f = AbstractJavadocMojo.class.getDeclaredField("session");
System.out.println("========>" + session.getProjects());
f.setAccessible(true);
f.set(mojo, this.session);

f = AbstractJavadocMojo.class.getDeclaredField("dependencyResolver");
f.setAccessible(true);
f.set(mojo, this.dependencyResolver);

f = AbstractJavadocMojo.class.getDeclaredField("artifactResolver");
f.setAccessible(true);
f.set(mojo, this.artifactResolver);

f = AbstractJavadocMojo.class.getDeclaredField("archiverManager");
f.setAccessible(true);
f.set(mojo, this.archiverManager);

f = AbstractJavadocMojo.class.getDeclaredField("toolchainManager");
f.setAccessible(true);
f.set(mojo, this.toolchainManager);

f = AbstractJavadocMojo.class.getDeclaredField("localRepository");
f.setAccessible(true);
f.set(mojo, this.localRepository);

f = AbstractJavadocMojo.class.getDeclaredField("applyJavadocSecurityFix");
f.setAccessible(true);
Expand All @@ -221,6 +200,14 @@ public void execute() throws MojoExecutionException, MojoFailureException {
f.set(mojo, dumpFileOutputDirectory);
}

f = AbstractJavadocMojo.class.getDeclaredField("reactorProjects");
f.setAccessible(true);
f.set(mojo, List.of());

f = AbstractJavadocMojo.class.getDeclaredField("repoSession");
f.setAccessible(true);
f.set(mojo, repoSession);

Method m = AbstractJavadocMojo.class.getDeclaredMethod("executeReport", Locale.class);
m.setAccessible(true);
m.invoke(mojo, locale);
Expand Down
2 changes: 1 addition & 1 deletion parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2009,7 +2009,7 @@
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.1</version>
<version>3.11.2</version>
</dependency>
<dependency>
<groupId>org.ehcache</groupId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.1</version>
<version>3.11.2</version>
<configuration>
<attach>true</attach>
<source>${cxf.jdk.version}</source>
Expand Down
Loading