Learning Struts 2
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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 (http://struts.apache.org/2.x/docs/ready-set-go.html).
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=http://people.apache.org/repo/m2-snapshot-repository
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] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[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.
Regards
Sagar
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 (http://struts.apache.org/2.x/docs/ready-set-go.html).
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=http://people.apache.org/repo/m2-snapshot-repository
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] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[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.
Regards
Sagar
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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:
http://struts.apache.org/2.x/docs/simple-setup.html
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:
http://struts.apache.org/2.x/docs/simple-setup.html
Frederic Daoud
Author, Stripes...and Java Web Development is Fun Again
Stripes book
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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 ]
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 ]
Sagar Kale
Ranch Hand
Posts: 188
posted 17 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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.
Regards
Sagar
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.
Regards
Sagar
| I brought this back from the farm where they grow the tiny ads: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |











