Skip to content

Commit fdbdd81

Browse files
committed
[improve-html-report] - commit 10
1 parent a7dd90e commit fdbdd81

File tree

2 files changed

+30
-42
lines changed

2 files changed

+30
-42
lines changed

pom.xml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@
126126
</execution>
127127
</executions>
128128
</plugin>
129-
129+
<plugin>
130+
<groupId>net.itarray</groupId>
131+
<artifactId>automotion-maven-plugin</artifactId>
132+
<version>1.0.0</version>
133+
</plugin>
130134
</plugins>
131135
</build>
132136

@@ -244,16 +248,5 @@
244248
<version>4.12</version>
245249
<scope>test</scope>
246250
</dependency>
247-
<dependency>
248-
<groupId>org.apache.maven</groupId>
249-
<artifactId>maven-plugin-api</artifactId>
250-
<version>3.0</version>
251-
</dependency>
252-
<dependency>
253-
<groupId>org.apache.maven.plugin-tools</groupId>
254-
<artifactId>maven-plugin-annotations</artifactId>
255-
<version>3.4</version>
256-
<scope>provided</scope>
257-
</dependency>
258251
</dependencies>
259252
</project>

src/main/java/net/itarray/automotion/internal/FinalReportBuilder.java

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
import com.webfirmframework.wffweb.tag.html.lists.Ol;
1111
import com.webfirmframework.wffweb.tag.html.metainfo.Head;
1212
import com.webfirmframework.wffweb.tag.htmlwff.NoTag;
13-
import org.apache.maven.plugin.AbstractMojo;
14-
import org.apache.maven.plugin.MojoExecutionException;
15-
import org.apache.maven.plugins.annotations.Mojo;
1613

1714
import java.io.BufferedOutputStream;
1815
import java.io.File;
@@ -24,11 +21,9 @@
2421
import static net.itarray.automotion.validation.Constants.TARGET_AUTOMOTION;
2522
import static net.itarray.automotion.validation.Constants.TARGET_AUTOMOTION_HTML;
2623

27-
@Mojo(name = "automotion")
28-
public class FinalReportBuilder extends AbstractMojo {
24+
public class FinalReportBuilder {
2925

30-
@Override
31-
public void execute() throws MojoExecutionException {
26+
public void execute() {
3227
File folder = new File(TARGET_AUTOMOTION_HTML);
3328
File[] listOfFiles = folder.listFiles();
3429
List<String> files = new ArrayList<>();
@@ -55,34 +50,34 @@ public void execute() throws MojoExecutionException {
5550
private Html buildHtml(List<String> files) {
5651
return new Html(null,
5752
new Style("background-color: #fff")) {{
58-
super.setPrependDocType(true);
59-
new Head(this) {{
60-
new TitleTag(this) {{
61-
new NoTag(this, "Automotion report");
62-
}};
63-
new NoTag(this, "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">");
64-
new NoTag(this, "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\">");
53+
super.setPrependDocType(true);
54+
new Head(this) {{
55+
new TitleTag(this) {{
56+
new NoTag(this, "Automotion report");
57+
}};
58+
new NoTag(this, "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">");
59+
new NoTag(this, "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\">");
6560

66-
new NoTag(this, "<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js\"></script>");
67-
new NoTag(this, "<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\">");
68-
new NoTag(this, "<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css\" integrity=\"sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp\" crossorigin=\"anonymous\">");
69-
new NoTag(this, "<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\" integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa\" crossorigin=\"anonymous\"></script>");
70-
}};
61+
new NoTag(this, "<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js\"></script>");
62+
new NoTag(this, "<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\">");
63+
new NoTag(this, "<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css\" integrity=\"sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp\" crossorigin=\"anonymous\">");
64+
new NoTag(this, "<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\" integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa\" crossorigin=\"anonymous\"></script>");
65+
}};
7166

72-
new Body(this) {{
73-
new Ol(this) {{
74-
for (String s: files) {
67+
new Body(this) {{
68+
new Ol(this) {{
69+
for (String s : files) {
7570

76-
new Li(this) {{
71+
new Li(this) {{
7772

78-
new A(this,
79-
new Href("html/" + s)) {{
80-
new NoTag(this, s);
81-
}};
82-
}};
83-
}
73+
new A(this,
74+
new Href("html/" + s)) {{
75+
new NoTag(this, s);
8476
}};
85-
}};
77+
}};
78+
}
79+
}};
8680
}};
81+
}};
8782
}
8883
}

0 commit comments

Comments
 (0)