The missing package org.springframework.mock.web.portlet was in spring-test. If 
you use the appropriate spring-test 5 then struts2-junit-plugin will fail with 
class not found. If you test using spring-test 4 then struts2-junit-plugin will 
run but all the tests for anything using Spring 5 would be at risk or at least 
questionable. As Spring moves on 5+ the risk goes up and the unit testing 
confidence goes down. For now I'll have to stick with Spring 4 until I find a 
longer term solution.
Thanks for the suggestion - John B


On 11/23/2018 6:27 AM, Yasser Zamani wrote:
Hi John,

I think it's possible to keep spring updated to 5 and in same time, to
have needed old dependencies in scope `test` to save unit tests, e.g:

         <!-- Mocks for unit testing (by Spring) -->
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-test</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-webmvc-portlet</artifactId>
             <scope>test</scope>
         </dependency>

Regards.

On 11/22/2018 8:45 PM, John Bush wrote:
I'm by no means a struts inner-workings expert so the following
statements may totally be wrong. I'm not sure a portlet guru is needed
since the problem isn't in struts2-portlet-plugin. It still provides the
portlet request/response life-cycle emulation for the application
appropriately with no reliance on Spring Portlet MVC. That said I am
also not a mocking guru either. I'm not sure how involved it would be to
recreate the mocked classes required that
org.springframework.mock.web.portlet provided.
What's the process to create a bug? I'd like the problem documented if
it's supported, there might be others using it. If I have to solve it
I'll do my best to do it in a way it can be contributed back.
Just to make you aware there is a new portlet spec pretty much final -
JSR 362: Portlet Specification 3.0. You might need a caveat added to
struts2-portlet-plugin stating the specs supported.
Thanks - John B

On 11/15/2018 1:16 AM, Lukasz Lenart wrote:
śr., 14 lis 2018 o 08:48 John Bush<jtb...@mchsi.com>  napisał(a):
WW-3826 solved a problem running JUnit tests on portlet actions via
struts2-portlet-plugin and struts2-junit-plugin. The solution used
Spring's org.springframework.mock.web.portlet package in the spring-test
framework. Spring Portlet MVC is no longer supported (SPR-14129) and the
package has been removed starting with Spring 5. I'm not able to upgrade
to Spring 5 without loosing my unit testing since having both versions
of spring-test in my classpath creates many other issues. Any short term
suggestion would be appreciated.
Thanks John B
I think no one can help you, we really miss a portlet guru on this
list :( I was trying few time to upgrade tests and some portlet
dependencies and I failed :\


Kind regards

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to