maven profile具体项目中的使用
来源:互联网 发布:ipad淘宝网图片打不开 编辑:程序博客网 时间:2024/05/19 19:12
方法一
<profiles> <profile> <id>dev</id> <properties> <deploy.type>dev</deploy.type> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>test</id> <properties> <deploy.type>test</deploy.type> </properties> <activation> <activeByDefault>false</activeByDefault> </activation> </profile> <profile> <id>product</id> <properties> <deploy.type>product</deploy.type> </properties> <activation> <activeByDefault>false</activeByDefault> </activation> </profile></profiles><build> <finalName>portal</finalName> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>test/**</exclude> <exclude>product/**</exclude> <exclude>dev/**</exclude> <exclude>mybatis-generator/**</exclude> </excludes> </resource> <resource> <directory>src/main/resources/${deploy.type}</directory> </resource> </resources> <plugins> <!-- compiler插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.8</source> <target>1.8</target> <showWarnings>true</showWarnings> </configuration> </plugin> </plugins></build>
方法二
<profiles> <profile> <id>devtest</id> <build> <defaultGoal>package</defaultGoal> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>wisea.properties</exclude> <exclude>log4j.xml</exclude> </excludes> </resource> <resource> <directory>src/devtest/resources</directory> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.8</version> <configuration> <target> <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" /> <deploy url="http://192.168.20.208:8090/manager/text" username="tomcatMa" password="tomcatMA13%" path="/nfsj.admin" war="file:${project.build.directory}/${project.build.finalName}.${project.packaging}" update="true" /> </target> </configuration> <dependencies> <dependency> <groupId>org.apache.tomcat</groupId> <artifactId>catalina-ant</artifactId> <version>6.0.45</version> </dependency> </dependencies> </plugin> </plugins> </build> </profile> <profile> <id>production</id> <build> <defaultGoal>package</defaultGoal> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>wisea.properties</exclude> <exclude>log4j.xml</exclude> </excludes> </resource> <resource> <directory>src/production/resources</directory> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <webResources> <resource> <directory>src/production/webapp/</directory> <targetPath>/</targetPath> <includes> <include>static/js/common/wbf-init.js</include> </includes> </resource> <resource> <directory>src/main/webapp/</directory> <targetPath>/</targetPath> <excludes> <exclude>static/js/common/wbf-init.js</exclude> </excludes> </resource> </webResources> </configuration> </plugin> </plugins> </build> </profile></profiles>
阅读全文
0 0
- maven profile具体项目中的使用
- maven中的profile
- 第九节:Maven中的Profile
- MOBX在项目开发中的具体使用
- 使用maven的profile切换项目各环境的参数
- 使用maven的profile切换项目各环境的参数
- Maven Profile的使用
- maven profile的使用
- Maven使用之profile
- maven profile的使用
- maven profile的使用
- maven profile的使用
- maven profile的使用
- maven profile的使用
- maven profile的使用
- maven profile的使用
- maven profile 使用
- maven项目中配置profile
- pillow.Image.open() 对某些jpg文件报OSError
- 七牛云查看音视频资源的元信息-avinfo
- C语言 位域
- Qt 学习之路 2(38):存储容器
- the import javax.servlet.annotation cannot be resolved
- maven profile具体项目中的使用
- H5 touchstart、touchmove、touchend 拖拽
- 当你从一个SVN服务器下载一个完整的项目到另一个服务器时,需要脱离原先的SVN信息控制
- 解释下Servlet的生命周期
- 数据库索引方式
- 常见的异常及分析
- MySql之索引
- 理解RESTful API架构
- MATLAB读写excel中指定sheet行列中的数据