Skip to content

Commit ef7fd82

Browse files
committed
🚌 merge commits
🚌 slim README 🚌 breathing air @ tibet rail 🚌 for direct links README top 🚌 trees on a roof @ paris 🚌 remove nbproject 🚌 new emoji for wiki 🚌 settings.xml doesnt need repositories 🚌 github package registry of javaf 🚌 in -> is 🚌 from extra-boolean
1 parent fd5e1b9 commit ef7fd82

File tree

7 files changed

+382
-59
lines changed

7 files changed

+382
-59
lines changed

.travis.yml

+11-8
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ cache:
99

1010
install:
1111
- git clone https://${GITHUB_TOKEN}@github.com/javaf/deploy "$HOME/deploy"
12-
- cp "$HOME/deploy/settings.xml" "$HOME/.m2/settings.xml"
13-
- gpg --import "$HOME/deploy/private.key"
14-
- gpg --import "$HOME/deploy/public.key"
15-
- cp "$HOME/deploy/.ssh"/* "$HOME/.ssh/"
16-
- chmod 400 "$HOME/.ssh/id_rsa"
12+
- chmod 777 "$HOME/deploy/"*.sh
13+
- bash "$HOME/deploy/install.sh"
14+
# - cp "$HOME/deploy/settings.xml" "$HOME/.m2/settings.xml"
15+
# - gpg --import "$HOME/deploy/private.key"
16+
# - gpg --import "$HOME/deploy/public.key"
17+
# - cp "$HOME/deploy/.ssh"/* "$HOME/.ssh/"
18+
# - chmod 400 "$HOME/.ssh/id_rsa"
1719

1820
script:
19-
- export MAVEN_OPTS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
20-
- mvn $MAVEN_OPTS -B deploy
21-
- mvn $MAVEN_OPTS -B deploy -Dossrh || true
21+
- bash "$HOME/deploy/script.sh"
22+
# - export MAVEN_OPTS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
23+
# - mvn $MAVEN_OPTS -B deploy
24+
# - mvn $MAVEN_OPTS -B deploy -Dossrh || true

README.md

+56-16
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
A "Hello, World!" in an intorductory computer program that general
2-
displays "Hello, World!". [:package:] [:ledger:]<br>
3-
:package: [Central], :ledger: [Releases], :octocat: [GitHub],
4-
:frog: [Bintray], :peacock: [MvnRepository], :blue_book: [Javadoc].
5-
6-
Consider this as a template for:
7-
- Writing Maven project.
8-
- Creating test cases.
1+
A "Hello, World!" is an introductory computer program.<br>
2+
:package: [Central](https://search.maven.org/artifact/io.github.javaf/hello-world),
3+
:scroll: [Releases](https://repo1.maven.org/maven2/io/github/javaf/hello-world/),
4+
:smiley_cat: [GitHub](https://github.com/javaf/hello-world/packages/573464),
5+
:frog: [Bintray](https://bintray.com/beta/#/bintray/jcenter/io.github.javaf:hello-world),
6+
:peacock: [MvnRepository](https://mvnrepository.com/artifact/io.github.javaf/hello-world),
7+
:newspaper: [Javadoc](https://javaf.github.io/hello-world/),
8+
:blue_book: [Wiki](https://github.com/javaf/hello-world/wiki).
9+
10+
> Stability: Experimental.
11+
12+
<br>
13+
14+
Consider this as a template to:
15+
- Write Maven project.
16+
- Create test cases.
917
- Set up [package information](pom.xml).
1018
- Set up [global settings](global/settings.xml).
1119
- Auto generate sources, javadoc JAR.
@@ -15,40 +23,66 @@ Consider this as a template for:
1523
- Auto deploy to GitHub Package registry.
1624
- TODO: Auto update package version.
1725

26+
<br>
1827

1928
```java
2029
## OUTPUT
2130
What clothing does a house wear?
2231
<your answer>
2332
```
2433

25-
[Central]: https://search.maven.org/artifact/io.github.javaf/hello-world
26-
[Releases]: https://repo1.maven.org/maven2/io/github/javaf/hello-world/
27-
[GitHub]: https://github.com/javaf/hello-world/packages/573464
28-
[Bintray]: https://bintray.com/beta/#/bintray/jcenter/io.github.javaf:hello-world
29-
[MvnRepository]: https://mvnrepository.com/artifact/io.github.javaf/hello-world
30-
[Javadoc]: https://javaf.github.io/hello-world/
34+
```java
35+
import io.github.javaf.*;
36+
37+
HelloWorld.imply(true, false);
38+
// false
39+
40+
HelloWorld.eq(false, false);
41+
// true
42+
```
43+
44+
<br>
45+
<br>
46+
47+
48+
## Index
49+
50+
| Method | Action |
51+
| -------- | ------------------------------------- |
52+
| [and] | Check if all values are true. |
53+
| [eq] | Check if antecedent ⇔ consequent. |
54+
| [imply] | Check if antecedent ⇒ consequent. |
55+
56+
[and]: https://github.com/javaf/hello-world/wiki/and
57+
[eq]: https://github.com/javaf/hello-world/wiki/eq
58+
[imply]: https://github.com/javaf/hello-world/wiki/imply
3159

3260
<br>
3361
<br>
3462

3563

3664
## References
3765

66+
### Which JDK
67+
3868
- [JDK, JRE, JVM: What Are They and What Are Their Differences?](https://www.youtube.com/watch?v=BXFHuaQNnLo)
3969
- [Java Development Kit: What Version of the JDK Should You Use?](https://www.youtube.com/watch?v=HqU0TF4XNbM)
4070

4171
<br>
4272

43-
- [Maven central repository search](https://search.maven.org)
44-
- [Maven Repository: Search/Browse/Explore](https://mvnrepository.com)
73+
74+
### Setup deploy
75+
4576
- [Publish JAR To Central Maven Repository, Jakob Jenkov](http://tutorials.jenkov.com/maven/publish-to-central-maven-repository.html)
4677
- [OSSRH Guide, Sonatype Central Repository](https://central.sonatype.org/pages/ossrh-guide.html)
4778
- [Sonatype issues: Account management](https://issues.sonatype.org)
4879
- [Nexus repository manager](https://oss.sonatype.org)
4980

5081
<br>
5182

83+
84+
### Sign package
85+
5286
- [OpenPGP KeyServer](https://keys.openpgp.org)
5387
- [Working with PGP Signatures](https://central.sonatype.org/pages/working-with-pgp-signatures.html)
5488
- [Keep GnuPG credentials cached for entire user session](https://superuser.com/a/624488/305990)
@@ -57,6 +91,9 @@ What clothing does a house wear?
5791

5892
<br>
5993

94+
95+
### Auto deploy
96+
6097
- [Job Lifecycle, Travis CI](https://docs.travis-ci.com/user/job-lifecycle)
6198
- [Building a Java project, Travis CI](https://docs.travis-ci.com/user/languages/java/)
6299
- [Github clone with oauth access token](https://stackoverflow.com/a/42175489/1413259)
@@ -66,6 +103,9 @@ What clothing does a house wear?
66103

67104
<br>
68105

106+
107+
### Update version
108+
69109
- [Changing the project version](https://www.mojohaus.org/versions-maven-plugin/examples/set.html)
70110
- [Updating version numbers of modules in a multi-module Maven project](https://stackoverflow.com/a/5726599/1413259)
71111
- [Use the Latest Version of a Dependency in Maven](https://www.baeldung.com/maven-dependency-latest-version)

global/settings.xml

+25-9
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,52 @@
22
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
44
<servers>
5+
<!-- GitHub Package Registry -->
56
<server>
67
<id>github</id>
78
<username>GITHUB_USERNAME</username>
89
<password>GITHUB_TOKEN</password>
910
</server>
1011

12+
<!-- Maven Central Repository -->
1113
<server>
1214
<id>ossrh</id>
13-
<username>OSSRH_USERNAME</username>
14-
<password>OSSRH_PASSWORD</password>
15+
<username>SONATYPE_USERNAME</username>
16+
<password>SONATYPE_PASSWORD</password>
1517
</server>
1618
</servers>
17-
19+
20+
1821

1922
<profiles>
2023
<profile>
21-
<id>default</id>
24+
<id>common</id>
2225
<activation>
2326
<activeByDefault>true</activeByDefault>
2427
</activation>
28+
29+
<!-- Not sure if this is needed -->
30+
<properties>
31+
<gpg.executable>gpg</gpg.executable>
32+
<gpg.passphrase>GPG_PASSWORD</gpg.passphrase>
33+
</properties>
34+
35+
2536
<repositories>
37+
<!-- Maven Central Repository (default) -->
38+
<repository>
39+
<id>central</id>
40+
<url>https://repo1.maven.org/maven2</url>
41+
<releases><enabled>true</enabled></releases>
42+
<snapshots><enabled>true</enabled></snapshots>
43+
</repository>
44+
45+
<!-- GitHub Maven Packages of Javaf -->
2646
<repository>
27-
<id>github</id>
47+
<id>javaf</id>
2848
<url>https://maven.pkg.github.com/javaf/hello-world</url>
2949
</repository>
3050
</repositories>
31-
<properties>
32-
<gpg.executable>gpg</gpg.executable>
33-
<gpg.passphrase>GPG_PASSWORD</gpg.passphrase>
34-
</properties>
3551
</profile>
3652
</profiles>
3753
</settings>

nbproject/project.properties

Whitespace-only changes.

pom.xml

+16-13
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,35 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<!-- Define Package -->
5+
<!-- Avoid "dependency hell" with semantic versioning -->
56
<modelVersion>4.0.0</modelVersion>
67
<groupId>io.github.javaf</groupId>
78
<artifactId>hello-world</artifactId>
8-
<version>1.0.36</version>
9+
<version>1.2.0</version>
910
<packaging>jar</packaging>
10-
11+
1112
<!-- Use JDK 11 -->
13+
<!-- Comes with Long Term Support (LTS) -->
1214
<properties>
1315
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1416
<maven.compiler.source>11</maven.compiler.source>
1517
<maven.compiler.target>11</maven.compiler.target>
1618
</properties>
17-
19+
1820
<!-- Provide Details -->
1921
<name>hello-world</name>
2022
<description>
21-
A "Hello, World!" in an intorductory computer program that general displays
22-
"Hello, World!".
23+
A "Hello, World!" is an introductory computer program.
2324
</description>
2425
<url>https://github.com/javaf/hello-world</url>
25-
26+
2627
<licenses>
2728
<license>
2829
<name>MIT License</name>
2930
<url>https://opensource.org/licenses/MIT</url>
3031
</license>
3132
</licenses>
32-
33+
3334
<developers>
3435
<developer>
3536
<id>wolfram77</id>
@@ -38,7 +39,7 @@
3839
<url>https://github.com/wolfram77</url>
3940
</developer>
4041
</developers>
41-
42+
4243
<scm>
4344
<url>[email protected]:javaf/hello-world.git</url>
4445
<connection>scm:git:[email protected]:javaf/hello-world.git</connection>
@@ -48,6 +49,7 @@
4849

4950

5051
<!-- GitHub Packages -->
52+
<!-- See settings.xml for server (github) credentials -->
5153
<distributionManagement>
5254
<repository>
5355
<id>github</id>
@@ -145,8 +147,9 @@
145147
<name>ossrh</name>
146148
</property>
147149
</activation>
148-
150+
149151
<!-- Maven Central Repository -->
152+
<!-- See settings.xml for server (ossrh) credentials -->
150153
<distributionManagement>
151154
<snapshotRepository>
152155
<id>ossrh</id>
@@ -157,7 +160,7 @@
157160
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
158161
</repository>
159162
</distributionManagement>
160-
163+
161164
<build>
162165
<plugins>
163166
<!-- Deploy to Maven Central Repository -->
@@ -176,8 +179,8 @@
176179
</plugins>
177180
</build>
178181
</profile>
179-
180-
182+
183+
181184
<!-- Deploy to GitHub Packages & create Release -->
182185
<!-- $ mvn clean deploy -Drelease -->
183186
<profile>
@@ -187,7 +190,7 @@
187190
<name>release</name>
188191
</property>
189192
</activation>
190-
193+
191194
<!-- GitHub Release plugin source -->
192195
<pluginRepositories>
193196
<pluginRepository>

0 commit comments

Comments
 (0)