开发者

How to create maven module for Spring Roo project?

开发者 https://www.devze.com 2023-03-19 20:16 出处:网络
I have Spring Roo project. It is maven project. So I would like to use maven modules to make my growing project modular.

I have Spring Roo project. It is maven project. So I would like to use maven modules to make my growing project modular. However when I try to create module project( with m2eclipse right-click project, then Maven -> New Maven Module Project). It is created OK, it get's all maven dependencies/libraries from parent project.

But: 1) I cannot use classes from parent project (even though "Resol开发者_JS百科ve dependencies from Workspace projects" is checked)

2) I cannot use Roo shell. I can run shell, but cannot add entity. And I can't add persistence.

roo> persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
additionalBuildcommands element of the maven-eclipse-plugin required


But: 1) I cannot use classes from parent project (even though "Resolve dependencies from Workspace projects" is checked)

That's right. parent projects of multi-module projects must have packaging pom, which means that no classes will be compiled. A parent project should be a wrapper for multiple child projects, nothing more.


Try updating the project configuration.


As of August 2011 it is impossible. I only managed to move domain class with roo dependencies into separate maven project. Then I can add it as dependency.

Create maven modules is expected in Spring Roo >= 1.2.M2

0

精彩评论

暂无评论...
验证码 换一张
取 消