Well, A project made of multi modules.

For example, the hongten-security project, the structure of the hongten-security project display as below(In eclipse tool):

and in the windows 7 operating system, the folder structure of the hongten-security project display as below,

then, you have TWO choices to run(or install) this project to you local liberary(repository).

The first one :

  Back to eclipse tool, select the "Package explorer" window, and select the "/hongten-sesurity/pom.xml" to run(or install) this project.

The second:

Back to Window 7 operating system, go to the directory "D:\Development\j2ee\workspace\hongten-sesurity", and open the command window to run(or install) this project.

I will display with the second method, and type the command "mvn install" in the command window.

WOW, there is an ERROR!!!!

The Maven can NOT find the parent.relativePath , it means that the "security-parent" model must install before you run(or install) the "hongten-security" project.

en, you should go to the derictory "D:\Development\j2ee\workspace\hongten-sesurity\security-parent" to install "security-parent" model.

After installing the "security-parent" model, rember to back to parent folder("D:\Development\j2ee\workspace\hongten-sesurity")

and type the command "mvn install"

============================================

Source Code

============================================

/hongten-sesurity/pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <groupId>com.b510.hongten</groupId>
<artifactId>hongten-sesurity</artifactId>
<version>0.0.1</version>
<packaging>pom</packaging> <name>hongten-sesurity</name>
<url>http://maven.apache.org</url> <modules>
<module>security-parent</module>
<module>security-configuration</module>
<module>security-model</module>
<module>security-web</module>
</modules>
</project>

/security-configuration/pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <parent>
<groupId>com.b510.hongten</groupId>
<artifactId>security-parent</artifactId>
<version>0.0.1</version>
</parent> <artifactId>security-configuration</artifactId>
<name>security-configuration</name>
<packaging>jar</packaging> </project>

/security-model/pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <parent>
<groupId>com.b510.hongten</groupId>
<artifactId>security-parent</artifactId>
<version>0.0.1</version>
</parent> <artifactId>security-model</artifactId>
<name>security-model</name>
<packaging>pom</packaging> <modules>
<module>security-model-ai</module>
<module>security-model-xml</module>
</modules>
</project>

/security-model-ai/pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <parent>
<groupId>com.b510.hongten</groupId>
<artifactId>security-model</artifactId>
<version>0.0.1</version>
</parent> <artifactId>security-model-ai</artifactId>
<name>security-model-ai</name>
<packaging>jar</packaging> </project>

/security-model-xml/pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <parent>
<groupId>com.b510.hongten</groupId>
<artifactId>security-model</artifactId>
<version>0.0.1</version>
</parent> <artifactId>security-model-xml</artifactId>
<name>security-model-xml</name>
<packaging>jar</packaging> </project>

/security-parent/pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <!-- security-parent -->
<groupId>com.b510.hongten</groupId>
<artifactId>security-parent</artifactId>
<version>0.0.1</version>
<packaging>pom</packaging> <name>security-parent</name>
<url>http://maven.apache.org</url> <!-- All properties declare here -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>4.10</junit.version>
<hibernate.core.version>3.6.10.Final</hibernate.core.version>
<javassist.version>3.18.1-GA</javassist.version>
<mysql.connector.version>5.1.33</mysql.connector.version>
<log4j.version>1.2.17</log4j.version>
</properties> <dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<!-- Configuration for Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.core.version}</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>${javassist.version}</version>
</dependency>
<!-- Configuration for mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.connector.version}</version>
</dependency>
<!-- Configuration for log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
</dependencies>
</project>

/security-web/pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <parent>
<groupId>com.b510.hongten</groupId>
<artifactId>security-parent</artifactId>
<version>0.0.1</version>
</parent> <artifactId>security-web</artifactId>
<name>security-web</name>
<packaging>jar</packaging> </project>

Source Code Download : http://files.cnblogs.com/hongten/hongten-sesurity.rar

Source Code Download : http://files.cnblogs.com/hongten/hongten-sesurity_with_dependencyManagement.rar

========================================================

More reading,and english is important.

I'm Hongten

大哥哥大姐姐,觉得有用打赏点哦!多多少少没关系,一分也是对我的支持和鼓励。谢谢。
Hongten博客排名在100名以内。粉丝过千。
Hongten出品,必是精品。

E | hongtenzone@foxmail.com  B | http://www.cnblogs.com/hongten

========================================================

