Skip to content

Commit

Permalink
WINDUP-3561 Added 'windup-reporting-data' addon (#44)
Browse files Browse the repository at this point in the history
* WINDUP-3561 Added assertion to check 'index.html' file has been created

* WINDUP-3561 Added 'windup-reporting-data' addon
  • Loading branch information
mrizzi authored Mar 31, 2023
1 parent aa13e22 commit b8a4ee0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ public void execute() throws MojoExecutionException
install("org.jboss.forge.addon:core," + forgeVersion, furnace);
install("org.jboss.windup:windup-tooling," + this.windupVersion, furnace);
install("org.jboss.windup.rules.apps:windup-rules-java-project," + this.windupVersion, furnace);
install("org.jboss.windup.reporting:windup-reporting-data," + this.windupVersion, furnace);

if(this.enableTattletale == Boolean.TRUE)
install("org.jboss.windup.rules.apps:windup-rules-tattletale," + this.windupVersion, furnace);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ public void execute() throws MojoExecutionException
install("org.jboss.forge.addon:core," + forgeVersion, furnace);
install("org.jboss.windup:windup-tooling," + this.windupVersion, furnace);
install("org.jboss.windup.rules.apps:windup-rules-java-project," + this.windupVersion, furnace);
install("org.jboss.windup.reporting:windup-reporting-data," + this.windupVersion, furnace);

if(this.enableTattletale == Boolean.TRUE)
install("org.jboss.windup.rules.apps:windup-rules-tattletale," + this.windupVersion, furnace);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ public void execute() throws MojoExecutionException
install("org.jboss.forge.addon:core," + forgeVersion, furnace);
install("org.jboss.windup:windup-tooling," + this.windupVersion, furnace);
install("org.jboss.windup.rules.apps:windup-rules-java-project," + this.windupVersion, furnace);
install("org.jboss.windup.reporting:windup-reporting-data," + this.windupVersion, furnace);

if(this.enableTattletale == Boolean.TRUE)
install("org.jboss.windup.rules.apps:windup-rules-tattletale," + this.windupVersion, furnace);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuilder;
import org.apache.maven.project.ProjectBuildingRequest;
import org.codehaus.plexus.util.xml.Xpp3Dom;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Paths;
import java.util.Properties;

public class WindupMojoTest extends AbstractMojoTestCase
Expand Down Expand Up @@ -62,6 +64,12 @@ public void testNoWindupVersionParameter() throws Exception


assertEquals(mojo.getWindupVersion(), versions.getProperty("version.windup"));
assertTrue("index.html report not found",
Paths.get("",
((Xpp3Dom) project.getBuild().getPlugins().get(0).getConfiguration()).getChild("outputDirectory").getValue(),
"index.html")
.toFile()
.exists());
}

public void testWindupVersionParameterPresent() throws Exception
Expand All @@ -86,5 +94,11 @@ public void testWindupVersionParameterPresent() throws Exception


assertEquals(mojo2.getWindupVersion(), "6.2.0-SNAPSHOT");
assertTrue("index.html report not found",
Paths.get("",
((Xpp3Dom) project.getBuild().getPlugins().get(0).getConfiguration()).getChild("outputDirectory").getValue(),
"index.html")
.toFile()
.exists());
}
}

0 comments on commit b8a4ee0

Please sign in to comment.