问题
I'm trying to follow the Spring Roo tutorial at:
http://static.springsource.org/spring-roo/reference/html/beginning.html
I was able to create entities and pass integration tests.
But, when I move on to create controllers, the following command fails:
roo> web mvc setup
Created ROOT/src/main/webapp/WEB-INF/spring
Created ROOT/src/main/webapp/WEB-INF/spring/webmvc-config.xml
Undo create ROOT/src/main/webapp/WEB-INF/spring/webmvc-config.xml
Undo create ROOT/src/main/webapp/WEB-INF/spring
display name required
When I move on to the next Roo step, I get the following:
roo> web mvc all --package ~.web
Command 'web mvc all --package ~.web' was found but is not currently available (type 'help' then ENTER to learn about this command)
Any ideas on how to fix these problems? Thank you.
回答1:
You can see on pom.xml in tag (around line 8) must defined its name. e.g
package com.linux.gg
Tags name (line 8) should be
3 <modelVersion>4.0.0</modelVersion>
4 <groupId>com.linux.gg</groupId>
5 <artifactId>gg</artifactId>
6 <packaging>gg</packaging>
7 <version>0.1.0.BUILD-SNAPSHOT</version>
8 <name>gg</name>
If you delete gg on line 8. It will has a error.
display name required
If this solution cann't to solves your problem. You can find some tag which missing value (e.g. name, display) and assign a name of last package directory to them. (as gg)
You can see some information about your problem from this.
http://git.springsource.org/roo/roo/commit/c6d1759768d828b67c86da0350079b22135a764f.html
来源:https://stackoverflow.com/questions/9552925/spring-roo-web-mvc-setup-fails-with-display-name-required