Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Hello,

I just want to inform the community about that Know IT Objectnet developers have created a "Mavenized" Seam project template. The goal was to create a flexible Maven build where it should be easy to switch between databases and appservers, exploded deploy etc.

During development of the Maven build I have so far "Mavenized" chapter 2, 3, 4, 5 and 6 in the Seam In Action Book. The code is located here:
http://code.google.com/p/seam-maven-refimpl/

Also provided is a getting started guide and guides for integrating the build system with Eclipse and IntelliJ.

We haven't yet implemented tests in the build system, but as soon as summer vacation is over we will start working on that.

Regards
Leif Olsen
Consultant
Know IT Objectnet AS
www.knowit.no

24 Replies:
02. Jul 2009, 11:02 America/New_York | Link

Hello Leif.

Thats great work. Thank you for sharing with the community.

02. Jul 2009, 18:40 America/New_York | Link

This is great! Just curious, in the root POM, why not reference the Seam POM as the root rather than including it?

02. Jul 2009, 18:54 America/New_York | Link

Hi. We were using the seam pom as our root in the beginning, but we decided to move away from this design. Mainly due to the issues that can arise due to transient dependencies, and also because of the increased flexibility we gain by not using it. You can still use the seam-maven-refimpl project as your template and choose to use seam as your root pom if you wish.

Regards Ken Gullaksen Consultant Know IT Objectnet AS www.knowit.no

05. Jul 2009, 19:44 America/New_York | Link

Hi,

That's an interesting setup thanks. I had some problems though using seam-maven-refimpl as a template.

First, despite your very good tutorial, I found the jboss tools integration very cumbersome and unstable in my installation. That's not a big deal though, since I actually prefer to use the jboss tools on a separate seam-gen generated project and cannibalize its files as needed.

The testing issue is more of a problem:

1- I cannot create a testng @Test annotation on eclipse. The testng jar is not even on the classpath in eclipse. If I remember correctly, with non-seam mavenized projects testng is available out of box after importing the project in eclipse. Did you succeed to create a test in eclipse?

2- If I try to run the mvn test goal on the command line I got an Exception:

org.apache.maven.surefire.booter.SurefireExecutionException: javax/servlet/FilterConfig; 
nested exception is java.lang.NoClassDefFoundError: javax/servlet/FilterConfig
java.lang.NoClassDefFoundError: javax/servlet/FilterConfig

I tried both from the parent directory and the ejb directory. Did you succeed to run mvn test?

05. Jul 2009, 20:14 America/New_York | Link

Just after my post, I think I found the cause of my testing issues.

I didn't realize that in the huge parent pom, the missing dependencies where only declared on the dependencyManagement section.

06. Jul 2009, 14:27 America/New_York | Link

Hi, I´m from Cuba and I can't get it my friend, the URL say that I don't have permission.

Please, if you can share with me that information I'll be grateful. Thanks

06. Jul 2009, 18:07 America/New_York | Link
As I wrote i my initial post, testing is not yet implemented. When summer holidays are over we'll start working on that. Out initial plan is to have the build system production ready late August, as we need the build for a Seam project we're engaged in.

I have, as requested, added you as a member to http://groups.google.com/group/know-it_seaminaction and http://code.google.com/p/seam-maven-refimpl/


Regards
Leif Olsen
06. Jul 2009, 18:18 America/New_York | Link
Vladimir Guerra Miller wrote on Jul 06, 2009 14:27:
Hi, I´m from Cuba and I can't get it my friend, the URL say that I don't have permission. Please, if you can share with me that information I'll be grateful. Thanks

Can you please try: http://seam-maven-refimpl.googlecode.com/svn/trunk/

Note: http not https

Regards Leif Olsen

14. Jul 2009, 10:08 America/New_York | Link

Hi,

I am very interested in this project and I am glad there are more people around looking for a better integration.

We have a setup at work where we have mavenized seam projects too. We have a multimodule project.

It helped a lot for standardizing the different projects in our department, although we 've lost a lot of IDE features as the combination of maven support and seam support in Eclipse is not yet fully implemented (m2eclipse has been quite unstable for us too). They are working on it.

For the moment I am experimenting with IntelliJ. I can add seam facets to our projects and the project will have some seam capabilities. Although in facelets editor he does not recognize our own components. Seam built-in components are recognized. At home I have a seamgen project in IntelliJ and the custom components are picked up in the IDE.

Having our own seam components recognized in IntelliJ for maven project would be a major productivity boost.

Did anyone in your project encounter the same problem?Someone with a workaround?

I have been looking into IntelliJ forum too but sofar I did not find a workaround.

Thx,

Werner

14. Jul 2009, 14:46 America/New_York | Link

Hi Werner. I'm also using IDEA, but I'm not having that problem using the seam-maven-refimpl project as a template. I can think of two things that may be of help. First off, set .xhtml to be a jspx file type under ide settings. Second, don't use mvn idea:idea, instead just choose to open project and in the dialog select the root pom of your project, IDEA will do the rest.

07. Aug 2009, 14:00 America/New_York | Link
Leif - I would like to thank you for the sample projects based on maven, they have been very useful. Do you folks have any plans on migrating the project dependencies to Seam 2.2.0.GA.
10. Aug 2009, 21:17 America/New_York | Link

