This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Created c:/myproject/pom.xml
Created SRC_MAIN_JAVA
Created SRC_MAIN_RESOURCES
Created SRC_TEST_JAVA
Created SRC_TEST_RESOURCES
Created SRC_MAIN_WEBAPP
Created SRC_MAIN_RESOURCES/applicationContext.xml

---------------------------------------------------
The following is not created as stated in the blog

Created SRC_MAIN_WEBAPP/WEB-INF
Created SRC_MAIN_WEBAPP/WEB-INF/myproject-servlet.xml
Created SRC_MAIN_WEBAPP/WEB-INF/web.xml
Created SRC_MAIN_WEBAPP/WEB-INF/jsp
Created SRC_MAIN_WEBAPP/WEB-INF/jsp/index.jsp
Created SRC_MAIN_WEBAPP/WEB-INF/urlrewrite.xml

We have made some changes to the 'create project' command as of the Roo M2 release. The blog post uses Roo M1 and therefore exhibits the behavior before the change was made.

Basically, the create project command will now just create a bare-bones Spring application (no Spring MVC, or persistence) artifacts. This is because some applications will not need a Web layer at all. This change is documented in the ROO-26 jira ticket.

Essentially, Roo will emit all web related artifacts the first time you issue the 'new controller' command which implies that you actually want a Web layer in your application.

So there is no error or problem. Only the creation of the Web artifacts in your application is now delayed until you tell Roo to create Web-specific artifacts such as MVC controllers.

Comment

We have made some changes to the 'create project' command as of the Roo M2 release. The blog post uses Roo M1 and therefore exhibits the behavior before the change was made.

Basically, the create project command will now just create a bare-bones Spring application (no Spring MVC, or persistence) artifacts. This is because some applications will not need a Web layer at all. This change is documented in the ROO-26 jira ticket.

Essentially, Roo will emit all web related artifacts the first time you issue the 'new controller' command which implies that you actually want a Web layer in your application.

So there is no error or problem. Only the creation of the Web artifacts in your application is now delayed until you tell Roo to create Web-specific artifacts such as MVC controllers.

Regards,
Stefan

I realise this is only M2, but when docs and code are out of sync, it *is* a problem.

For anyone else who was on the verge of giving up on Roo when the very first command failed to reproduce the documented behaviour, you need to do

new controller [...]

to create the MVC controller that Stefan refers to above, for example:

As you know, Spring Roo is currently in milestone release (pre 1.0) and therefore things like this can change. This specific change of behavior was actually requested by a Roo user through a Jira enhancement request and we thought it makes sense to handle Web artifact creation only when the user actually indicates that he wants a Web-based project.

The sample scripts we deliver actually provide a good starting point for you to learn about functionalities provided by roo. So for example if you would run the clinic.roo script and take a look at the messages it displays while running the script you would have noticed that the web artifacts are now generated as soon as the first controller (a web artifact) command is issued.

But I take your point, Roo is missing a proper manual where these things are documented. This is currently work in progress and if you take a look into the Roo trunk you will notice that we now have docbook integration available and the work on the documentation is starting very soon.

Comment

Stefan, I understand the motivation for the change, but I don't think it makes sense to "break" it for everyone just to fix it for one user.

Nobody expects a manual just yet (a few pointers and runnable code is just fine), but it would be great if that the limited docs that are currently available could be kept in sync with the implementation.

Besides good reason for the change (as described before), it actually did break applications the way we initially implemented it (see http://jira.springframework.org/browse/ROO-26). The change does not break anything now as far as I can see. So when you say it now 'breaks' for everyone I am a little lost. Can you elaborate?

As for the documentation, you should be able to see the first few chapters appear during the next week.

Comment

Nobody expects a manual just yet (a few pointers and runnable code is just fine), but it would be great if that the limited docs that are currently available could be kept in sync with the implementation.