123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- <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">
- <modelVersion>4.0.0</modelVersion>
- <groupId>com.uas.mes</groupId>
- <artifactId>mes</artifactId>
- <packaging>war</packaging>
- <version>1.0.0</version>
- <name>mes system</name>
- <url>http://maven.apache.org</url>
- <properties>
- <static.prefix.skip>true</static.prefix.skip>
- </properties>
- <profiles>
- <profile>
- <id>saas</id>
- <properties>
- <static.prefix.skip>false</static.prefix.skip>
- </properties>
- </profile>
- <profile>
- <id>dev</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- </profile>
- <profile>
- <id>test</id>
- </profile>
- <profile>
- <id>prod</id>
- </profile>
- </profiles>
- <build>
- <finalName>${project.artifactId}</finalName>
- <sourceDirectory>src</sourceDirectory>
- <resources>
- <resource>
- <directory>${basedir}/resources</directory>
- <filtering>true</filtering>
- </resource>
- <resource>
- <directory>${basedir}/src</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/*.properties</include>
- <include>**/*.xml</include>
- </includes>
- </resource>
- </resources>
- <plugins>
- <!-- 获取仓库信息 -->
- <plugin>
- <groupId>pl.project13.maven</groupId>
- <artifactId>git-commit-id-plugin</artifactId>
- <version>2.2.5</version>
- <!--<configuration>-->
- <!--<failOnNoGitDirectory>false</failOnNoGitDirectory>-->
- <!--</configuration>-->
- <executions>
- <execution>
- <goals>
- <goal>revision</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <dateFormat>yyyyMMddHHmmss</dateFormat>
- <!--<failOnNoGitDirectory>false</failOnNoGitDirectory>-->
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.5.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- <encoding>UTF-8</encoding>
- <compilerArgs>
- <arg>-Xlint:unchecked</arg>
- <arg>-Xlint:deprecation</arg>
- <arg>-bootclasspath</arg>
- <arg>${env.JAVA_HOME}/jre/lib/rt.jar</arg>
- <arg>-extdirs</arg>
- <!-- windows下用分号隔开 -->
- <arg>${env.JAVA_HOME}/jre/lib:${basedir}/WebContent/WEB-INF/lib</arg>
- </compilerArgs>
- </configuration>
- </plugin>
- <!-- 静态文件压缩 -->
- <!--<plugin>
- <groupId>com.samaxes.maven</groupId>
- <artifactId>minify-maven-plugin</artifactId>
- <version>1.7.6</version>
- <executions>
- <execution>
- <id>default-minify</id>
- <phase>prepare-package</phase>
- <configuration>
- <charset>UTF-8</charset>
- <skipMerge>true</skipMerge>
- <closureLanguage>ECMASCRIPT6</closureLanguage>
- <nosuffix>true</nosuffix>
- <webappSourceDir>${basedir}/WebContent</webappSourceDir>
- <webappTargetDir>${project.build.directory}/minify</webappTargetDir>
- <cssSourceDir>/</cssSourceDir>
- <cssEngine>YUI</cssEngine>
- <jsSourceDir>/</jsSourceDir>
- <jsEngine>YUI</jsEngine>
- <cssSourceIncludes>
- <cssSourceInclude>resource/css/*.css</cssSourceInclude>
- <cssSourceInclude>**/*.json</cssSourceInclude>
- </cssSourceIncludes>
- <cssSourceExcludes>
- <cssSourceExclude>**/*.min.css</cssSourceExclude>
- <cssSourceExclude>**/*-min.css</cssSourceExclude>
- </cssSourceExcludes>
- <jsSourceIncludes>
- <jsSourceInclude>**/*.js</jsSourceInclude>
- </jsSourceIncludes>
- <jsSourceExcludes>
- <jsSourceExclude>**/*.min.js</jsSourceExclude>
- <jsSourceExclude>**/*-min.js</jsSourceExclude>
- <jsSourceExclude>**/*.debug.js</jsSourceExclude>
- <jsSourceExclude>**/*-debug.js</jsSourceExclude>
- <jsSourceExclude>resource/ext/4.2/packages/**/*.js</jsSourceExclude>
- <jsSourceExclude>resource/ext/4.2/ext-all.js</jsSourceExclude>
- <jsSourceExclude>resource/resource2/ext/ext.js</jsSourceExclude>
- <jsSourceExclude>jsps/Excel/sheet/js/extjs/ext-all.js</jsSourceExclude>
- </jsSourceExcludes>
- </configuration>
- <goals>
- <goal>minify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>-->
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-resources</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/minify</outputDirectory>
- <overwrite>false</overwrite>
- <resources>
- <resource>
- <directory>${basedir}/WebContent</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!-- 改写静态地址、加版本号后缀 -->
- <plugin>
- <groupId>com.uas.plugins</groupId>
- <artifactId>static-maven-plugin</artifactId>
- <version>0.0.3</version>
- <executions>
- <execution>
- <id>default-static</id>
- <phase>prepare-package</phase>
- <configuration>
- <debug>true</debug>
- <webappSourceDir>${project.build.directory}/minify</webappSourceDir>
- <webappTargetDir>${project.build.directory}/statics</webappTargetDir>
- <sourceIncludes>
- <sourceInclude>**/*.jsp</sourceInclude>
- </sourceIncludes>
- <prefixReplace>
- <skip>${static.prefix.skip}</skip>
- <prefix><%=basePath\s*%></prefix>
- <replace>http://saas-static.ubtob.com/</replace>
- <exclude>*.jsp</exclude>
- </prefixReplace>
- <versionSuffix>
- <suffix>?_v=${git.commit.time}</suffix>
- <exclude>*.min.js,*-min.js,*.min.css,*-min.css,*/ext-all.js,*/ext-base.js,*/ext-all.css,*/ext-all-gray.css,*/ext-theme-gray-all.css</exclude>
- </versionSuffix>
- </configuration>
- <goals>
- <goal>static</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.1.1</version>
- <configuration>
- <webXml>${project.build.directory}/minify/WEB-INF/web.xml</webXml>
- <webResources>
- <resource>
- <directory>${project.build.directory}/statics</directory>
- </resource>
- <resource>
- <directory>${project.build.directory}/minify</directory>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- <plugin>
- <groupId>com.uas.plugins</groupId>
- <artifactId>ops-diff-maven-plugin</artifactId>
- <version>0.0.1</version>
- <executions>
- <execution>
- <goals>
- <goal>manifest</goal>
- <goal>diff</goal>
- <goal>deploy</goal>
- </goals>
- <configuration>
- <repository>http://10.10.100.23:23000/v1</repository>
- <sourceDir>src</sourceDir>
- <resourceDir>resources</resourceDir>
- <webappSourceDir>WebContent</webappSourceDir>
- <packagingExcludes>
- <packagingExclude>**/.classpath</packagingExclude>
- <packagingExclude>**/.project</packagingExclude>
- <packagingExclude>**/.settings</packagingExclude>
- <packagingExclude>**/build</packagingExclude>
- <packagingExclude>**/pom.xml</packagingExclude>
- </packagingExcludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <distributionManagement>
- <!-- 发布release仓库 -->
- <repository>
- <id>platform-release</id>
- <name>platform-release</name>
- <url>http://10.10.101.21:8081/artifactory/libs-release-local</url>
- </repository>
- <!-- 发布快照版本 -->
- <snapshotRepository>
- <id>platform-snapshots</id>
- <name>platform-snapshots</name>
- <url>http://10.10.101.21:8081/artifactory/libs-snapshot-local</url>
- </snapshotRepository>
- </distributionManagement>
- </project>
|