[jboss-user] [JBoss Seam] - Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

pete.muir@jboss.org do-not-reply at jboss.com
Wed Oct 31 11:23:05 EDT 2007


"bsmithjj" wrote : I don't believe wrong is the correct term to describe the situation, rather, from your (Seam team) perspective, you provide examples that are based on 'things' being in places in the Seam 2.0.0.CR(X) distribution.  Thus, jars like "jboss-embedded-all.jar" are not truly all.  I say that because I had to discover (the hard way) that I needed to add jboss-embedded-api.jar and jboss-deployers.jar to my repo and test-scoped dependencies to my pom.xml.

Yes, the "official" maven support for Seam isn't well documented. This is because it is new and needs help from the community (e.g. blog articles, patches to the docs) - by using Maven with Seam you are 
pushing the boundaries.

Now, useful information rather than me just pointing out the obvious ;)

You are depending on org.jboss.embedded jboss-embedded to get embedded support? The transitive dependencies on this are

jboss-embedded
  |    -> hibernate-all
  |    -> thirdparty-all
  |    -> jboss-embedded-all
  |       -> jboss-embedded-api
  |          -> jboss-deployers

So that should pull all the dependencies for booting the embedded container.  This should be *easier* than setting up the classpath in ant as you have a well defined set of jars/scopes.

anonymous wrote :  No, this is not in the Seam 2.0.0.CR3 docs - I double checked.  I'm guessing your ant scripts build up classpaths using the lib and the lib/test directories in the distro and so it's easy to miss this kind of thing.  I also just discovered that I need to add hibernate-commons-annotations.jar to my test-scoped dependencies, and thus, again, hibernate-all.jar is not truly all.  It would be nice if the 'all' jars were truly 'all'. ;-)

Things become truly messy with embedded if you need newer bits of hibernate than come with embedded.  Yes, embedded is a source of pain, we need to improve this.

The version of hibernate in hibernate-all doesn't depend on hibernate-commons-annotations (it's an older hibernate) but Seam's compile dependencies are newer than that.

anonymous wrote : I also needed to learn the jboss embedded container layout a bit;  this is so that I could put appropriate maven2 testResource instructions into my pom(s) and reproduce the bootstrap directory layout.  And... I needed to figure out that I need to copy my target/classes contents to the bootstrap deploy dir (I haven't figured out how to get the bootstrap to treat target/classes as part of the classpath).

You should just be able to add all of this to the classpath when run tests - thats what we do with Ant.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100707#4100707

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100707



More information about the jboss-user mailing list