1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package io.earcam.maven.plugin.sitemap;
20
21 import static org.apache.maven.plugins.annotations.LifecyclePhase.SITE;
22
23 import org.apache.maven.plugin.MojoExecutionException;
24 import org.apache.maven.plugin.MojoFailureException;
25 import org.apache.maven.plugins.annotations.Mojo;
26 import org.slf4j.Logger;
27 import org.slf4j.LoggerFactory;
28
29
30
31
32 @Mojo(name = "index", requiresProject = true, threadSafe = true, inheritByDefault = false, aggregator = true, defaultPhase = SITE)
33 public class SitemapIndexMojo extends AbstractSitemapMojo {
34
35 private static final Logger LOG = LoggerFactory.getLogger(SitemapIndexMojo.class);
36 static final String NAME = "sitemapindex";
37 private static final String CATEGORY = '[' + NAME + ']';
38
39
40 @Override
41 public void execute() throws MojoExecutionException, MojoFailureException
42 {
43 if(skip) {
44 LOG.debug("{} skip == true, skipping execution", CATEGORY);
45 } else {
46 LOG.debug("{} extending lifecycle, will run at end", CATEGORY);
47 SitemapIndexMavenLifecycleParticipant.shouldRun();
48 }
49 }
50 }