模块继承方式
xxx-aggregator-->父工程 ,同时承担聚合模块和父模块的作用,没有实际代码和资源文件
<?xml version="1.0" encoding="UTF-8"?>
<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">
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<struts2.springPlatformVersion>3.0.5.RELEASE</struts2.springPlatformVersion>
</properties>
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxx.xxx</groupId>
<artifactId>xxx-aggregator</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>xxx-aggregator</name>
<url>http://maven.apache.org</url>
<!-- 开发者 -->
<developers>
<developer>
<id>juforg</id>
<name>S J</name>
<roles>
<role>dev</role>
</roles>
<timezone>+8</timezone>
</developer>
</developers>
<!-- 待聚合模块 -->
<modules>
<module>../xxx-common</module>
<module>../xxx-web</module>
</modules>
<!-- 配置部署的远程仓库
<distributionManagement>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>nexus distribution snapshot repository</name>
<url>http://10.78.68.122:9090/nexus-2.1.1/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement> -->
<!-- 有的人会报错,找不到tools.jar -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${env.JAVA_HOME}/lib/tools.jar</systemPath>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<!-- 使用maven的编译插件 使maven能够编译1.5以上 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
xxx-common-->基础工程 , 公共的代码
<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">
<parent>
<groupId>com.xxx.xxx</groupId>
<artifactId>xxx-aggregator</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../xxx-aggregator</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>xxx-common</artifactId>
<packaging>jar</packaging>
<name>xxx-common</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<struts2.springPlatformVersion>3.1.1.RELEASE</struts2.springPlatformVersion>
</properties>
<dependencies>
</dependencies>
</project>
xxx-web-->web工程 放置里公共的配置文件,比如struts.xml、ssoconfig.properties等,起到聚合的作用, 即把所有的web项目,打成最终的war包
<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/maven-v4_0_0.xsd">
<parent>
<groupId>com.jiguancheng.humabot</groupId>
<artifactId>xxx-aggregator</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../xxx-aggregator</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>xxx-web</artifactId>
<!--打包的机制,如pom, jar, maven-plugin, ejb, war, ear, rar, par-->
<packaging>war</packaging>
<!-- 项目除了artifactId外,可以定义别名 -->
<name>xxx-web</name>
<url>http://maven.apache.org</url>
<!-- 开发者 -->
<developers>
<developer>
<id>juforg</id>
<name>S J</name>
<roles>
<role>dev</role>
</roles>
<timezone>+8</timezone>
</developer>
</developers>
<properties>
<currentVersion>${project.version}</currentVersion>
<struts2.version>2.3.4.1</struts2.version>
<struts2.springPlatformVersion>3.1.1.RELEASE</struts2.springPlatformVersion>
<ognl.version>3.0.5</ognl.version>
<asm.version>3.3</asm.version>
<tiles.version>2.2.2</tiles.version>
<java.home>C:\glassfish3\jdk</java.home>
<tomcat.home>D:\tomcat\apache-tomcat-6.0.35</tomcat.home>
</properties>
<!--设置仓库
<repositories>
<repository></repository>
</repositories>-->
<!-- 项目的问题管理系统
<issueManagement>
<system>jira</system>
<url>http://111.com</url>
</issueManagement>-->
<!-- 依赖 -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts2.version}</version>
<exclusions>
<exclusion>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
</dependencies>
<build>
<finalName>xxx-online</finalName>
<defaultGoal>compile</defaultGoal>
<plugins>
<plugin>
<!-- 不加此插件会报:war files include a WEB-INF/web.xml which will be ignored -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<!-- http://maven.apache.org/plugins/maven-war-plugin/ -->
<packagingExcludes>WEB-INF/web.xml</packagingExcludes>
</configuration>
</plugin>
<!-- 自动化部署插件 Cargo,部署至tomcat7 -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.2.3</version>
<configuration>
<container>
<containerId>tomcat6x</containerId>
<home>${tomcat.home}</home>
</container>
<configuration>
<type>existing</type>
<home>${tomcat.home}</home>
<properties>
<cargo.jvmargs>
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787
</cargo.jvmargs>
</properties>
</configuration>
</configuration>
<executions>
<execution>
<id>cargo-run</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 部署到jetty -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.5.v20120716</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webAppConfig>
<!-- 从jetty的jar中拷贝出webdefault.xml 修改其中的参数 ,可以修改html,js -->
<defaultsDescriptor>src/main/resources/jetty.xml</defaultsDescriptor>
<contextPath>/${project.build.finalName}</contextPath>
</webAppConfig>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
<reload>manual</reload>
<properties>
<cargo.jvmargs>
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787
</cargo.jvmargs>
</properties>
</configuration>
</plugin>
</plugins>
</build>
</project>
其他工程
相关推荐
Jenkinsfile调用jdk命令和maven或grandle编译命令工具配置
此版本是基于jdk1.8进行编译。可在相应的环境下运行。 opencv4.8.0人脸识别的类库,在windows 10 下 vs2022的cmaker编译。原生的opencv4.8.0是基于jdk11编译的。此版本是基于jdk1.8进行编译。可在相应的环境下运行。...
maven是个项目管理工具,如果我们不告诉它我们的代码要使用什么样的jdk版本编译的话,它就会用maven-compiler-plugin默认的jdk版本来进行处理,这样就容易出现版本不匹配,以至于可能导致编译不通过的问题。...
两版mybatis,根据jdk版本选择使用哪一版,mybatis版本:3.5.6(jdk1.8(含)及以上)、3.4.6(jdk1.8以下)
一个Maven插件,用于处理jdk8及更高版本的编译时注释。 该插件有助于从Maven使用JDK8提供的集成在Java编译器中的新注释处理 该插件是Maven apt插件的“ alter ego” 文献资料 相关插件 插入 信息 Jboss的eclipse...
Linux环境下maven编译好的RocketMQ最新版本4.3.0;centos_64+maven-3.2.5+jdk-1.8
1、在eclipse根目录新建两个文件夹:myplugins、links。 2、解压下载到的文件,得到maven文件。 3、将maven文件拷贝到刚才新建的myplugins中 4、在links中新建maven...C:/Program Files/Java/jdk1.7.0_17/bin/javaw.exe
maven nexus 仓库 私服 jdk 1.6 编译,企业级私服的首选
将maven工程部署到Linux系统(包括jdk,MySQL,Oracle,Redis,mq等软件在Linux上的安装)
Scala Maven 插件 scala-maven-plugin (以前是 maven-scala-plugin)用于在 Maven 中编译/测试/运行/记录 Scala 代码。类似插件 建造目前,您需要 Maven 3.x 和 JDK 8 来构建插件、创建站点并运行integration-test ...
使用 Pentaho Kettle 9.1 源码编译的kettle,可直接运行,kettle9.1编译后2020年6月份最新版本分3卷,实际上自己下载打包也很简单就是费时间,太大了,【图省事的就下载我这个编译后的】,很多人用maven下载出错,...
Maven是一个基于 Java 的项目管理工具,因此最基本的要求是在计算机上安装 JDK。 Maven 对系统要求如下表: JDK JDK 7.0 及以上。 内存 没有最低要求。 磁盘空间 Maven 安装本身大约需要 10MB。除此之外,其他磁盘...
需要注意的是,安装Maven的机器上,需要JDK环境,并且JAVA_HOME环境变量的配置无误。 输入mvn –v命令,若显示如下的版本信息,说明已经OK了。 Apache Maven 3.0.3 (r1075438; 2011-03-01 01:31:09+0800) Maven ...
这是我自己编译整理的,现在分享给大家,包含编译好的hadoop2.8.3、编译教程、jdk、下载好的maven仓库、编译使用的所有安装包和编译注意问题。 希望对大家有所帮助,ps:上传文件居然还有限制,每次只能120m,坑爹啊...
这是我自己编译整理的,现在分享给大家,包含编译好的hadoop2.8.3、编译教程、jdk、下载好的maven仓库、编译使用的所有安装包和编译注意问题。 希望对大家有所帮助,ps:上传文件居然还有限制,每次只能120m,坑爹啊...
1.在安装maven之前,先确保已经安装JDK1.6及以上版本,并且配置好环境变量。 2.下载maven3,最新版本是Maven3.0.4 ,下载地址:http://maven.apache.org/download.html 下载apache-maven-3.0.4-bin.zip文件后,并...
这是我自己编译整理的,现在分享给大家,包含编译好的hadoop2.8.3、编译教程、jdk、下载好的maven仓库、编译使用的所有安装包和编译注意问题。 希望对大家有所帮助,ps:上传文件居然还有限制,每次只能120m,坑爹啊...
一、环境:java EE IDE 、JDK1.8、maven 3.0.5 1、什么是Maven? Maven是一个项目管理工具,主要用于项目构建,依赖管理,项目信息管理。 2.下载及安装 下载最新版 Maven:apache-maven-3.2.1-bin.zip。官网下载...
-- 配置一下JDK的版本 --> <groupId>org.apache.maven.plugins <artifactId>maven-compiler-plugin <!-- <version>3.6.1</version> --> <source>1.7 <target>1.7 <encoding>UTF...