-
1. Re: Seam + Maven + Richfaces + softeu
awhitford Jun 4, 2007 12:45 PM (in response to maku01)I would like to reiterate the value of Maven support.
I liken Maven to my TiVo. It is one of those inventions that you don't really need, but when you start using it, you realize the benefits.
The main issue with using Maven is that the open-source dependencies are driven by a community. If everyone used/supported Maven, my build and dependency management would be much easier. The main stumbling block with Maven is typically when you try integrating projects that don't support Maven. Simple jars (like JDBC drivers) are usually not a problem, but frameworks with lots of dependencies (and dependencies have dependencies, etc.) can be awkward.
The Maven user community has grown significantly over the past year, and it sounds like it will overtake Ant.
The JBoss Maven2 repository (http://repository.jboss.com/maven2/) is very helpful. Thanks! -
2. Re: Seam + Maven + Richfaces + softeu
lightguard Jun 4, 2007 1:17 PM (in response to maku01)We're working on doing the same thing here at work. We have Ajax4JSF and RichFaces in the war file (you could use the ear) and they seem to be working just fine. Double check to see if you have it loaded twice (like you thought might be happening) in the war / ear or on JBoss AS itself.
I also would like to see official support for maven. Both of the referenced seam archetypes seem defunct now (the lunarlogic one has source available if someone wants to take it over, I don't have time to maintain it). The softeu stuff looks really good, but I also think this is defunct. Maybe a merge of the two would be good. I know there have been talks (there's an eight page thread on the forum about this) of someone maintaining a repo for seam, but it looks like it didn't get as far as we were all hoping (there is a list of dependencies for seam 1.0.1, but nothing since).
I think Gavin's take (correct me if I'm wrong here) is for someone in the community to head it up, then they can reference that. An "official" JBoss support for maven would be very nice, but not as likely. -
3. Re: Seam + Maven + Richfaces + softeu
fabricio.lemos Jun 4, 2007 4:02 PM (in response to maku01)JBSEAM-983 http://jira.jboss.org/jira/browse/JBSEAM-983 now is the second most voted issue on JIRA.
-
4. Re: Seam + Maven + Richfaces + softeu
maku01 Jun 5, 2007 4:46 AM (in response to maku01)"Lightguard" wrote:
We're working on doing the same thing here at work. We have Ajax4JSF and RichFaces in the war file (you could use the ear) and they seem to be working just fine. Double check to see if you have it loaded twice (like you thought might be happening) in the war / ear or on JBoss AS itself.
I used the softeu plugin to generate the base seam infrastructure. The result of the generation is a maven project where the pom.xml references selfmade dependencies of the softeu repository. So it's not easy to solve the problem for me. (I tried to add dependency to richfaces as mentioned in my first post but this leads to errors) -
5. Re: Seam + Maven + Richfaces + softeu
lightguard Jun 5, 2007 10:59 AM (in response to maku01)Is it the seam references that are giving you a hard time or the richfaces stuff?
-
6. Re: Seam + Maven + Richfaces + softeu
maku01 Jun 5, 2007 12:18 PM (in response to maku01)"Lightguard" wrote:
Is it the seam references that are giving you a hard time or the richfaces stuff?
The maven plugin from softeu define a dependency like this:<dependency> <groupId>jboss.seam.profiles</groupId> <artifactId>seam-ajax4jsf</artifactId> <version>${seam.version}</version> <scope>compile</scope> </dependency>
But the webapp is not able to resolve the richfaces tags when I run the app (the html of the browser contains the <rich:..> tags)
When I comment the dependency above out and use something like this instead:<dependency> <groupId>org.richfaces</groupId> <artifactId>richfaces</artifactId> <version>3.0.0</version> <dependency>
I get an exception like this:
05.06.2007 18:13:34 org.jboss.seam.jsf.AbstractSeamPhaseListener WARNUNG: There should only be one Seam phase listener per application
java.lang.ClassNotFoundException: [Ljava.lang.String;
at java.net.URLClassLoader$1.run(URLClassLoader.java:200) -
7. Re: Seam + Maven + Richfaces + softeu
-arthur- Jun 6, 2007 7:17 AM (in response to maku01)"maku01" wrote:
"Lightguard" wrote:
Is it the seam references that are giving you a hard time or the richfaces stuff?
The maven plugin from softeu define a dependency like this:<dependency> <groupId>jboss.seam.profiles</groupId> <artifactId>seam-ajax4jsf</artifactId> <version>${seam.version}</version> <scope>compile</scope> </dependency>
But the webapp is not able to resolve the richfaces tags when I run the app (the html of the browser contains the <rich:..> tags)
When I comment the dependency above out and use something like this instead:<dependency> <groupId>org.richfaces</groupId> <artifactId>richfaces</artifactId> <version>3.0.0</version> <dependency>
I get an exception like this:
05.06.2007 18:13:34 org.jboss.seam.jsf.AbstractSeamPhaseListener WARNUNG: There should only be one Seam phase listener per application
java.lang.ClassNotFoundException: [Ljava.lang.String;
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
Go to your maven repo and open yourRepoPath/jboss/seam/profiles/seam-ajax4jsf and open the pom.xml
Here you find transitive artifacts.
Comment out the ajax4jsf artifact.
Now go to your projects pom and add the following:<dependency> <groupId>org.richfaces</groupId> <artifactId>richfaces</artifactId> <version>your version</version> <exclusions> <exclusion> <groupId>org.ajax4jsf</groupId> <artifactId>ajax4jsf</artifactId> </exclusion> </exclusions> <dependency> <dependency> <groupId>org.ajax4jsf</groupId> <artifactId>ajax4jsf</artifactId> <version>your version</version> </dependency>
assuming you have installed ajax4jsf in your repository. -
8. Re: Seam + Maven + Richfaces + softeu
maku01 Jun 6, 2007 8:30 AM (in response to maku01)"-Arthur-" wrote:
Go to your maven repo and open yourRepoPath/jboss/seam/profiles/seam-ajax4jsf and open the pom.xml
Here you find transitive artifacts.
Comment out the ajax4jsf artifact.
Now go to your projects pom and add the following:<dependency> <groupId>org.richfaces</groupId> <artifactId>richfaces</artifactId> <version>your version</version> <exclusions> <exclusion> <groupId>org.ajax4jsf</groupId> <artifactId>ajax4jsf</artifactId> </exclusion> </exclusions> <dependency> <dependency> <groupId>org.ajax4jsf</groupId> <artifactId>ajax4jsf</artifactId> <version>your version</version> </dependency>
assuming you have installed ajax4jsf in your repository.
When I do it in this way I get the same error at startup.
When I use a richfaces dependency with no transitive artifacts I get an exception on first access to a pagejavax.faces.FacesException: Resources framework is not initialised, check web.xml for Filter configuration at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getWebXml(ResourceBuilderImpl.java:107) at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getUri(ResourceBuilderImpl.java:309) at org.ajax4jsf.framework.resource.InternetResourceBase.getUri(InternetResourceBase.java:211) at org.ajax4jsf.framework.resource.BaseResourceRenderer.encodeBegin(BaseResourceRenderer.java:62) at org.ajax4jsf.framework.resource.OneTimeRenderer.encodeBegin(OneTimeRenderer.java:48)
-
9. Re: Seam + Maven + Richfaces + softeu
maku01 Jun 6, 2007 8:50 AM (in response to maku01)"-Arthur-" wrote:
Go to your maven repo and open yourRepoPath/jboss/seam/profiles/seam-ajax4jsf and open the pom.xml
Here you find transitive artifacts.
Comment out the ajax4jsf artifact.
Now go to your projects pom and add the following:<dependency> <groupId>org.richfaces</groupId> <artifactId>richfaces</artifactId> <version>your version</version> <exclusions> <exclusion> <groupId>org.ajax4jsf</groupId> <artifactId>ajax4jsf</artifactId> </exclusion> </exclusions> <dependency> <dependency> <groupId>org.ajax4jsf</groupId> <artifactId>ajax4jsf</artifactId> <version>your version</version> </dependency>
assuming you have installed ajax4jsf in your repository.
When I define richfaces 3.0.1 and ajax4jsf 1.1.1 as dependencies (with no transitive dependencies) it WORKS!!!!!!!! -
10. Re: Seam + Maven + Richfaces + softeu
-arthur- Jun 6, 2007 10:50 AM (in response to maku01)Great :)
So, post your complete solution so others can benefit from it. -
11. Re: Seam + Maven + Richfaces + softeu
maku01 Jun 7, 2007 9:57 AM (in response to maku01)Here is the solution for me working with the softeu maven tool:
e.g.
1) Generate a maven based project with:mvn archetype:create -DarchetypeArtifactId=softeu-archetype-seam -DremoteRepositories=http://maven.softeu.cz/ -DgroupId=at.test -DartifactId=testapp
This is equivalent to the seam generator (seam new-project)
After the generation process you are able to run the application e.g. with "mvn jetty:run".
When I pointed the browser to the app it seams first that the app runs fine.
But in my case I had the problem that richfaces tags are not resolved.
(The browser receives html code like <rich:panel> </rich:panel> and so on)
2)
The solution for the problem (at least for me) was to eliminate the following dependency from the pom.xml<dependency> <groupId>jboss.seam.profiles</groupId> <artifactId>seam-ajax4jsf</artifactId> <version>${seam.version}</version> <scope>compile</scope> </dependency>
and to add new dependencies (only existing in my local repository) like this:
<!--- START ajax4jsf locally installed --> <dependency> <groupId>richfaces</groupId> <artifactId>richfaces</artifactId> <version>3.0.1</version> </dependency> <dependency> <groupId>ajax4jsf</groupId> <artifactId>ajax4jsf</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>opensymphony</groupId> <artifactId>oscache</artifactId> <version>2.3.2</version> </dependency> <!--- END ajax4jsf locally installed -->
(for me it worked only with the version richfaces 3.0.1 and ajax4jsf 1.1.1)
Hope this helps for anybody who has the same problem.
3)
Although, I'm NOT really happy with this solution. It is my strong believe that a maven based tool supported from JBoss would be a real huge benefit for the developer community.
From my point of view maven is a really good tool.
Especially when you work in a larger enterprise and you have many projects and dependencies between them I can not easy handle the dependencies with a tool like ant.