Skip to content

Commit 6a473d8

Browse files
committed
Add ability to test build without signing and add build instructions to the README.md
See https://stackoverflow.com/a/14869692/7518605 Use mvn -DperformRelease=true ... if you need to sign your build
1 parent 4f23a78 commit 6a473d8

File tree

2 files changed

+47
-14
lines changed

2 files changed

+47
-14
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,23 @@ Further reading:
1313
* [About Kaitai Struct](http://kaitai.io/)
1414
* [About API implemented in this library](http://doc.kaitai.io/stream_api.html)
1515
* [Java-specific notes](http://doc.kaitai.io/lang_java.html)
16+
17+
# Build
18+
To build library run the following command:
19+
20+
```console
21+
mvn install
22+
```
23+
24+
# Release
25+
To make a release ensure that you have:
26+
27+
- a [gpg](https://gnupg.org/) installed
28+
- a [configured](https://maven.apache.org/plugins/maven-gpg-plugin/usage.html) gpg signing key
29+
- pass `-DperformRelease=true` argument to the maven command invocation:
30+
31+
```console
32+
mvn -DperformRelease=true deploy
33+
```
34+
35+
See also http://doc.kaitai.io/developers.html#java.

pom.xml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,33 @@
5454
<maven.compiler.release>7</maven.compiler.release>
5555
</properties>
5656
</profile>
57+
<profile>
58+
<id>release-sign-artifacts</id>
59+
<activation>
60+
<property>
61+
<name>performRelease</name>
62+
<value>true</value>
63+
</property>
64+
</activation>
65+
<build>
66+
<plugins>
67+
<plugin>
68+
<groupId>org.apache.maven.plugins</groupId>
69+
<artifactId>maven-gpg-plugin</artifactId>
70+
<version>3.0.1</version>
71+
<executions>
72+
<execution>
73+
<id>sign-artifacts</id>
74+
<phase>verify</phase>
75+
<goals>
76+
<goal>sign</goal>
77+
</goals>
78+
</execution>
79+
</executions>
80+
</plugin>
81+
</plugins>
82+
</build>
83+
</profile>
5784
</profiles>
5885

5986
<build>
@@ -116,20 +143,6 @@
116143
</tags>
117144
</configuration>
118145
</plugin>
119-
<plugin>
120-
<groupId>org.apache.maven.plugins</groupId>
121-
<artifactId>maven-gpg-plugin</artifactId>
122-
<version>3.0.1</version>
123-
<executions>
124-
<execution>
125-
<id>sign-artifacts</id>
126-
<phase>verify</phase>
127-
<goals>
128-
<goal>sign</goal>
129-
</goals>
130-
</execution>
131-
</executions>
132-
</plugin>
133146
</plugins>
134147
</build>
135148

0 commit comments

Comments
 (0)