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 2024/11/19 14:20:09 UTC
(maven-site-plugin) branch guice created (now f8b886fb)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a change to branch guice
in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git
at f8b886fb Prefer Guice to Plexus
This branch includes the following new commits:
new f8b886fb Prefer Guice to Plexus
The 1 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.
(maven-site-plugin) 01/01: Prefer Guice to Plexus
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch guice
in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git
commit f8b886fb30d90720b3e89ddc22ef201939b682aa
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Tue Nov 19 09:20:01 2024 -0500
Prefer Guice to Plexus
---
.../site/descriptor/SiteDescriptorAttachMojo.java | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/site/descriptor/SiteDescriptorAttachMojo.java b/src/main/java/org/apache/maven/plugins/site/descriptor/SiteDescriptorAttachMojo.java
index 9459567b..5d39c0c2 100644
--- a/src/main/java/org/apache/maven/plugins/site/descriptor/SiteDescriptorAttachMojo.java
+++ b/src/main/java/org/apache/maven/plugins/site/descriptor/SiteDescriptorAttachMojo.java
@@ -18,12 +18,13 @@
*/
package org.apache.maven.plugins.site.descriptor;
+import javax.inject.Inject;
+
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
@@ -50,21 +51,26 @@ public class SiteDescriptorAttachMojo extends AbstractSiteDescriptorMojo {
@Parameter(property = "basedir", required = true, readonly = true)
private File basedir;
+ /**
+ * Attach site descriptor only if packaging is pom.
+ * @since 3.0
+ */
+ @Parameter(defaultValue = "true")
+ private boolean pomPackagingOnly;
+
/**
* Maven ProjectHelper.
*
* @since 2.1.1
*/
- @Component
private MavenProjectHelper projectHelper;
- /**
- * Attach site descriptor only if packaging is pom.
- * @since 3.0
- */
- @Parameter(defaultValue = "true")
- private boolean pomPackagingOnly;
+ @Inject
+ public SiteDescriptorAttachMojo(MavenProjectHelper projectHelper) {
+ this.projectHelper = projectHelper;
+ }
+ @Override
public void execute() throws MojoExecutionException {
if (pomPackagingOnly && !"pom".equals(project.getPackaging())) {
// https://issues.apache.org/jira/browse/MSITE-597