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
http://localhost:8080/adjuncts/3e890174/io/jenkins/plugins/bootstrap4/js/bootstrap.min.js
<http://localhost:8080/adjuncts/3e890174/io/jenkins/plugins/bootstrap4/js/bootstrap.min.js>
However the resources are not found, they are rather exposed as
http://localhost:8080/plugin/bootstrap4-api/io/jenkins/plugins/bootstrap4/js/bootstrap.min.js
<http://localhost:8080/plugin/bootstrap4-api/io/jenkins/plugins/bootstrap4/js/bootstrap.min.js>
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?
> Am 21.11.2019 um 01:35 schrieb Jesse Glick <[email protected]>:
>
> On Wed, Nov 20, 2019 at 5:37 PM Ullrich Hafner <[email protected]>
> wrote:
>> Is this a known limitation of the test harness? Or is this a bug I can try
>> to fix in the test harness
>
> Since you are probably the first to encounter the issue, I would guess
> it is a bug. Whether it is fixable, I have no idea offhand.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2iJdgEEppzRKTwfYYWzUHMnPJKFp5QcRKLe1teCYy5JA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/A66C8411-84D1-4C61-BC9D-2AFE950942AF%40gmail.com.