[weld-dev] WELD-273 Add GlassFish targets to example POMs

Karel Piwko kpiwko at redhat.com
Wed Oct 27 10:44:00 EDT 2010


Hi Marcin,

many thanks for the patch. Sorry for the late reply, but we are
currently very busy, so expect code review in the beginning of the next
week at first. See inlined comments.

Hope to hear from you soon,

Karel

On Tue, 2010-10-26 at 02:19 +0200, Marcin Mieszek wrote:
> Hi,
> 
> I have made some progress with issue WELD-273. Please find diff file
> attached for the first example (weld-jsf-login) and let me know if the
> apporach is correct.
> 
> Originally I planned to use glassfish-embedded server, but maven
> plugin does not have the option to run the server in another process
> so that integration tests are not blocked by the server processing its
> requests (similar thing is done with jetty and daemon parameter). I
> also did not have success with cargo plugin so I switched to
> glassfish-maven-plugin.
> 
> Changes description:
> 
> Defining ftest-glassfish profile:
> #       modified:   examples/jsf/login/pom.xml
> #       modified:   examples/pom.xml
> 
> Copy of test suite definition from jboss6x.xml. Do we really need
> seperate one for each appserver?

This may seem unnecessary, but it is the most comfortable way how to
exclude/include/append tests specific for a container.

> #       new file:   examples/jsf/login/src/ftest/resources/glassfish3x.xml
> 
> Making the class implement Serializable interface to avoid Glassfish
> deployments errors:
> #       modified:
> examples/jsf/login/src/main/java/org/jboss/weld/examples/login/Credentials.java
> 
> Setting table name to USER_TABLE as USER is reserved word:
> #       modified:
> examples/jsf/login/src/main/java/org/jboss/weld/examples/login/User.java
> #       modified:   examples/jsf/login/src/main/resources/import.sql
> 
> Setting to <jta-data-source>jdbc/LoginDS</jta-data-source> so that
> this is accepted by Glassfish:
> #       modified:
> examples/jsf/login/src/main/resources/META-INF/persistence.xml
> 
> 
> One final question:
> 
> Currently there are several apporaches toward ftest. Tomcat and JBoss
> use cargo plugin while Jetty uses maven-jetty-plugin. Moreover each
> profile contains the same copy of failsafe plugin configuration. Can I
> simplify it somehow? How about using unified apporach to deployments?
> 
We are evaluating possibility to move all deployment stuff to
Arquillian, so there will be no cargo and jetty plugin anymore. I guess
it will even allow you to use embedded glassfish.

As for copy of the failsafe plugin configuration, this is a very good
point. You can avoid copy&paste by splitting into two profiles, where
one contains container related part and the latter functional test
execution. Then you'll simply run your test specifying two profiles,
e.g. mvn verify -Pjboss6x,ftest

We would be very happy if you incorporate the split in your patch.


> Looking forward to feedback from you,
> 
> Marcin
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev




More information about the weld-dev mailing list