>>>>> Eric Lilja <[email protected]>: > Anyway, I tried embedding the dependency in a service, and I removed > the problematic import and then I let the service do JSoup.connect() > and get the title of a webpage. My service was still satisfied and > JSoup was able to do what I requested. So instead of embedding you can > simply do a re-pack and remove the unwanted import.
Ok, I thought the retention policy runtime on the annotations, meant that the bundle wouldn't load, if the annotations weren't available at runtime. But I followed what you said over, and removed the javax.annotation and javax.annotation.meta imports from the MANIFEST.MF of the bundle, and the result loaded fine in my applications that use jsoup. So I have created a PR for jsoup that removes the imports from the MANIFEST.MF: https://github.com/jhy/jsoup/pull/1621 FYI I use jsoup to handle HTML forms values in HTML forms that don't use JavaScript: https://github.com/steinarb/authservice/blob/master/authservice/authservice.web.security/src/main/java/no/priv/bang/authservice/web/security/resources/PasswordsResource.java#L86 https://github.com/steinarb/authservice/blob/master/authservice/authservice.web.security/src/main/java/no/priv/bang/authservice/web/security/resources/PasswordsResource.java#L102 https://github.com/steinarb/authservice/blob/master/authservice/authservice.web.security/src/main/resources/web/password.html#L34 and also to set return messages https://github.com/steinarb/authservice/blob/master/authservice/authservice.web.security/src/main/java/no/priv/bang/authservice/web/security/resources/PasswordsResource.java#L85 https://github.com/steinarb/authservice/blob/master/authservice/authservice.web.security/src/main/java/no/priv/bang/authservice/web/security/resources/HtmlTemplateResource.java#L50 (sort of a very simple templating engine...)
