Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring-web not published with Eclipse 4.2, WAS 7.0 and mvn 3 [SPR-10494] #15127

Closed
spring-projects-issues opened this issue Apr 25, 2013 · 14 comments
Closed
Assignees
Labels
in: web

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Apr 25, 2013

Marc Schmid opened SPR-10494 and commented

I'm having same problem as described in StackOverflow link even if I'm not the author of the question.
I try to publish a Spring 3.2.x project with Eclipse 4.2 to a Websphere AS 7.0 (via IBM WDT 8.5.x). Using Maven 3.0.4, tried with both eclipse:eclipse and m2eclipse plugin. spring-web-*.jar gets not published on WAS but it is still there as an artifact when packaging a WAR via mvn.
In my company it's only reproducable with this combination. If we use Tomcat instead of WAS, RAD instead of Eclipse or v3.1.x instead of v3.2.x (which was previousely the case) everything works!


Affects: 3.2 GA, 3.2.1, 3.2.2

Reference URL: http://stackoverflow.com/questions/15174774/spring-web-maven-dependency-not-being-published-with-eclipse

6 votes, 10 watchers

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Apr 26, 2013

Jordi Elies commented

I'm having the same issue but I'm using Google App Engine. Everything works seamlessly using 3.1.x version, but since 3.2.x, spring-web is not being published at AppEngine lib folder. More information at StackOverflow (I'm the author of the question), sample project here. Thanks in advance.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented May 7, 2013

Rossen Stoyanchev commented

It sounds a lot like #14851 although 3.2.2 is listed in the affected versions and it should have been fixed in 3.2.2. Does your Maven configuration have an explicit dependency on spring-web or is it a transitive dependency (via spring-webmvc)?

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented May 8, 2013

Marc Schmid commented

Unfortunately not. We're explicitly setting following scopes:
scope compile: spring-core, -beans, -expression, -web, -webmvc, -context, -context-support
scope runtime: spring-aop and all spring-security-*
scope test: spring-test
Additionally - as already described - the library is included within a maven build, but not on WAS publish.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented May 8, 2013

Rossen Stoyanchev commented

Ok, it was worth the try. Given that it's not a Maven dependency issue, i.e. the prepared WAR contains the spring-web jar, can you describe how exactly you publish? Is it by pointing to the WAR (that you know contains the spring-web jar)? Beyond that it's really a question related to Websphere. Under what circumstances can this happen given that the WAR contains the necessary dependency?

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented May 11, 2013

Jordi Elies commented

In my case, using the maven generated WAR from console there is no problem, but in case of running the app using eclipse through Google Plugin, there is no generated WAR (eclipse manages this internally) and the 'spring-web' dependency is not being published to GAE. As Marc says, I have explicit dependency of 'spring-web' on my project as well. Thanks for your time Rossen.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented May 13, 2013

Marc Schmid commented

Same for me. If I attach maven generated WAR / EAR to an WAS, it works well. If I publish via "Websphere(R) Application Server Vxy Tools" version 8.5.1002.* to a Websphere Application Server 7.0 (afaik patch 27) directly from Eclipse 4.2 the spring-web is missing. Workaround is to copy spring-web JAR via bat into tmp0/*/lib/ Eclipse temp directory and restart WAS.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 10, 2013

Brad Tubbs commented

I am having a similar problem. My team is upgrading from Spring 3.1.1 to 3.2.4. We are using Eclipse 4.2.2 with the m2e plugin and WAS 8.5.5. spring-web is no longer included in our WAS publish from Eclipse, as described by Jordi and Marc. spring-web had been included due to a transitive dependency. When it stopped working with 3.2.4, I tried adding an explicit dependency, but this made no difference.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 17, 2013

Martin Sieber commented

Same Problem here. We are using Websphere 8.0.5 with Eclipse Indigo and the m2e plugin. Everything workes up to spring 3.1.4 and version 3.2.x are not working.
Tried with manually copying the jar to .metadata.plugins\org.eclipse.wst.server.core\tmp0\foobar\WEB-INF\lib\ and had no problem with the execution. So it seems just a problem with the automatic dependency management.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 17, 2013

Paul Hanneman commented

we found that in the spring-web jar there is a web-fragment.xml.

When we removed it, everything worked correctly.

This is also reported as an issue with ibm, i do not know the status on it though.

https://www.ibm.com/developerworks/community/forums/html/topic?id=8fde79d3-8ede-4a19-b503-de6c5b75c320

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 17, 2013

Martin Sieber commented

Unfortunately the solution brought up by Paul Hanneman does not help in my case. I deleted the web-fragment.xml in my repository jar, but the jar still did not get copied.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 17, 2013

Brad Tubbs commented

It worked for me. I edited the file in my local repository and made sure to not update it. I also removed my deployment and added it back.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 18, 2013

Martin Sieber commented

After Brad Tubbs reported that it works for him as well I retried the steps and also cleaned wstemp and removed the application completely from org.eclipse.wst.server.core\tmp0.
After a restart I can now confirm that spring-web.jar is copied correctly.
Thank you both for the comments!

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 18, 2013

Rossen Stoyanchev commented

we found that in the spring-web jar there is a web-fragment.xml.
When we removed it, everything worked correctly.

The Servlet spec treats every jar in WEB-INF/lib as a web fragment. The web-fragment.xml in spring-web simply gives it an official name so that Spring's ServletContainerInitializer can be excluded from scanning at startup through an absolute-ordering element in web.xml. More details on this change can be seen here.

In short it shouldn't have such an effect on deployment. If it is something easy to reproduce with a test jar, I recommend reporting the issue to IBM.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Dec 12, 2018

Brian Clozel commented

Resolving for now due to lack of feedback.

@spring-projects-issues spring-projects-issues added type: bug in: web labels Jan 11, 2019
@spring-projects-issues spring-projects-issues removed the type: bug label Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web
Projects
None yet
Development

No branches or pull requests

2 participants