What is the best maven archetype to start a JSF 2.2 project in Eclipse EE with?
I am currently learning JSF and am looking for a clean maven archetype to start my JSF project with. I tried a few archetypes with jsf in the title, but they don't seem to create a "clean" (no problems found) in eclipse. I am looking for an answer from experience.
I think there is no best one as every archetype comes with stuff one does not want. Since every one is different some modifications will always be required.
I would give the appfuse archetypes a try: http://appfuse.org/display/APF/AppFuse+QuickStart
mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-light-jsf-archetype -DarchetypeVersion=2.2.1 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=http://oss.sonatype.org/content/repositories/appfuse
I think they use MyFaces 2.1.9 but that should be easy to change :)
You could try this one: https://github.com/ignl/happyfacescrud
It contains quite a few features out of box.
Related
I know this is not a new question to you guys, who use Maven. But I'm really new to this. I have searched Stackoverflow and Google for hours, but didn't find a step-by-step working guide (with screenshots).
I am using Eclipse Indigo, Tomcat 7 and now want to create a webapp with Maven. I have few basic needs to create this project. The m2e plugin's archetype seems most confusing to me. Although, it looks like a plug-and-play one, but I couldn't setup a struts2 project from archetype and build successfully.
The project should have strus2, spring and hibernate dependencies configured.
There should be a war and atleast one core module in the project.
I should be able to build and run it from Eclipse on Tomcat 7 server.
Please help guys. I think, there must be some ready-to-learn resource on the web. Please share it.
did you have a look at the AppFuse modular archetype: appfuse-modular-struts
http://docs.codehaus.org/display/MAVENUSER/Archetypes+List
http://appfuse.org/display/APF/Using+Struts+2
to have the list of available archetypes you can type: mvn archetype:generate
I have a project which we implemented using GWT and Spring.
I want to make the project as maven enabled.
How can i achieve that?
I have seen GWT maven plugin. Is it definately required?
Thanks,
Saritha.
in the following link, I am unable to find how to add the plugin in the eclipse.
http://mojo.codehaus.org/gwt-maven-plugin/
how to run the mvn archetype:generate
I have followed http://www.uptick.com.au/content/getting-started-gwt-maven-and-eclipse link to install the gwt maven plugin. Everything was successful after that when iam trying to create maven project iam unable to find gwt-maven-plugin archetype
please help
You can probably write you own.. but in the meantime have a look at http://mojo.codehaus.org/gwt-maven-plugin/. I think the archetype is really usefull, because default GWT project does not necessarily follow Maven directory convention.
I'm new to a number of technologies which I need to use together in a project. I have installed a Jetty plugin for eclipse and also got maven3 working with it.
I want to start a new web-app project from scratch which will use JSP, but I want it to follow the conventions for Maven projects.
I already know JSP so learning that isn't the challenge here, just getting the project set up.
Any help would be appreciated.
You can follow the tutorial here
http://wiki.eclipse.org/Jetty/Tutorial/Jetty_and_Maven_HelloWorld
The only difference in terms of what you want really is that instead of index.html in that example, you would use .jsp and the tags there you wish to use respectively.
The usage of maven, servlets and jetty would still be pretty much identical.
How do I configure Spring STS to work with an existing multi-module Roo project or create a new one from scratch?
Let's take the first case: Creating the project outside of the STS with the Roo shell.
All I do is create the parent project and add a maven module to it. I have not setup JPA or created any entities.
When importing this kind of project (as an existing Maven project), Spring STS doesn't attach a Java project nature. As a result, I can't use the content-assist features of the IDE, or perform refactoring (STS complains the code isn't on the build path).
In the second case, I just want to create a new project from within the STS and start using Roo with multiple maven modules that will be created later.
When using the New Spring Roo Project wizard, I select the package type to be "POM" and let the wizard do it's job. However, errors are reported in the Problems view. STS is complaining it can't find the expected source folders (e.g., src/main/java ...).
Why is this so damn hard?
Thanks,
Jeff
Well I've been using Roo for a while and noticed the same anomalies you just reported. I didn't check your blog yet, but marked for further reading.
Anyway, for my multi-module projects, I usually create them inside or outside STS. Both resulting in the same problems you reported (#1 wrong parent project structure, not finding src, and #2 corrupting projects after importing as Maven projects).
First thing I'd like to clarify is that you don't have to run "perform eclipse" before importing a project into STS, or any Eclipse version with the Maven Plugin. The import will work (with previous flaws) just by the "Import Maven Project" option (and this is also explicitly written in Roo manual).
As for the issues we are talking about, well, I usually remove Roo nature from child projects' POM, to avoid opening Roo Shell (if it happens, Roo tend to delete some .aj files and, as you said, it will corrupt your project). Then I stick to Roo only by using inside the parent project, and then using the "module focus" command to work with child projects.
I believe Spring team will make everything works fine in due time, but for now, Roo is a great option and I believe those workarounds are worthy to keep using it inside Eclipse/STS.
Best regards,
Thiago Uriel
First of all, if you need to work with your Roo console based project in Eclipse - you need to run perform eclipse in your Spring Roo shell. Internally, it calls the Maven Eclipse Plugin and run mvn eclipse:eclipse to make sure your Maven project can be imported successfully to Eclipse / STS.
Related to the multi module projects, please see existing questions related to multi module projects on StackOverflow.
Cheers.
I was trying to start new swing application using maven,
so I started searching on maven documentation but (frustratingly) found no clue. So I'm asking:
what is the archetype used?
what are the dependencies?
how to build swing app in maven [is there is plugin to do so]?
what is the archetype used?
A swing application is a standard JAR so just use the standard archetype:
mvn archetype:generate -DgroupId=com.mycompany.app \
-DartifactId=myswingapp \
-Dversion=1.0-SNAPSHOT
what are the dependencies?
If you plan to use the standard Swing API only, there aren't no extra dependencies to declare. But if you want to use things like JGoodies, MiGLayout, SwingX, Flamingo, SwingFX etc then you'll have to add the appropriate artifacts and repositories. But there is no universal answer to your question.
how to build swing app in maven [is there is plugin to do so ]?
A Swing app is not really particular. I would maybe just consider using Java Web Start (and the Maven Webstart plugin) or maybe a cross platform installer like IzPack (and the Maven IzPack Plugin). But you have time for that, you need an application before :)
Basically, if you are only using Swing (I mean if you do not want additional features such as SwingX for example), then you will not need to add specific information in your pom.xml file, as everything needed for Swing development is already embedded in the JDK.
Concerning the build process, there is also nothing specific additions here. However, you may need be interesed in:
Creating an executable JAR.
Making a big JAR, that also contains all the dependencies.
Check these links if you have problems finding documentation about maven Better builds with Maven and Maven: The Definitive Guide. Then you will figure out that you can build any kind of app like swing using maven. Maven is not a framework is project management and comprehension tool.
Note: Maven: The Definitive Guide was split into two books. The link goes to the blog post that links to both of them.