You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2023/11/12 21:40:55 UTC
(maven-jxr) branch master updated (0e94f5b -> d6a03e6)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jxr.git
from 0e94f5b Directory, not folder
new 7cd3904 [JXR-185] Consistently evaluate skip parameter in MavenReport#canGenerateReport()
new d6a03e6 [JXR-186] Upgrade to Parent 41
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
maven-jxr-plugin/pom.xml | 4 ++
.../apache/maven/plugin/jxr/AbstractJxrReport.java | 53 +++++++++-------------
pom.xml | 7 +--
3 files changed, 27 insertions(+), 37 deletions(-)
(maven-jxr) 01/02: [JXR-185] Consistently evaluate skip parameter in MavenReport#canGenerateReport()
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jxr.git
commit 7cd3904e0915f0d0aac9b0d57b25f71e62a335f8
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Nov 12 22:32:53 2023 +0100
[JXR-185] Consistently evaluate skip parameter in MavenReport#canGenerateReport()
---
.../apache/maven/plugin/jxr/AbstractJxrReport.java | 53 +++++++++-------------
1 file changed, 22 insertions(+), 31 deletions(-)
diff --git a/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java b/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java
index 29b336a..569773a 100644
--- a/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java
+++ b/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java
@@ -377,40 +377,18 @@ public abstract class AbstractJxrReport extends AbstractMavenReport {
return ResourceBundle.getBundle("jxr-report", locale, this.getClass().getClassLoader());
}
- /**
- * Checks whether the report can be generated.
- *
- * @param sourceDirs list of source directories
- * @return true if the report could be generated
- */
- protected boolean canGenerateReport(List<String> sourceDirs) {
- boolean canGenerate = !sourceDirs.isEmpty();
-
- if (isAggregate() && !project.isExecutionRoot()) {
- canGenerate = false;
- }
- return canGenerate;
- }
-
@Override
protected void executeReport(Locale locale) throws MavenReportException {
- if (skip) {
- getLog().info("Skipping JXR.");
- return;
- }
- List<String> sourceDirs = constructSourceDirs();
- if (canGenerateReport(sourceDirs)) {
- // init some attributes -- TODO (javadoc)
- init();
+ // init some attributes -- TODO (javadoc)
+ init();
- // determine version of templates to use
- setJavadocTemplatesVersion();
+ // determine version of templates to use
+ setJavadocTemplatesVersion();
- try {
- createXref(locale, getDestinationDirectory(), sourceDirs);
- } catch (JxrException | IOException e) {
- throw new MavenReportException("Error while generating the HTML source code of the project.", e);
- }
+ try {
+ createXref(locale, getDestinationDirectory(), constructSourceDirs());
+ } catch (JxrException | IOException e) {
+ throw new MavenReportException("Error while generating the HTML source code of the project.", e);
}
}
@@ -471,7 +449,20 @@ public abstract class AbstractJxrReport extends AbstractMavenReport {
@Override
public boolean canGenerateReport() {
- return canGenerateReport(constructSourceDirs());
+ if (skip) {
+ getLog().info("Skipping JXR.");
+ return false;
+ }
+
+ if (constructSourceDirs().isEmpty()) {
+ return false;
+ }
+
+ if (isAggregate() && !project.isExecutionRoot()) {
+ return false;
+ }
+
+ return true;
}
@Override
(maven-jxr) 02/02: [JXR-186] Upgrade to Parent 41
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jxr.git
commit d6a03e68f6e6537a064bf5d775bfbe51399abaed
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Nov 12 22:40:37 2023 +0100
[JXR-186] Upgrade to Parent 41
---
maven-jxr-plugin/pom.xml | 4 ++++
pom.xml | 7 +------
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/maven-jxr-plugin/pom.xml b/maven-jxr-plugin/pom.xml
index bbf63d5..e922293 100644
--- a/maven-jxr-plugin/pom.xml
+++ b/maven-jxr-plugin/pom.xml
@@ -105,6 +105,10 @@ under the License.
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-xml</artifactId>
+ </dependency>
<!-- testing -->
<dependency>
diff --git a/pom.xml b/pom.xml
index 67b3439..5b4ea76 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@ under the License.
<parent>
<groupId>org.apache.maven</groupId>
<artifactId>maven-parent</artifactId>
- <version>40</version>
+ <version>41</version>
<relativePath />
</parent>
@@ -96,11 +96,6 @@ under the License.
<artifactId>plexus-java</artifactId>
<version>1.2.0</version>
</dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>3.5.1</version>
- </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>