Hey thanks! Great work!

 

Dan Allen | mojavelinux.com | Author of Seam in Action

10. Aug 2009, 22:16 America/New_York | Link

Hi Joshua.

Implementing 2.2.0 GA is on our agenda.

Our plan is to first reinstate the Seam pom as the parent pom, then get testing to work properly. After that we will tag the 2.1.2 version and start working on 2.2.0.

22. Aug 2009, 20:29 America/New_York | Link
Hi Leif,

I dont know what to say about mavenized examples, as I'm new to maven concept and experimenting with it.

However towards SVN checkout at https://seam-maven-refimpl.googlecode.com/svn/trunk is prompting for user id & password. Is it restricted? Can i get it?

The related post is at http://www.seamframework.org/Community/QuerySeamInActionExamples

Thank you in advance!
25. Aug 2009, 23:11 America/New_York | Link

Use HTTP instead of HTTPS. HTTP is for anonymous access, HTTPS is for commits.

 

Dan Allen | mojavelinux.com | Author of Seam in Action

28. Aug 2009, 12:00 America/New_York | Link
I apologize for redundant post, accidently overlooked the earlier replies.

However, Thank you Dan for it.

I'm unable to import the tutorials in Eclipse. The details are posted at
http://www.seamframework.org/Community/ErrorImportAMavenizedSeamProjectToEclipse

Please assist to resolve the error!
10. Sep 2009, 23:52 America/New_York | Link

This is now the official, sanctioned Maven 2 project template for Seam applications. Thanks to the Know IT Objectnet developers! We appreciate your support.

Is there a Maven 2 project template for Seam applications?

 

Dan Allen | mojavelinux.com | Author of Seam in Action

25. Sep 2009, 08:19 America/New_York | Link

Hi leif, Its very interesting project, i would like to join it.

18. Oct 2009, 22:51 America/New_York | Link

Hello,

The seam-refimpl project and all examples are now updated to seam-2.2.0.GA.

I have also Mavenized two additional projects from seam-2.2.0.GA/ examples; jbpm and seamspace. These two examples show how to build projects that uses the latest JBoss Rules and jBPM.

The Eclipse tutorial is updated with sections showing how to configure JBoss Tools and how to use JBoss Tools to do reverse engineering.

Regards Leif Olsen

20. Oct 2009, 13:33 America/New_York | Link

This is very helpful. Thanks for publishing. Any idea when some of the examples might include entity and UI testing?

22. Oct 2009, 13:22 America/New_York | Link

We are currently working on implementing tests in the project template, will submit an update to thread when it is working.

27. Jan 2010, 12:45 America/New_York | Link

Shameless plug : FWIW, I started a seam-ear-archetype at http://code.google.com/p/open-archetypes/ which you can use to kickstart a new Seam 2.2.0.GA EAR project.

It supports (basic) integration testing using JBoss embedded. I tested it with maven CLI and eclipse/m2eclipse 0.9.9(dev)/JBoss Tools 3.1 CR1.

Documentation is still scarce, but creating a new project should be pretty straightforward. I'd be happy to receive some feedback from the community.

regards,

Fred Bricon

03. Feb 2010, 07:58 America/New_York | Link

I just tried http://code.google.com/p/open-archetypes/ and selected the first one after I run mvn archetype:generate -DarchetypeCatalog=http://open-archetypes.googlecode.com/svn/snapshots-repository/archetype-catalog.xml.

After I import the project as a new Java project in Eclipse, when I run 'mvn install' via m2eclipse plugin in Eclipse I get the following:

Maven cannot calculate your build plan, given the following information:

Tasks:
- install

Current project:
Group-Id: myGroupId
Artifact-Id: myArtifactId-util
Version: 1.0
From file: C:\temp\myArtifactId\myArtifactId-util\pom.xml


Error message: Failed to resolve plugin for mojo binding: org.apache.maven.plugins:maven-compiler-plugin:2.0.2.SP1:compile
Root error message: Unable to download the artifact from any repository
 

I'm learning Objective-C, it's about time I learned an OO language other than Java!

03. Feb 2010, 17:01 America/New_York | Link

Oops, sorry for the inconvenience, I forgot maven-compiler-plugin:2.0.2.SP1 was not available in central, only in jboss repo. Until I can deploy a new snapshot version of the archetype in a couple hours, you can either use maven-compiler-plugin:2.0.2 in myArtifactId/pom.xml or add the following plugin repositories :

  <pluginRepositories>
    <pluginRepository>      
      <id>repository.jboss.org</id>
      <name>JBoss Repository</name>
      <url>http://repository.jboss.org/maven2/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
    <pluginRepository>  
      <id>snapshots.jboss.org</id>
      <name>JBoss Snapshots Repository</name>
      <url>http://snapshots.jboss.org/maven2/</url>
      <snapshots>
         <enabled>true</enabled>
      </snapshots>
      <releases>
         <enabled>false</enabled>
      </releases>
    </pluginRepository>
  </pluginRepositories>  

and try updating the maven project configuration.

regards,

Fred Bricon