Skip to content

Commit ced5c4b

Browse files
Merge pull request wvengen#398 from Marcono1234/marcono1234/plugin-documentation-site
Improve plugin site & add GitHub workflow
2 parents 0f48e0f + 52e7c14 commit ced5c4b

File tree

8 files changed

+90
-114
lines changed

8 files changed

+90
-114
lines changed

.github/workflows/maven.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ on:
99
pull_request:
1010
branches: [ master ]
1111

12+
permissions:
13+
contents: read # to fetch code (actions/checkout)
14+
1215
jobs:
1316
build:
14-
1517
runs-on: ubuntu-latest
1618

1719
steps:
@@ -22,5 +24,10 @@ jobs:
2224
java-version: '11'
2325
distribution: 'adopt'
2426
cache: maven
27+
2528
- name: Build with Maven
26-
run: mvn -B verify -P=integration-test
29+
run: mvn --batch-mode --no-transfer-progress verify -P=integration-test
30+
31+
# Always build plugin site (but don't publish), to make sure build works
32+
- name: Build plugin site
33+
run: mvn --batch-mode --no-transfer-progress site

.github/workflows/site.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Publish plugin site
2+
3+
on:
4+
release:
5+
types: [published]
6+
# Support manually triggering this workflow from GitHub UI
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-site:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read # to fetch code (actions/checkout)
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: "11"
21+
distribution: "adopt"
22+
cache: maven
23+
24+
- name: Build site
25+
run: mvn --batch-mode --no-transfer-progress site
26+
27+
- name: Upload site files as artifact
28+
id: deployment
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: target/site
32+
33+
# See https://github.com/actions/deploy-pages
34+
deploy-site:
35+
needs: build-site
36+
37+
permissions:
38+
pages: write
39+
id-token: write
40+
41+
# Deploy to the github-pages environment
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

.publish_site.sh

Lines changed: 0 additions & 41 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

pom.xml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<groupId>com.github.wvengen</groupId>
1717
<artifactId>proguard-maven-plugin</artifactId>
18-
<name>proguard-maven-plugin</name>
18+
<name>ProGuard Maven Plugin</name>
1919
<version>2.6.2-SNAPSHOT</version>
2020
<packaging>maven-plugin</packaging>
2121

@@ -32,8 +32,7 @@
3232
<scm>
3333
<url>https://github.com/wvengen/proguard-maven-plugin</url>
3434
<connection>scm:git:git://github.com/wvengen/proguard-maven-plugin.git</connection>
35-
<tag>proguard-maven-plugin-2.3.0</tag>
36-
</scm>
35+
</scm>
3736

3837
<distributionManagement>
3938
<snapshotRepository>
@@ -75,7 +74,7 @@
7574
<email>[email protected]</email>
7675
</contributor>
7776
</contributors>
78-
77+
7978
<dependencies>
8079

8180
<!-- From version 7 on we need to add two dependencies -->
@@ -173,13 +172,6 @@
173172
<configuration>
174173
<outputEncoding>UTF-8</outputEncoding>
175174
</configuration>
176-
<dependencies>
177-
<dependency>
178-
<groupId>org.apache.bcel</groupId>
179-
<artifactId>bcel</artifactId>
180-
<version>6.10.0</version>
181-
</dependency>
182-
</dependencies>
183175
</plugin>
184176

185177
<plugin>
@@ -205,7 +197,7 @@
205197

206198
<plugin>
207199
<groupId>org.apache.maven.plugins</groupId>
208-
<artifactId>maven-plugin-plugin</artifactId>
200+
<artifactId>maven-plugin-report-plugin</artifactId>
209201
<version>3.15.1</version>
210202
</plugin>
211203

src/main/java/com/github/wvengen/maven/proguard/ProGuardMojo.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@
5555
import org.codehaus.plexus.archiver.jar.JarArchiver;
5656

