Skip to content

Making an update to JRE features, locally hosted

Simon Leischnig edited this page Jul 24, 2020 · 11 revisions

tl;dr this is a commandline dump of the process. note the ./bin/publish-p2local option which utilizes jetty.

snuc@snuc-NUC:~/eclipsebased/git/core$ cd ../thirdparty/
snuc@snuc-NUC:~/eclipsebased/git/thirdparty$ ./bin/bump/jre-version-allplatforms 
The current version is 11.0.5.009
enter the new version or abort with Control-C: 11.0.5.010
replaced in /home/snuc/eclipsebased/git/thirdparty/./projects/org.jcryptool.thirdparty.jre/org.jcrypt
ool.thirdparty.jre.linux64.feature/pom.xml
replaced in /home/snuc/eclipsebased/git/thirdparty/./projects/org.jcryptool.thirdparty.jre/org.jcrypt
ool.thirdparty.jre.linux64.feature/feature.xml
replaced in /home/snuc/eclipsebased/git/thirdparty/./projects/org.jcryptool.thirdparty.jre/org.jcrypt
ool.thirdparty.jre.linux64.feature/p2.inf
replaced in /home/snuc/eclipsebased/git/thirdparty/./projects/org.jcryptool.thirdparty.jre/org.jcrypt
ool.thirdparty.jre.macosx.feature/pom.xml
replaced in /home/snuc/eclipsebased/git/thirdparty/./projects/org.jcryptool.thirdparty.jre/org.jcrypt
ool.thirdparty.jre.macosx.feature/feature.xml
replaced in /home/snuc/eclipsebased/git/thirdparty/./projects/org.jcryptool.thirdparty.jre/org.jcrypt
ool.thirdparty.jre.macosx.feature/p2.inf
replaced in /home/snuc/eclipsebased/git/thirdparty/./projects/org.jcryptool.thirdparty.jre/org.jcrypt
ool.thirdparty.jre.win64.feature/pom.xml
replaced in /home/snuc/eclipsebased/git/thirdparty/./projects/org.jcryptool.thirdparty.jre/org.jcrypt
ool.thirdparty.jre.win64.feature/feature.xml
replaced in /home/snuc/eclipsebased/git/thirdparty/./projects/org.jcryptool.thirdparty.jre/org.jcrypt
ool.thirdparty.jre.win64.feature/p2.inf
replaced in /home/snuc/eclipsebased/git/thirdparty/./releng/org.jcryptool.thirdparty.jre.p2/category.
xml
replaced in /home/snuc/eclipsebased/git/core/./org.jcryptool.target/org.jcryptool.target.target
replaced in /home/snuc/eclipsebased/git/core/./org.jcryptool.jre.master.feature/feature.xml
snuc@snuc-NUC:~/eclipsebased/git/thirdparty$ ./bin/build-
build-all                     build-jre-and-p2              build-m2bundle-durianswttest
build-helpuipatch             build-m2bundle-all            build-publish-all
snuc@snuc-NUC:~/eclipsebased/git/thirdparty$ ./bin/build-jre-and-p2
[... SNIP ...]
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.536 s
[INFO] Finished at: 2020-07-24T13:13:44+02:00
[INFO] ------------------------------------------------------------------------
snuc@snuc-NUC:~/eclipsebased/git/thirdparty$ ./bin/publish-p2-
publish-p2-helpuipatch  publish-p2-jre          publish-p2-m2bundle     
snuc@snuc-NUC:~/eclipsebased/git/thirdparty$ ./bin/publish-p2-jre
[... this requires my github password to the interim hosting site, the repo github.com/simlei/org.jcryptool.thirdparty ... we have got to migrate this before v1.0. see https://github.com/jcryptool/core/issues/218]
Consult and use ./bin/publish-p2local-jre to serve this via localhost:8080/site/jre and adapt the target platform in the core repository accordingly.

This is a quick draft, will be expanded when the p2 site arrives at their "real" hosting site. The scripts are all quite safe to run and work well (Though untested under OS X). You will need bash and mvn installed.

Build and try out locally

  • best is to clone it next to JCT/core which should be linked from or have the name core. Alternatively, to make version bumping work, export JCT_CORE_HOME=... to your environment.
git clone https://github.com/simlei/org.jcryptool.thirdparty --depth=1
cd org.jcryptool.thirdparty

Make changes

Scripts

The scripts are pretty self-explanatory. E.g. bin/build-jre-and-p2 is just two mvn -pl <project-list> -am clean package [install] calls. To use a localhost-ed site, you have to change {JCT-core}/o.j.target/o.j.target.target accordingly (look for a "jre" url and change to http://localhost:8080/site . )

# builds JRE features in /projects and their 
# respective p2 site in /releng

bin/build-jre-and-p2          

# hosts the JRE p2 site on locahost:8080/site 
# (alternatively, add -Djetty.port={port})

bin/publish-p2local-jre       

# guides you through a version bump for the JRE 
#  .. in o.j.thirdparty and ../core (by default). 
# Only targets specific files, no depth dearch mess. 
# It does 'sed -i {}' however, so use common sense.

bin/bump/jre-version-allplatforms

Hosting

For now, we "creatively use" this repository as a github pages binary hosting service to deliver built p2 sites, which is due to change soon.

Changes you make are not automatically deployed on git push, though -- the bin/publish-p2-* scripts do that. bin/publish-p2local-* are safe as they use Maven Jetty for doing it through http://localhost/{site}

Troubleshooting

  • One could temporarily mv ~/.m2 ~/.m2-stash but it is not required.
Clone this wiki locally