[feature] get rid of appassembler-maven-plugin#5951
[feature] get rid of appassembler-maven-plugin#5951dizzzz wants to merge 15 commits intoeXist-db:developfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
bb05d7e to
4677bca
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
very cool, a bit too much to think about for the comments here. Yes wildcard works even with J8, been running it for 4 years now. We would need to keep an eye on the backup, recovery, etc workflows on all three OSs to make sure they still work. We have no integration tests for this, so we need to do it manually. The Dockerfiles here and at I really like the idea of improvements to modifying |
|
I have seen 'JAVA_OPTS' mostly in old scripts, it looks like it was a pattern once used in the tomcat scripts. setting this details in an environment variable will will make the scripts more clean and readable. I will revise the PR with the ideas. |
That could open up a security issue, as an attacker can just drop a jar file into a folder.
JAVA_OPTS is pretty much defacto for all Java applications these days, and has been for many years. Users and developers have come to expect it.
You should avoid these as they have much wider implications. |
|
I considered the potential security issue already. When the variables are locally defined, and the java command is the last one in sequence, there should be no side effects IMO. If one has access for writing access anyway, an existing jar file (or the xml) can be updated any way. The security risk is merely changed not different. I checked a bit more on 'JAVA_OPTS' it seems to be originated from the Catalina scripts, hence an implementation decision? I will check a bit more though. I will follow this pattern. |
58f72fc to
b96a7d5
Compare
…vious, it looks OK, but I need help to test as i do not have windows available. Note that Java can not create windows symlinks.
|
note 1: to myself: as symlink alternative note 2: eXist-db.app does not start |
66c475b to
56774aa
Compare
line-o
left a comment
There was a problem hiding this comment.
I am in favour of this change. It might be good to have a look at the code analysis warnings to see if there is a useful improvement to be made.
duncdrum
left a comment
There was a problem hiding this comment.
much cleaner I like it. not sure how it would affect docker though, there is no shell in our base images.
|
I think that for Docker there are no differences, like you Said |
| echo "################" | ||
| fi | ||
|
|
||
| # Dot not double quote variables below |
There was a problem hiding this comment.
the following two codacy warnings must be ignored
|
2 of those warnings have to be itgnored as we cannot put double quotes around them |
|
That leaves one warning about the Darwin property never being used. Is that so @dizzzz ? |
|
Right :) but maybe we should report the detected modus in debug mode? Interestingly the original scripts have the same unused item. I decided to leave it in :) |
|
Then @dizzzz either remove it or expose it as you choose. I suspect that we will not stop here to further improve exist-db's startup. |

Context
Until now, eXist used the outdated appassembler-maven-plugin to create the startup code the application. It created a set of shell scripts, each invoked a boot loader, which read an XML file to find the relevant JAR files, created its own classloader and invoked the class
org.exist.start.Mainto get eXist started.As a drawback it was difficult to add an extra jar file or to apply an hotfix by updating one jar file.
Since java 8 or so the 'java' commands allows an * in the classpath. This PR effectively make use of this feature.
@duncdrum I think this might be useful for our docker deployments.
old content of
etcdirectory:old content of XML file: