Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close #27 appimage #30

Merged
merged 47 commits into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
05a2ae1
[#18] Projekt auf Java Modulstruktur umgestellt
Oct 27, 2019
27cb0f6
[${ticket}]: Versions upgrade slfj-api
Nov 1, 2019
292e085
[${branch}] ${ticket}
Nov 1, 2019
8109805
${branch} ${ticket}: Projektstruktur wieder zurück geändert
Nov 1, 2019
39ef214
[#18] ${branch} ${ticket}: Projektstruktur wieder zurück geändert (fi…
Nov 1, 2019
8fef934
[#18] ${branch} ${ticket}: weitere Quelle aufgenommen
Nov 1, 2019
a1bc848
[#18] ${branch} ${ticket}: jmod und jlink profile added
Nov 1, 2019
f4053a0
[#18] ${branch} ${ticket}: jmod und jlink profiles fixed
Nov 1, 2019
28566a9
[#18] jlink config fixed
Nov 2, 2019
a7308ed
[#18] Erstellung von jmods hinzugefügt
Nov 2, 2019
cfcc135
[#18] jacoco version erhöht
Nov 2, 2019
45f3389
[#18] org.json.jmod erzeugt
Nov 2, 2019
59695d9
[#18] jdeps ignores fixed
Nov 2, 2019
3decf5d
[#18] commons-codec.jmod erstellt und aufgenommen
Nov 2, 2019
6908d06
[#18] script fixed
Nov 2, 2019
a42aa6b
[#18] ci build auf openjdk13 festgelegt
Nov 3, 2019
cf6c223
[#18] java 13 optionen gesetzt
Nov 3, 2019
615d509
[#18] module-info disabled
Nov 3, 2019
66735ac
[#18] toolchain in locales profil gezogen
Nov 3, 2019
10159ff
[#18] versions upgrade
Nov 3, 2019
61b800e
[#18] -U flag added
Nov 3, 2019
711830e
[#18] toolchain profil disabled tests serialisiert laufen lassen
Nov 3, 2019
fadbba9
slf4j.api jetzt das Modul genutzt
Nov 4, 2019
0867223
[#18] install ci skipped
Nov 5, 2019
47ca352
[#18] commit message template used
Nov 5, 2019
f259ebe
[#18_native_module] obsolete abhängigkeit auskommentiert
Nov 5, 2019
709d716
[#27_appimage] build script for AppImage added
Nov 5, 2019
4a266a6
[#27_appimage] AppImage sources ignored
Nov 5, 2019
0bf14a2
[#27_appimage] pfade fixed
Nov 5, 2019
7ef148e
[#27_appimage] Buildskripte für appimage erstellt
Nov 6, 2019
03981f7
[#27_appimage] Buildskripte für appimage erstellt lauffähig
Nov 6, 2019
e6d8d79
[#27_appimage] Buildskripte nachgebessert
Nov 6, 2019
3e67a6b
[#27_appimage] scalable icon added
Nov 6, 2019
554f721
[#27_appimage] build optimiert
Nov 6, 2019
34ca7eb
[#27_appimage] build optimiert
Nov 6, 2019
c1ac182
[#27_appimage] appimg-resources moved to src folder
Nov 6, 2019
27b30d5
[#27_appimage] folder neu strukturiert
Nov 6, 2019
d8646fd
[#27_appimage] intaction disabled
Nov 6, 2019
ec13a9b
[#27_appimage] appImage build ins ci aufgenommen
Nov 6, 2019
6f59a07
[#27_appimage] ci optimiert
Nov 6, 2019
9ccda54
[#27_appimage] upstream data added
Nov 6, 2019
b1d57a6
[#27_appimage] upstream data added
Nov 6, 2019
92d3021
codacy issues fixed
Nov 6, 2019
ac71a8a
codacy issues fixed
Nov 6, 2019
6042792
fixed
Nov 6, 2019
ba586ae
code lang added
Nov 6, 2019
6f63dd6
[#27_appimage] syntax fixed
Nov 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@ hs_err_pid*
# build
/target
/generated
/src/jmods/jdeps

# AppImage build
/OpenJDK*.gz
/usr
/jdk*
/AppDir/usr
/*.AppImage
*~
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ language: java


jdk:
- openjdk11
- openjdk13
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mein lokaler Rechner lies sich nach einem Update einfach nicht mehr dazu herab mir ein volles jdk11 zur Verfügung zu stellen. Seither habe ich nur ein jdk13 und von 8 bis 11 jre's.


script: ./mvnw -Pheadless clean site install
install: skip

script:
- ./mvnw -U -Pheadless clean site install
- ./buildAppImage.sh

after_success:
- bash <(curl -s https://codecov.io/bash)
5 changes: 5 additions & 0 deletions ArchitekturEntscheidungen.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ Bei Color.red gibt es keine Anomalie.
[##literatur]
=== Literatur und Quellen im Netz

*
* https://maven.apache.org/plugins/maven-jlink-plugin/usage.html
* https://www.youtube.com/watch?v=a8xnnR3Bz6w&feature=youtu.be&t=2570
* https://stackoverflow.com/questions/47727869/creating-module-info-for-automatic-modules-with-jdeps-in-java-9
* https://github.com/codetojoy/easter_eggs_for_java_9/blob/master/egg_34_stack_overflow_47727869/run.sh
* https://winterbe.com/posts/2018/08/29/migrate-maven-projects-to-java-11-jigsaw/
* https://medium.com/@adam_carroll/java-packager-with-jdk11-31b3d620f4a8
* http://discoveration.de/it/javafx-mit-java-runtime-als-exe-ausliefern/636/
Expand Down
1 change: 1 addition & 0 deletions GitCommitMessage.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[${ticket:".*"}]
56 changes: 56 additions & 0 deletions buildAppImage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env sh

export ARCH=x86_64
export CUR_DIR=${PWD}/
export APP_DIR=target/AppDir/
export BUILD_DIR=target/appbuild/
export RESOURCE_DIR=src/appimage-resources/
export JDK_ARCHIVE_NAME=OpenJDK11U-jdk_x64_linux_openj9_11.0.3_7_openj9-0.14.3.tar.gz

# download jre 11
wget -P ${BUILD_DIR} -c https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7_openj9-0.14.3/${JDK_ARCHIVE_NAME}
tar -C ${BUILD_DIR} -xf ${BUILD_DIR}${JDK_ARCHIVE_NAME}

# list deps modules
${BUILD_DIR}jdk-11.0.3+7/bin/jdeps --list-deps ./target/jenkinsmonitor-*-jar-with-dependencies.jar

# spezielles jre bauen
${BUILD_DIR}jdk-11.0.3+7/bin/jlink --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.desktop,java.logging,java.management,java.naming,java.security.jgss,java.sql,java.xml --output ${BUILD_DIR}usr

# copy binary
mkdir ${APP_DIR}
cp -Rf ${BUILD_DIR}usr ${APP_DIR}

# download AppImageKit and give permissions und run it
wget -P ${BUILD_DIR} -c https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage
chmod +x ${BUILD_DIR}appimagetool-x86_64.AppImage
#wget -P ${BUILD_DIR} https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
#chmod +x ${BUILD_DIR}linuxdeploy-x86_64.AppImage


# copy resources at final place and create sym links
cp -a ./target/jenkinsmonitor-*-jar-with-dependencies.jar ${APP_DIR}usr/bin/jenkinsmonitor-jar-with-dependencies.jar
cp -Rf ${RESOURCE_DIR}* ${APP_DIR}
cd "${APP_DIR}"
ln -s ./usr/bin/jenkinsmonitor.wrapper ./AppRun
ln -s ./usr/share/metainfo/com.github.funthomas424242.jenkinsmonitor.metainfo.xml ./usr/share/metainfo/jenkinsmonitor.appdata.xml
ln -s ./usr/share/applications/jenkinsmonitor.desktop ./jenkinsmonitor.desktop
ln -s ./usr/share/icons/theme/320x235/1984EmmanuelGoldstein.png ./usr/share/icons/theme/256x256/1984EmmanuelGoldstein.png
ln -s ./usr/share/icons/theme/320x235/1984EmmanuelGoldstein.png ./1984EmmanuelGoldstein.png
cd "${CUR_DIR}"

#read -p "Press [Enter] Resourcenprüfung jetzt möglich ..."

# loesche altes Image und erstelle neu
rm Jenkins_Monitor*.AppImage
${BUILD_DIR}appimagetool-x86_64.AppImage ${APP_DIR}
#${BUILD_DIR}/linuxdeploy-x86_64.AppImage --appdir ${APP_DIR} -e src/appimage-resources/launch.sh -i src/appimage-resources/1984EmmanuelGoldstein.png -d src/appimage-resources/myapp.desktop --output appimage

#read -p "Press [Enter] to start remove waste files ..."
#rm ${BUILD_DIR}linuxdeploy*.AppImage
rm -rf ${APP_DIR}*
rm -rf ${APP_DIR}.DirIcon
rm -rf ${BUILD_DIR}usr



4 changes: 4 additions & 0 deletions build_bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das ist eher für #18 gedacht

jlink --module-path "output;$JAVA_HOME/jmods" --add-modules com.github.funthomas424242.jenkinsmonitor --output laufZeitImage

#java --module-path com.mydeveloperplanet.jpmshello/target/jpmshello-1.0-SNAPSHOT.jar;com.mydeveloperplanet.jpmshi/target/jpmshi-1.0-SNAPSHOT.jar --module com.mydeveloperplanet.jpmshello/com.mydeveloperplanet.jpmshello.HelloModules
20 changes: 20 additions & 0 deletions mkJmod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das war für #18 gedacht. Ist jetzt eher obsolet. Ausgelagert in ein extra Projekt:
https://github.com/PIUGroup/informally-jmod-hub

# Herstellung der jmod Dateien für auto module
#
# Gezeigt am Beispiel von commons-lang
#
export GROUP_ID="commons-lang"
export ARTIFACT_ID="commons-lang"
export ARTIFACT_ID_DOT="commons.lang"
export VERSION="2.6"
# bereinige jdeps
rm -rf ./jdeps/*
# generiere Module Definition
jdeps --generate-open-module ./jdeps ~/.m2/repository/${GROUP_ID}/${ARTIFACT_ID}/${VERSION}/${ARTIFACT_ID}-${VERSION}.jar
jdeps --generate-module-info ./jdeps ~/.m2/repository/${GROUP_ID}/${ARTIFACT_ID}/${VERSION}/${ARTIFACT_ID}-${VERSION}.jar
# compiliere module-info
unzip ~/.m2/repository/${GROUP_ID}/${ARTIFACT_ID}/${VERSION}/${ARTIFACT_ID}-${VERSION}.jar -d ./jdeps/${ARTIFACT_ID_DOT}/classes
javac -d ./jdeps/commons.lang/classes ./jdeps/${ARTIFACT_ID_DOT}/module-info.java
# erzeuge jmod module
jmod create --class-path ./jdeps/${ARTIFACT_ID_DOT}/classes src/jmods/${ARTIFACT_ID}-${VERSION}.jmod

135 changes: 107 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.github.funthomas424242</groupId>
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vorbereitung für #18

<version>0.0.2-SNAPSHOT</version>
<artifactId>jenkinsmonitor</artifactId>
<packaging>jar</packaging>
<packaging>${mypackaging}</packaging>
<name>Jenkins Monitor</name>
<description>Ein Jenkinsmonitor für den Systemtray</description>
<inceptionYear>2019</inceptionYear>
Expand Down Expand Up @@ -49,6 +49,7 @@
</distributionManagement>

<properties>
<mypackaging>jar</mypackaging>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven.compiler.release>11</maven.compiler.release>
Expand All @@ -73,22 +74,17 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.28</version>
<version>2.0.0-alpha1</version>
<scope>compile</scope>
</dependency>
<!-- APIs von denen die Generate abhängen -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>nl.jqno.equalsverifier</groupId>
<artifactId>equalsverifier</artifactId>
<version>3.1.10</version>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>javax.validation</groupId>-->
<!-- <artifactId>validation-api</artifactId>-->
<!-- <version>2.0.1.Final</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->

<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand Down Expand Up @@ -118,7 +114,12 @@
<version>${junit-jupiter-engine.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>nl.jqno.equalsverifier</groupId>
<artifactId>equalsverifier</artifactId>
<version>3.1.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.bval</groupId>
<artifactId>bval-jsr</artifactId>
Expand Down Expand Up @@ -160,7 +161,7 @@
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
Expand All @@ -180,7 +181,11 @@
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
Expand All @@ -194,7 +199,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.4</version>
<version>0.8.5</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down Expand Up @@ -252,14 +257,6 @@
</phase>
<goals>
<goal>display-dependency-updates</goal>
</goals>
</execution>
<execution>
<id>show-plugin-updates</id>
<phase>
validate
</phase>
<goals>
<goal>display-plugin-updates</goal>
</goals>
</execution>
Expand Down Expand Up @@ -328,14 +325,23 @@
<configuration>
<encoding>UTF-8</encoding>
<release>11</release>
<compilerArgument>-Xlint:all</compilerArgument>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>--add-opens=java.base/java.lang=ALL-UNNAMED</arg>
<arg>--add-opens=java.base/java.net=ALL-UNNAMED</arg>
</compilerArgs>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M2</version>
<configuration>
<forkMode>never</forkMode>
<argLine>
--illegal-access=deny
</argLine>
<excludedGroups>
${junit-excluded-groups}
</excludedGroups>
Expand Down Expand Up @@ -370,6 +376,16 @@
</archive>
</configuration>
</plugin>
<!-- <plugin>-->
<!-- <artifactId>maven-jlink-plugin</artifactId>-->
<!-- <version>3.0.0-alpha-1</version>-->
<!-- <extensions>true</extensions>-->
<!-- <configuration>-->
<!-- <verbose>false</verbose>-->
<!-- <noHeaderFiles>true</noHeaderFiles>-->
<!-- <noManPages>true</noManPages>-->
<!-- </configuration>-->
<!-- </plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
Expand Down Expand Up @@ -404,7 +420,6 @@
<!-- NOTE: We don't need a groupId specification because the group is
org.apache.maven.plugins ...which is assumed by default. -->
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>package-assemblies</id>
Expand Down Expand Up @@ -454,12 +469,76 @@
</build>

<profiles>
<profile>
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das wäre ein schönes Feature gewesen um zu prüfen, dass der Build mit dem lokalen JDK übereinstimmt. Es tut aber nicht :(

<id>local</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<toolchains>
<jdk>
<version>13</version>
<vendor>openjdk</vendor>
</jdk>
</toolchains>
</configuration>
<executions>
<execution>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<activation>
<!-- nur aktive wenn noch kein anderes aktiv ist -->
<activeByDefault>false</activeByDefault>
</activation>
</profile>
<profile>
<id>headless</id>
<properties>
<junit-excluded-groups>headfull</junit-excluded-groups>
</properties>
</profile>
<!-- <profile>-->
<!-- <id>jmod</id>-->
<!-- <properties>-->
<!-- <mypackaging>jar</mypackaging>-->
<!-- <maven.test.skip>true</maven.test.skip>-->
<!-- </properties>-->
<!-- <build>-->
<!-- <defaultGoal>package</defaultGoal>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <artifactId>maven-jmod-plugin</artifactId>-->
<!-- <version>3.0.0-alpha-1</version>-->
<!-- <extensions>true</extensions>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>jmod</id>-->
<!-- <goals>-->
<!-- <goal>create</goal>-->
<!-- </goals>-->
<!-- <phase>package</phase>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
<!-- </profile>-->
<!-- <profile>-->
<!-- <id>jlink</id>-->
<!-- <properties>-->
<!-- <mypackaging>jlink</mypackaging>-->
<!-- <maven.test.skip>false</maven.test.skip>-->
<!-- </properties>-->
<!-- </profile>-->

</profiles>

Expand Down
16 changes: 16 additions & 0 deletions src/appimage-resources/jenkinsmonitor.properties.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# config file of jenkinsmonitor


jenkinsauth.host-#1=http://192.168.178.54:8080
jenkinsauth.username-#1=admin
jenkinsauth.password-#1=admin

# valid valid >4 (value in seconds)
jenkinsmonitor.pollperiod=10

# id = [a-zA-Z0-9]+ (Zahlen und Buchstaben)
# joburl-id=http://localhost:8090/job/multibranchjob/job/master
joburl-#1=http://192.168.178.54:8080/job/jenkinsmonitor-single/
joburl-#3=http://192.168.178.54:8080/job/test/
joburl-#5=http://localhost:8090/job/localmod/

Loading