5757
/**
58-
*
59-
* <p>
60-
* The Obfuscate task provides a stand-alone obfuscation task
61-
* </p>
58+
* Runs ProGuard as part of the build.
6259
*
6360
* @goal proguard
6461
* @phase package

src/site/apt/index.apt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ proguard-maven-plugin
1010

1111
* Overview
1212

13-
The proguard-maven-plugin is a Maven plugin to execute {{{https://www.guardsquare.com/proguard}ProGuard}}
13+
The proguard-maven-plugin is a Maven plugin to execute {{{https://www.guardsquare.com/proguard}ProGuard}}.
1414

1515
* Parameters
1616

17-
Regular {{{proguard-mojo.html}proguard:proguard parameters}}
17+
Regular {{{./proguard-mojo.html}proguard:proguard parameters}}
1818

1919
** <<<libs>>> JVM libraries usually not in dependency list
2020

@@ -25,19 +25,19 @@ proguard-maven-plugin
2525
</libs>
2626
---
2727

28-
** You can use <<<inFilter>>> to apply ProGuard {{{https://www.guardsquare.com/manual/configuration/usage#filters}classpathentry Filters}} to input jar
28+
** You can use <<<inFilter>>> to apply ProGuard {{{https://www.guardsquare.com/manual/configuration/usage#filters}classpathentry filters}} to input jar
2929

3030
---
3131
<inFilter>!org/microemu/app/classloader/**</inFilter>
3232
---
3333

34-
** You can use <<<inLibsFilter>>> to apply ProGuard {{{https://www.guardsquare.com/manual/configuration/usage#filters}classpathentry Filters}} to all input lib jars
34+
** You can use <<<inLibsFilter>>> to apply ProGuard {{{https://www.guardsquare.com/manual/configuration/usage#filters}classpathentry filters}} to all input lib jars
3535

3636
---
3737
<inLibsFilter>!META-INF/versions/**</inLibsFilter>
3838
---
3939

40-
** You can use <<<outFilter>>> to apply ProGuard {{{https://www.guardsquare.com/manual/configuration/usage#filters}classpathentry Filters}} to output jar
40+
** You can use <<<outFilter>>> to apply ProGuard {{{https://www.guardsquare.com/manual/configuration/usage#filters}classpathentry filters}} to output jar
4141

4242
---
4343
<outFilter>!**ECLIPSEF.*</outFilter>
@@ -58,10 +58,10 @@ proguard-maven-plugin
5858
---
5959

6060
** <<<assembly>>> allows to bundle project dependency to resulting jar with different options e.g. -injars ProGuard args.
61-
Some flagged as <<<library>>> doesn`t need to be processed by ProGuard are added as -libraryjars and added to resulting jar by plugin after ProGuard is finished.
61+
Some flagged as <<<library>>> doesn't need to be processed by ProGuard are added as -libraryjars and added to resulting jar by plugin after ProGuard is finished.
6262
For clarity param <<<includeDependency>>> will just add -libraryjars arg to ProGuard and Dependency is not included in resulting jar.
6363

64-
You can use <<<assembly>>> to apply ProGuard {{{https://www.guardsquare.com/manual/configuration/usage#filters}classpathentry Filters}} to dependency jars
64+
You can use <<<assembly>>> to apply ProGuard {{{https://www.guardsquare.com/manual/configuration/usage#filters}classpathentry filters}} to dependency jars:
6565

6666
---
6767
<assembly>
@@ -72,7 +72,7 @@ proguard-maven-plugin
7272
<!-- filter will not apply -->
7373
</inclusion>
7474
<inclusion>
75-
<!-- filter out some classes see ProGuard classpathentry Filters -->
75+
<!-- filter out some classes see ProGuard classpathentry filters -->
7676
<groupId>org.microemu</groupId><artifactId>microemu-javase</artifactId>
7777
<filter>!org/microemu/app/classloader/**</filter>
7878
</inclusion>
@@ -113,23 +113,23 @@ proguard-maven-plugin
113113

114114
* <<<-verbose>>> When executing <<<maven -X>>>
115115

116-
* <<<-printmapping>>> is based on the <<<mappingFileName>>> set in the configuration, defaults to '${project.build.directory}/<\<mappingFileName\>>', while <<<-printseeds>>> is based on <<<seedFileName>>> and defaults to '${project.build.directory}/<\<seedFileName\>>'
116+
* <<<-printmapping>>> is based on the <<<mappingFileName>>> set in the configuration, defaults to '$\{project.build.directory\}/<\<mappingFileName\>>', while <<<-printseeds>>> is based on <<<seedFileName>>> and defaults to '$\{project.build.directory\}/<\<seedFileName\>>'
117117

118118
[]
119119

120-
Additional ProGuard configuration can be added using {{{proguard-mojo.html#options}options}} or {{{proguard-mojo.html#proguardInclude}proguardInclude}}
120+
Additional ProGuard configuration can be added using {{{./proguard-mojo.html#options}options}} or {{{./proguard-mojo.html#proguardInclude}proguardInclude}}
121121

122122

123123
** Command line length workaround
124124

125-
If you have a huge list of dependencies the list of <<<-libraryjars>>> the resulting command line to execute ProGaurd could become too long. On Windows the error message could look like <<<CreateProcess error=206, The filename or extension is too long>>>.
125+
If you have a huge list of dependencies the list of <<<-libraryjars>>> the resulting command line to execute ProGuard could become too long. On Windows the error message could look like <<<CreateProcess error=206, The filename or extension is too long>>>.
126126

127127
* <<< <generateTemporaryConfigurationFile>true</generateTemporaryConfigurationFile> >>> makes the plugin pass the configuration by a temporary file instead of over the command line. Build performance should not be impacted by this.
128128

129129

130130
* Usage
131131

132-
Replace project artifact with obfuscated one. Original jar would be preserved in file project.build.finalName.jar_proguard_base.jar
132+
Replace project artifact with obfuscated one. Original jar would be preserved in file '<\<artifact-name\>>_proguard_base.jar'.
133133

134134
---
135135
<build>
@@ -157,7 +157,7 @@ proguard-maven-plugin
157157
</build>
158158
---
159159

160-
Create new file ${project.build.finalName}-small.jar
160+
Create new file '$\{project.build.finalName\}-small.jar':
161161

162162
---
163163
<build>
@@ -187,7 +187,7 @@ proguard-maven-plugin
187187
</build>
188188
---
189189

190-
Complex Applet creation example. See full {{{http://www.microemu.org/}MicroEmulator}} project sources for more details
190+
Complex Applet creation example. See full {{{http://www.microemu.org/}MicroEmulator}} project sources for more details.
191191

192192
---
193193

@@ -261,7 +261,7 @@ proguard-maven-plugin
261261
</build>
262262
---
263263

264-
Use different version of {{{https://www.guardsquare.com/proguard}ProGuard}}
264+
Use different version of {{{https://www.guardsquare.com/proguard}ProGuard}}:
265265

266266
---
267267
<build>

src/site/site.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
<project name="Maven proguard Plug-In">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project>
3+
<skin>
4+
<groupId>org.apache.maven.skins</groupId>
5+
<artifactId>maven-fluido-skin</artifactId>
6+
<version>2.1.0</version>
7+
</skin>
28
<body>
3-
<menu name="Maven ProGuard Quickstart">
4-
<item name="Introduction" href="index.html"/>
5-
<item name="Plugin Goals" href="plugin-info.html"/>
9+
<menu name="ProGuard Maven Quickstart">
10+
<item name="Introduction" href="index.html" />
11+
<item name="Plugin Goals" href="plugin-info.html" />
612
</menu>
7-
<menu ref="parent" />
8-
${reports}
13+
<menu ref="reports"/>
914
</body>
1015
</project>

0 commit comments

Comments
 (0)