开发者

Maven Multi module Spring MVC App

I am trying to create an web application with spring mvc 3, jpa. In that I have different modules like core, user, account, cms, eCommerce

here account depends on core, user depends on account, cms module depends on user, eCommerce depends on user. I want to make this modules run independent (eCommerce or cms or both)

To make that I created separate web projects for core, account, user, cms, eCommerce, w开发者_C百科hile coding everthing works fine, but when I try to run it using jetty:run it says

[WARNING] The POM for com.xxx:account:pom:0.0.1-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for com.xxx:core:pom:0.0.1-SNAPSHOT is missing, no dependency information available

I created dependency like this

        <dependency>
            <groupId>com.xxx</groupId>
            <artifactId>account</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <type>pom</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.xxx</groupId>
            <artifactId>core</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <type>pom</type>
            <scope>compile</scope>
        </dependency>

I am new to maven, can anybody help me whether to use module or dependency in this case? If module how to use that?


I don't understand your "use module or dependency" question. "Module" means a maven project that produces an artifact. "Dependency" means an artifact that a maven project depends on. As for the warnings, try doing a mvn install of the relevant artifacts before running jetty.


I would guess the POM.xml for each individual module is missing and thus Maven is unable to resolve transitive dependencies for each of the module.Here is a good read for multi-module projects in maven. http://www.sonatype.com/books/mvnex-book/reference/multimodule.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