Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 34436a4

Browse files
committed
Removed resource files from the project.
Added Maven goal for downloading unzipping resources in the `process-resources` phase.
1 parent 3330528 commit 34436a4

2 files changed

Lines changed: 53 additions & 1 deletion

File tree

pom.xml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
<maven.compiler.target>1.8</maven.compiler.target>
1717
<junit.platform.version>1.0.3</junit.platform.version>
1818
<junit.jupiter.version>5.0.3</junit.jupiter.version>
19+
<!--<coverage.resources.directory>${project.build.resources[0].directory}/CoverageHTMLReporter</coverage.resources.directory>--> <!--This doesnt work!-->
20+
<coverage.resources.directory>${basedir}/src/main/resources/CoverageHTMLReporter</coverage.resources.directory>
21+
<coverage.resources.version>1.0.0</coverage.resources.version>
22+
<coverage.resources.zip.directory>utPLSQL-coverage-html-${coverage.resources.version}</coverage.resources.zip.directory>
23+
<coverage.resources.zip>${coverage.resources.zip.directory}.zip</coverage.resources.zip>
1924
</properties>
2025

2126
<dependencies>
@@ -87,6 +92,53 @@
8792
</extension>
8893
</extensions>
8994
<plugins>
95+
<plugin>
96+
<groupId>com.googlecode.maven-download-plugin</groupId>
97+
<artifactId>download-maven-plugin</artifactId>
98+
<version>1.3.0</version>
99+
<executions>
100+
<execution>
101+
<!-- the wget goal actually binds itself to this phase by default -->
102+
<phase>process-resources</phase>
103+
<goals>
104+
<goal>wget</goal>
105+
</goals>
106+
<configuration>
107+
<url>https://codeload.github.com/utPLSQL/utPLSQL-coverage-html/zip/${coverage.resources.version}</url>
108+
<outputFileName>${coverage.resources.zip}</outputFileName>
109+
<!-- default target location, just to demonstrate the parameter -->
110+
<outputDirectory>${coverage.resources.directory}</outputDirectory>
111+
</configuration>
112+
</execution>
113+
</executions>
114+
</plugin>
115+
<plugin>
116+
<artifactId>maven-antrun-plugin</artifactId>
117+
<version>1.7</version>
118+
<executions>
119+
<execution>
120+
<phase>process-resources</phase>
121+
<goals>
122+
<goal>run</goal>
123+
</goals>
124+
<configuration>
125+
<target>
126+
<echo message="unzip Resources" />
127+
<unzip src="${coverage.resources.directory}/${coverage.resources.zip}" dest="${coverage.resources.directory}" />
128+
<echo message="move unzipped assets to target resources directory" />
129+
<move toDir="${coverage.resources.directory}" includeEmptyDirs="yes" verbose="false">
130+
<fileset dir="${coverage.resources.directory}/${coverage.resources.zip.directory}/assets">
131+
<include name="**/*" />
132+
<include name="**/*.*" />
133+
</fileset>
134+
</move>
135+
<echo message="delete unzip directory" />
136+
<delete dir="${coverage.resources.directory}/${coverage.resources.zip.directory}" includeEmptyDirs="yes" verbose="false"/>
137+
</target>
138+
</configuration>
139+
</execution>
140+
</executions>
141+
</plugin>
90142
<plugin>
91143
<groupId>org.apache.maven.plugins</groupId>
92144
<artifactId>maven-surefire-plugin</artifactId>

src/main/resources/CoverageHTMLReporter/application.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ abbr.timeago {
684684
margin-bottom: 18px; }
685685

686686
a.src_link {
687-
background: url("magnify.png") no-repeat left 50%;
687+
background: url("./magnify.png") no-repeat left 50%;
688688
padding-left: 18px; }
689689

690690
tr, td {

0 commit comments

Comments
 (0)