You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2020/04/08 10:26:39 UTC
[maven-javadoc-plugin] branch master updated: replace deprecated
methd scheduled fo removal and update archiver (#47)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new ca7d100 replace deprecated methd scheduled fo removal and update archiver (#47)
ca7d100 is described below
commit ca7d1008763fd318275cbd3748c8f8d06512cede
Author: Elliotte Rusty Harold <el...@users.noreply.github.com>
AuthorDate: Wed Apr 8 06:26:34 2020 -0400
replace deprecated methd scheduled fo removal and update archiver (#47)
---
pom.xml | 2 +-
.../java/org/apache/maven/plugins/javadoc/ResourcesBundleMojo.java | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index 5953f54..183cfba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -281,7 +281,7 @@ under the License.
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
- <version>4.2.1</version>
+ <version>4.2.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/ResourcesBundleMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/ResourcesBundleMojo.java
index 89b9e73..4ba0c0b 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/ResourcesBundleMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/ResourcesBundleMojo.java
@@ -31,6 +31,7 @@ import org.codehaus.plexus.archiver.Archiver;
import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.manager.ArchiverManager;
import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
+import org.codehaus.plexus.archiver.util.DefaultFileSet;
import java.io.File;
import java.io.IOException;
@@ -122,9 +123,10 @@ extends AbstractJavadocMojo
archiver.addFile( optionsFile, BUNDLE_OPTIONS_PATH );
File javadocDir = getJavadocDirectory();
- if ( javadocDir.exists() && javadocDir.isDirectory() )
+ if ( javadocDir.isDirectory() )
{
- archiver.addDirectory( javadocDir, RESOURCES_DIR_PATH + "/" );
+ DefaultFileSet fileSet = DefaultFileSet.fileSet( javadocDir ).prefixed( RESOURCES_DIR_PATH + "/" );
+ archiver.addFileSet( fileSet );
}
archiver.setDestFile( bundleFile );