Ok, I found the problem (but still have no solution on how to proceed):
In the adjunct jelly file I load the JS files in using commands like:
<script type="text/javascript" src="${resURL}/plugin/jquery3-api/webjars/jquery.min.js“/>
The part ${resURL} is correctly evaluated in Jenkins but not in the test harness (where „jenkins“ is used as context root). Actually ${resURL} is empty in the adjunct. So I think if Jenkins will use a different context root it will not work there as well.
Then I realized that other adjuncts use something like:
<script src="${it.packageUrl}/timeline_js/timeline-bundle.js" type="text/javascript" />
After changing that in my plugins the path is correctly expanded to something like
However the resources are not found, they are rather exposed as
After some more digging I realized that the adjuncts are actually libraries and no plugins. So this seems to be not compatible.
What is the right way to tackle this problem?
Should I locate JS libraries like bootstrap in a Jenkins plugin or in a library (jar) that I am depending on?
Should I refer to the JS files using something like <st:adjunct includes="io.jenkins.plugins.bootstrap4“/> or should I better define a tag lib that includes the JS files using simple script tags?
Or is there even another way that makes sense?