<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>org.hdkg</groupId> <artifactId>AirServer4.0</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>AirServer4.0</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <spring.version>4.3.9.RELEASE</spring.version> <ibm.mq.version>7.5.0.1</ibm.mq.version> <local.jar.path>D:/workspaces_airlines/AirServer3.0/libs</local.jar.path> </properties> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <!-- <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency>--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.2.3</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.2.3</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-access</artifactId> <version>1.2.3</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.5</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.6.6</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.38</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</artifactId> <version>2.4</version> <classifier>jdk15</classifier> </dependency> <dependency> <groupId>dom4j</groupId> <artifactId>dom4j</artifactId> <version>1.6.1</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>3.6</version> </dependency> <dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> <version>1.8.0</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.1</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>net.sf.ezmorph</groupId> <artifactId>ezmorph</artifactId> <version>1.0.6</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.1.5</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>log4j-over-slf4j</artifactId> <version>1.7.25</version> </dependency> <dependency> <groupId>com.rti</groupId> <artifactId>connextmsg</artifactId> <version>1.0</version> <!--<scope>system</scope>--> <!--<systemPath>${local.jar.path}/rticonnextmsg.jar</systemPath>--> </dependency> <dependency> <groupId>com.rti</groupId> <artifactId>connextmsgd</artifactId> <version>1.0</version> <!--<scope>system</scope>--> <!--<systemPath>${local.jar.path}/rticonnextmsgd.jar</systemPath>--> </dependency> <dependency> <groupId>com.rti</groupId> <artifactId>rsadapter</artifactId> <version>1.0</version> <!--<scope>system</scope>--> <!--<systemPath>${local.jar.path}/rtirsadapter.jar</systemPath>--> </dependency> <dependency> <groupId>com.rti</groupId> <artifactId>nddsjava</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>cn.atc</groupId> <artifactId>atc_dds</artifactId> <version>1.0</version> <!--<scope>system</scope>--> <!--<systemPath>${local.jar.path}/atc_dds.jar</systemPath>--> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.5</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> <version>2.4.3</version> </dependency> <!-- ibm mq --> <dependency> <groupId>com.ibm.mq</groupId> <artifactId>jmqi</artifactId> <version>${ibm.mq.version}</version> </dependency> <dependency> <groupId>com.ibm.mq</groupId> <artifactId>headers</artifactId> <version>${ibm.mq.version}</version> </dependency> <dependency> <groupId>com.ibm</groupId> <artifactId>mq</artifactId> <version>${ibm.mq.version}</version> </dependency> <dependency> <groupId>com.ibm.mq</groupId> <artifactId>jms</artifactId> <version>${ibm.mq.version}</version> </dependency> <dependency> <groupId>com.ibm.mq</groupId> <artifactId>dhbcore</artifactId> <version>${ibm.mq.version}</version> </dependency> <dependency> <groupId>com.ibm</groupId> <artifactId>mqjms</artifactId> <version>${ibm.mq.version}</version> </dependency> <!-- <dependency> <groupId>com.ibm.mq</groupId> <artifactId>connector</artifactId> <version>${ibm.mq.version}</version> </dependency>--> <dependency> <groupId>javax.resource</groupId> <artifactId>connector</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>javax.transaction</groupId> <artifactId>jta</artifactId> <version>1.1</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.3.1</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>4.2.0.Final</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-tools</artifactId> <version>3.2.4.GA</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.8.10</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> <encoding>utf-8</encoding> <!-- <compilerArgs> <arg>-extdirs</arg> <arg>${project.basedir}/src/lib</arg> </compilerArgs>--> <!-- 指定本地包一起编译,这里指定本地包目录地址,不用具体指定那个包,到目录即可 --> <!--<compilerArguments>--> <!--<extdirs>${local.jar.path}/</extdirs>--> <!--</compilerArguments>--> <compilerArgument>-Xlint:unchecked</compilerArgument> </configuration> </plugin> <plugin> <artifactId>maven-jar-plugin</artifactId> <version>2.6</version> <configuration> <archive> <addMavenDescriptor>false</addMavenDescriptor> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>libs/</classpathPrefix> <mainClass>main.AirServer</mainClass> </manifest> <manifestEntries> <Class-Path>.</Class-Path> </manifestEntries> </archive> <outputDirectory>${project.build.directory}/AirServer4.0/</outputDirectory> <excludes> <!--注意这玩意从编译结果目录开始算目录结构--> <exclude>*.properties</exclude> <exclude>*.xml</exclude> <exclude>/mybatis/*</exclude> <exclude>/database/*</exclude> </excludes> </configuration> </plugin> <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-dependencies</id> <phase>prepare-package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <!-- ${project.build.directory}为Maven内置变量,缺省为target --> <outputDirectory>${project.build.directory}/AirServer4.0/libs</outputDirectory> <!-- 表示是否不包含间接依赖的包 --> <excludeTransitive>false</excludeTransitive> <!-- 表示复制的jar文件去掉版本信息 --> <stripVersion>false</stripVersion> </configuration> </execution> </executions> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <executions> <execution> <id>copy-resources</id> <phase>prepare-package</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${basedir}/target/AirServer4.0</outputDirectory> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin> <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-dependencies</id> <phase>prepare-package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory> <!– 表示是否不包含间接依赖的包 –> <excludeTransitive>false</excludeTransitive> <includeScope>compile</includeScope> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <!– 生成的jar中,不要包含pom.xml和pom.properties这两个文件 –> <addMavenDescriptor>false</addMavenDescriptor> <manifest> <addClasspath>true</addClasspath> <mainClass>AirServer</mainClass> <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> </manifest> </archive> </configuration> </plugin>--> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>wagon-maven-plugin</artifactId> <version>1.0</version> <dependencies> <dependency> <groupId>com.jcraft</groupId> <artifactId>jsch</artifactId> <version>0.1.54</version> </dependency> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk16</artifactId> <version>1.46</version> </dependency> </dependencies> <executions> <execution> <id>upload-exec</id> <phase>package</phase> <goals> <goal>upload</goal> <goal>sshexec</goal> </goals> <configuration> <!-- 上传单个文件的时候用 maven命令 :mvn clean package wagon:upload-single --> <!--<fromFile>target/AirServer4.0/</fromFile>--> <!-- 上传目录文件到服务器端 maven 命令:mvn clean package wagon:upload --> <fromDir>target/AirServer4.0/</fromDir> <toDir>home/hdkg/AirServer4.0</toDir> <url>scp://hdkg:hdkg2007@100.100.100.72</url> <!-- mvn clean package wagon:upload-single wagon:sshexec --> <commands> <command>cd /home/hdkg/</command> <command>source .bash_profile</command> <command>cd /home/hdkg/AirServer4.0/</command> <command>nohup java -jar /home/hdkg/AirServer4.0/AirServer4.0-1.0-SNAPSHOT.jar</command> </commands> <!-- 显示运行命令的输出结果 --> <displayCommandOutputs>true</displayCommandOutputs> </configuration> </execution> </executions> </plugin> </plugins> <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ssh</artifactId> <version>2.8</version> </extension> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ssh-external</artifactId> <version>2.8</version> </extension> </extensions> </build> </project>
Maven 打包 上传 运行
最新推荐文章于 2024-01-03 15:22:28 发布