slawekjaranowski commented on code in PR #216:
URL: https://github.com/apache/maven-site-plugin/pull/216#discussion_r1877600680


##########
src/main/java/org/apache/maven/plugins/site/SiteResourcesAttachMojo.java:
##########
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugins.site;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Set;
+
+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;
+import org.apache.maven.project.MavenProjectHelper;
+import org.codehaus.plexus.archiver.Archiver;
+import org.codehaus.plexus.archiver.ArchiverException;
+import org.codehaus.plexus.archiver.FileSet;
+import org.codehaus.plexus.archiver.util.DefaultFileSet;
+
+/**
+ * Adds the site resources (compressed in a ZIP archive) as dedicated artifact 
with classifier {@value #CLASSIFIER} to be installed/deployed.
+ * Usually used in combination with {@link 
org.apache.maven.plugins.site.descriptor.SiteDescriptorAttachMojo} to also 
deploy the actual site descriptor.
+ * This is used for sites inheriting from this project
+ *
+ * @since next
+ */
+@Mojo(name = SiteResourcesAttachMojo.GOAL_NAME, defaultPhase = 
LifecyclePhase.PACKAGE, threadSafe = true)
+public class SiteResourcesAttachMojo extends AbstractSiteMojo {
+
+    public static final String GOAL_NAME = "attach-site-resources";
+
+    /**
+     * Directory containing the <code>site.xml</code> file and the source for 
hand written docs (one directory
+     * per Doxia-source-supported markup types)
+     * @see <a href="/doxia/references/index.html">Doxia Markup Languages 
References</a>.
+     */
+    @Parameter(defaultValue = "${basedir}/src/site")
+    protected File siteDirectory;
+
+    /**
+     * Maven ProjectHelper.
+     */
+    @Component
+    private MavenProjectHelper projectHelper;

Review Comment:
   Can be injected by constructor



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to