- attached problem.png
Stash 2.8.1: servlet api jar dependency cannot be found
On Stash 2.8.1 it is impossible to enter license due to error while creating License Servlet component.
Comments (8)
-
reporter -
reporter Looking at pom.xml of stash-parent, version 2.7.2:
<!-- Dependency for OSGI exports. This version is available in plugins --> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> <!-- This version is available in core --> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> </dependency>
Same thing is in 2.8.1 pom.xml
-
reporter When I build plugin with referencing stash-parent:2.7.2, my MANIFEST.MF have this in Import-Package section:
javax.servlet;resolution:=optional, javax.servlet.http;resolution:=optional,
However with stash-parent 2.8.1 this becomes
javax.servlet;resolution:=optional;version="[3.0,4)", javax.servlet.http;resolution:=optional;version="[3.0,4)",
Which seems to be the source of my problem
-
reporter If plugin is packaged against 2.7.2, the only source for javax.servlet package on class path is:
<dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency>
Manifest file of that dependency does not have OSGI tags, so when osgi Builder is trying to resolve version, it is set to null and manifest does not have version filter for that import item.
With 2.8.1 both 2.5 and 3.0 serlet api jars are on the classpath. Builder while creating a manifest file sees both, but only 3.0 is an OSGI bundle. Processing that dependency (which should not be on classpath in the first place) modifies import packages in add-on's manifest
-
reporter - attached IDEA-deps-with-2.7.2.png
-
reporter - attached IDEA-deps-with-2.8.1.png
-
reporter - attached dependency-graph.png
Dependency come from stash-func-test-common (via stash-util which is a new dependency of stash-func-test-common since 2.8.1)
-
reporter - changed status to resolved
fixes
#8: problem with Stash 2.8.1 dependencies→ <<cset 2857f794f3f5>>
- Log in to comment