File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Learning Struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Learning Struts 2" Watch "Learning Struts 2" New topic

Learning Struts 2

Sagar Kale
Ranch Hand

Joined: May 02, 2008
Posts: 188
Hi All,

I have worked with Struts 1.x for last two years and I know it well. I want to learn Struts 2.0.

I tried Bootstrap tutorial on struts site (

But first Maven command did not work. I am new to Maven as well. I have used Ant in the past.

I tried executing

mvn archetype:create -DgroupId=tutorial -DartifactId=tutorial -DarchetypeGroupId=org.apache.struts -DarchetypeArtifactId=struts2-archetype-starter -DarchetypeVersion=2.0.9-SNAPSHOT -DremoteRepositories=

in one blank directory and expected it that it will create application template which is mentioned on strut's site.

But it giving me following errors.

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18 seconds
[INFO] Finished at: Fri Sep 05 18:43:49 GMT+05:30 2008
[INFO] Final Memory: 1M/2M
[INFO] ------------------------------------------------------------------------

Please help me.


Frederic Daoud
Ranch Hand

Joined: May 22, 2008
Posts: 71
Hi Sagar,

Instead of fighting with Maven, you should try setting up the project. It's really not difficult at all, and I think there is value in knowing which files go in which directories. This page explains the setup:

Frederic Daoud
Author, Stripes...and Java Web Development is Fun Again
Stripes book
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

I have never used Maven either, but I downloaded it, executed your command and it worked:

so the command and Maven appear to work fine.

These two messages make me think that you do not have an internet connection or have a proxy that's preventing Maven from downloading a dependency:

I concur with Frederic, when exploring new territory, it's best to concentrate on one thing to minimize frustration. If you can't get Maven to work, chuck it. Struts 2 works fine with Ant (that's what I use).
[ September 05, 2008: Message edited by: Joe Ess ]

[How To Ask Questions On JavaRanch]
Sagar Kale
Ranch Hand

Joined: May 02, 2008
Posts: 188
Hi Frederic & Joe,

Thank you very much for reply. I have internet connection. But I don't know why Maven did not work on my computer. Anyway I decided to give up Maven for time being and go with Ant.

Thanks once again for reply.


I agree. Here's the link:
subject: Learning Struts 2
It's not a secret anymore!