Maven with Multi-module的更多相关文章

  1. maven Dynamic Web Module 3.0 requires Java 1.6 or newer

      maven Dynamic Web Module 3.0 requires Java 1.6 or newer CreateTime--2018年4月19日16:56:42 Author:Mary ...

  2. IDEA+Maven+多个Module模块(创建多模块SpringBoot整合项目)

    最近在学习springboot,先从创建项目开始,一般项目都是一个项目下会有多个模块,这里先创建一个最简单的实例,一个项目下有一个springboot模块项目提供web服务,引用另一个java项目(相 ...

  3. [maven] "Dynamic Web Module 3.0 requires Java 1.6 or newer." OR "JAX-RS (REST Web Services) 2.0 requires Java 1.6 or newer."

    在网上下载的开源工程,用maven构建的时候报错: Dynamic Web Module 3.0 requires Java 1.6 or newer. JAX-RS (REST Web Servic ...

  4. Maven Archetype 多 Module 自定义代码脚手架

    大部分公司都会有一个通用的模板项目,帮助你快速创建一个项目.通常,这个项目需要集成一些公司内部的中间件.单元测试.标准的代码格式.通用的代码分层等等. 今天,就利用 Maven 的 Archetype ...

  5. 使用Maven运行测试提示Module sdk 1.5的解决方法

    解决方法: 1. 配置Project Structure 2. 在MAVEN_HOME/conf/setting.xml中添加profile 3. 在Maven项目的pom.xml文件里添加标签 三种 ...

  6. 创建maven parent project & module project

    1.命令方式: 1)Create the top-level root: mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo.arc ...

  7. idea maven 项目 遇到 "Module not specified" 解决方法

    1. 原因:我这边出现的原因是 其他同事在提交代码是 将  这个文件夹也提交了,idea 会加载 .idea 里的配置(即 他的配置),而我的 maven 配置不同,导致出错. 2. 解决方法:删除这 ...

  8. IDEA中导入Maven工程(module)

    导入其它Maven工程时可能会出现依赖代码变红等等可以重新导入 右键pom.xml文件 --->Maven---->Reimport  ,idea强制刷新内容,一般能解决依赖没有识别的问题 ...

  9. 【IDEA使用技巧】(4) —— IDEA 构建Java Maven项目、导入Eclipse项目、多Module Maven项目

    1.IntelliJ IDEA构建Java Maven项目 1.1. IDEA构建Java Maven项目 ①选择Create New Project,选择创建Maven项目,并勾选Create fr ...

  10. Maven Module和Maven Project的区别

    1.maven project和module相当于父子关系.2.当新建的项目中不存在父子关系时使用project.3.当项目中存在父子关系时用project做父工程,module做子工程,module ...

随机推荐

  1. python多线程之Event(事件)

    #!/usr/bin/env python # -*- coding: utf-8 -*- import time from threading import Thread, Event import ...

  2. 查看Linux分区格式

    第一种方法: 使用mount   [root@ol6-121-rac1 ~]# mount /dev/mapper/vg_ol6121rac1-lv_root on / type ext4 (rw) ...

  3. yaf框架使用(centos6.5)

    安装好php环境之后 安装扩展包 $yum install php-devel /usr/bin/ 就会出现phpize工具包 下载yaf-2.2.8.gz源文件,解压后,进入源文件 phpize [ ...

  4. Golang Beego 分析(一)

    关于注解路由,实质上其实是comment route. 作者使用ast自动生成注册代码,实质上感觉是画蛇添足了. 有一定的使用价值,但是在代码管理上反而混乱了.所以本人建议不要使用此项特性.

  5. ARM伪指令,王明学learn

    ARM伪指令 在ARM汇编语言程序中里,有一些特殊指令助记符与指令系统的助记符不同,没有相对应的操作码,通常称这些特殊指令助记符为伪指令,他们所完成的操作称为伪操作.伪指令在元程序中的作用是为完成汇编 ...

  6. loj 1099(最短路)

    题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=25956 思路:dist[v][0]代表走到点v的最短路,dist[ ...

  7. Arduino101学习笔记(十)—— 串口通信

    //打开串口 Serial.begin(); //获取串口上可读取的数据的字节数.该数据是指已经到达并存储在接收缓存(共有64字节)中 Serial.available(); //读串口数据,串口上第 ...

  8. 智能车学习(十)——MMA8451加速度计的使用

    一.驱动说明: 就是使用I2C的通信方式驱动这款加速度计就行了,代码的话选择使用51单片机的代码进行移植. 二.代码分享: 1.头文件: #ifndef MMA8451_H #define MMA84 ...

  9. Quartz.NET配置

    概述 Quartz.NET 在开源任务调度框架中的翘首,它提供了强大任务调度机制,难能可贵的是它同时保持了使用的简单性.Quartz 允许开发人员灵活地定义触发器的调度时间表,并可以对触发器和任务进行 ...

  10. Android开发之ViewPager+ActionBar+Fragment实现响应式可滑动Tab

     今天我们要实现的这个效果呢,在Android的应用中十分地常见,我们可以看到下面两张图,无论是系统内置的联系人应用,还是AnyView的阅读器应用,我们总能找到这样的影子,当我们滑动屏幕时,Tab可 ...