新增assembly打包脚本、ant远程部署脚本、微信服务启动脚本
This commit is contained in:
parent
4cd8f61e5c
commit
d005205627
61
assembly.xml
61
assembly.xml
@ -1,31 +1,32 @@
|
|||||||
<assembly
|
<!-- base包合并形成weixin4j-xx-full.jar -->
|
||||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
<assembly
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<id>full</id>
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||||
<formats>
|
<id>full</id>
|
||||||
<format>jar</format>
|
<formats>
|
||||||
</formats>
|
<format>jar</format>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
</formats>
|
||||||
<fileSets>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
<fileSet>
|
<fileSets>
|
||||||
<directory>target/classes</directory>
|
<fileSet>
|
||||||
<outputDirectory>/</outputDirectory>
|
<directory>target/classes</directory>
|
||||||
<includes>
|
<outputDirectory>/</outputDirectory>
|
||||||
<include>/**</include>
|
<includes>
|
||||||
</includes>
|
<include>/**</include>
|
||||||
<excludes>
|
</includes>
|
||||||
<exclude>*.properties</exclude>
|
<excludes>
|
||||||
<exclude>*.xml</exclude>
|
<exclude>*.properties</exclude>
|
||||||
</excludes>
|
<exclude>*.xml</exclude>
|
||||||
</fileSet>
|
</excludes>
|
||||||
</fileSets>
|
</fileSet>
|
||||||
<dependencySets>
|
</fileSets>
|
||||||
<dependencySet>
|
<dependencySets>
|
||||||
<unpack>true</unpack>
|
<dependencySet>
|
||||||
<includes>
|
<unpack>true</unpack>
|
||||||
<include>com.foxinmy:weixin4j-base</include>
|
<includes>
|
||||||
</includes>
|
<include>com.foxinmy:weixin4j-base</include>
|
||||||
</dependencySet>
|
</includes>
|
||||||
</dependencySets>
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
</assembly>
|
</assembly>
|
||||||
518
pom.xml
518
pom.xml
@ -1,260 +1,260 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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"
|
<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">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.foxinmy</groupId>
|
<groupId>com.foxinmy</groupId>
|
||||||
<artifactId>weixin4j</artifactId>
|
<artifactId>weixin4j</artifactId>
|
||||||
<version>1.6.8</version>
|
<version>1.6.8</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>weixin4j</name>
|
<name>weixin4j</name>
|
||||||
<url>https://github.com/foxinmy/weixin4j</url>
|
<url>https://github.com/foxinmy/weixin4j</url>
|
||||||
<description>微信开发工具包</description>
|
<description>微信开发工具包</description>
|
||||||
<inceptionYear>2014</inceptionYear>
|
<inceptionYear>2014</inceptionYear>
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
<name>Apache License, Version 2.0</name>
|
<name>Apache License, Version 2.0</name>
|
||||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||||
<distribution>repo</distribution>
|
<distribution>repo</distribution>
|
||||||
<comments>A business-friendly OSS license</comments>
|
<comments>A business-friendly OSS license</comments>
|
||||||
</license>
|
</license>
|
||||||
</licenses>
|
</licenses>
|
||||||
<scm>
|
<scm>
|
||||||
<url>https://github.com/foxinmy/weixin4j</url>
|
<url>https://github.com/foxinmy/weixin4j</url>
|
||||||
<connection>scm:git:git://github.com/foxinmy/weixin4j.git</connection>
|
<connection>scm:git:git://github.com/foxinmy/weixin4j.git</connection>
|
||||||
<developerConnection>scm:git:git@github.com:foxinmy/weixin4j.git</developerConnection>
|
<developerConnection>scm:git:git@github.com:foxinmy/weixin4j.git</developerConnection>
|
||||||
<tag>HEAD</tag>
|
<tag>HEAD</tag>
|
||||||
</scm>
|
</scm>
|
||||||
<issueManagement>
|
<issueManagement>
|
||||||
<url>https://github.com/foxinmy/weixin4j/issues</url>
|
<url>https://github.com/foxinmy/weixin4j/issues</url>
|
||||||
</issueManagement>
|
</issueManagement>
|
||||||
<developers>
|
<developers>
|
||||||
<developer>
|
<developer>
|
||||||
<email>hujinyuhao@163.com</email>
|
<email>hujinyuhao@163.com</email>
|
||||||
<id>jinyu</id>
|
<id>jinyu</id>
|
||||||
<name>jinyu</name>
|
<name>jinyu</name>
|
||||||
<url>https://github.com/foxinmy</url>
|
<url>https://github.com/foxinmy</url>
|
||||||
<timezone>+8</timezone>
|
<timezone>+8</timezone>
|
||||||
<roles>
|
<roles>
|
||||||
<role>java developer</role>
|
<role>java developer</role>
|
||||||
</roles>
|
</roles>
|
||||||
</developer>
|
</developer>
|
||||||
</developers>
|
</developers>
|
||||||
<modules>
|
<modules>
|
||||||
<module>weixin4j-base</module>
|
<module>weixin4j-base</module>
|
||||||
<module>weixin4j-mp</module>
|
<module>weixin4j-mp</module>
|
||||||
<module>weixin4j-qy</module>
|
<module>weixin4j-qy</module>
|
||||||
<module>weixin4j-server</module>
|
<module>weixin4j-server</module>
|
||||||
<module>weixin4j-example</module>
|
<module>weixin4j-example</module>
|
||||||
</modules>
|
</modules>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.source>1.6</maven.compiler.source>
|
<maven.compiler.source>1.6</maven.compiler.source>
|
||||||
<maven.compiler.target>1.6</maven.compiler.target>
|
<maven.compiler.target>1.6</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.0</version>
|
<version>3.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.6</source>
|
<source>1.6</source>
|
||||||
<target>1.6</target>
|
<target>1.6</target>
|
||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<version>2.6</version>
|
<version>2.6</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
<!-- 过滤证书文件 -->
|
<!-- 过滤证书文件 -->
|
||||||
<nonFilteredFileExtensions>
|
<nonFilteredFileExtensions>
|
||||||
<nonFilteredFileExtension>pem</nonFilteredFileExtension>
|
<nonFilteredFileExtension>pem</nonFilteredFileExtension>
|
||||||
<nonFilteredFileExtension>pfx</nonFilteredFileExtension>
|
<nonFilteredFileExtension>pfx</nonFilteredFileExtension>
|
||||||
<nonFilteredFileExtension>p12</nonFilteredFileExtension>
|
<nonFilteredFileExtension>p12</nonFilteredFileExtension>
|
||||||
<nonFilteredFileExtension>jks</nonFilteredFileExtension>
|
<nonFilteredFileExtension>jks</nonFilteredFileExtension>
|
||||||
</nonFilteredFileExtensions>
|
</nonFilteredFileExtensions>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>2.5</version>
|
<version>2.5</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>default-jar</id>
|
<id>default-jar</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>jar</goal>
|
<goal>jar</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<classesDirectory>target/classes</classesDirectory>
|
<classesDirectory>target/classes</classesDirectory>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>*.properties</exclude>
|
<exclude>*.properties</exclude>
|
||||||
<exclude>*.xml</exclude>
|
<exclude>*.xml</exclude>
|
||||||
<exclude>*.txt</exclude>
|
<exclude>*.txt</exclude>
|
||||||
<exclude>**/*.md</exclude>
|
<exclude>**/*.md</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
<archive>
|
<archive>
|
||||||
<addMavenDescriptor>true</addMavenDescriptor>
|
<addMavenDescriptor>true</addMavenDescriptor>
|
||||||
</archive>
|
</archive>
|
||||||
<useDefaultManifestFile>true</useDefaultManifestFile>
|
<useDefaultManifestFile>true</useDefaultManifestFile>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
<version>2.4</version>
|
<version>2.4</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-sources</id>
|
<id>attach-sources</id>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>jar-no-fork</goal>
|
<goal>jar-no-fork</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>*.properties</exclude>
|
<exclude>*.properties</exclude>
|
||||||
<exclude>*.xml</exclude>
|
<exclude>*.xml</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.10.1</version>
|
<version>2.10.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-javadocs</id>
|
<id>attach-javadocs</id>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>jar</goal>
|
<goal>jar</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<show>public</show>
|
<show>public</show>
|
||||||
<charset>${project.build.sourceEncoding}</charset>
|
<charset>${project.build.sourceEncoding}</charset>
|
||||||
<encoding>${project.build.sourceEncoding}</encoding>
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
<docencoding>${project.build.sourceEncoding}</docencoding>
|
<docencoding>${project.build.sourceEncoding}</docencoding>
|
||||||
<links>
|
<links>
|
||||||
<link>http://docs.oracle.com/javase/7/docs/api</link>
|
<link>http://docs.oracle.com/javase/7/docs/api</link>
|
||||||
</links>
|
</links>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
<version>2.8.2</version>
|
<version>2.8.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
<version>1.5</version>
|
<version>1.5</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>verify</phase>
|
<phase>verify</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>sign</goal>
|
<goal>sign</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.18</version>
|
<version>2.18</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skipTests>true</skipTests>
|
<skipTests>true</skipTests>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<version>2.5.1</version>
|
<version>2.5.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<descriptors>
|
<descriptors>
|
||||||
<descriptor>../assembly.xml</descriptor>
|
<descriptor>../assembly.xml</descriptor>
|
||||||
</descriptors>
|
</descriptors>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>make-assembly</id>
|
<id>make-assembly</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>single</goal>
|
<goal>single</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/java</directory>
|
<directory>src/main/java</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*.xml</include>
|
<include>**/*.xml</include>
|
||||||
<include>**/*.properties</include>
|
<include>**/*.properties</include>
|
||||||
<include>**/*.pem</include>
|
<include>**/*.pem</include>
|
||||||
<include>**/*.p12</include>
|
<include>**/*.p12</include>
|
||||||
<include>**/*.pfx</include>
|
<include>**/*.pfx</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>*.xml</include>
|
<include>**/*.xml</include>
|
||||||
<include>*.properties</include>
|
<include>**/*.properties</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
</build>
|
</build>
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>release</id>
|
<id>release</id>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.8.2</version>
|
<version>4.8.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<snapshotRepository>
|
<snapshotRepository>
|
||||||
<id>oss-snapshot</id>
|
<id>oss-snapshot</id>
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||||
</snapshotRepository>
|
</snapshotRepository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>oss-release</id>
|
<id>oss-release</id>
|
||||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||||
</repository>
|
</repository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
</project>
|
</project>
|
||||||
35
script/assembly.xml
Normal file
35
script/assembly.xml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<!-- zip可执行包 -->
|
||||||
|
<assembly
|
||||||
|
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||||
|
<id>bin</id>
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<useProjectArtifact>true</useProjectArtifact>
|
||||||
|
<outputDirectory>/lib</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>src/main/script</directory>
|
||||||
|
<outputDirectory>/</outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>*.sh</include>
|
||||||
|
<include>*.bat</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>target/classes</directory>
|
||||||
|
<includes>
|
||||||
|
<include>*.txt</include>
|
||||||
|
<include>*.properties</include>
|
||||||
|
<include>*.xml</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>/conf</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
47
script/deploy.xml
Normal file
47
script/deploy.xml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project name="weixin4j-server" default="deploy" basedir=".">
|
||||||
|
<property name="app.dir" value="./target" />
|
||||||
|
<property name="zip.name" value="zip包名称,如:weixin4j-server-bin.zip" />
|
||||||
|
<property name="host" value="主机地址,如:192.168.1.8" />
|
||||||
|
<property name="user.name" value="用户帐号,如:root" />
|
||||||
|
<property name="user.pwd" value="用户密码,如:123456" />
|
||||||
|
<property name="server.dir" value="部署服务的目录,如:/usr/local/weixin4j" />
|
||||||
|
<property name="server.name" value="部署服务的名字,如:weixin4j-server" />
|
||||||
|
|
||||||
|
<target name="cleanup">
|
||||||
|
<echo>
|
||||||
|
${host}:删除${server.dir}/${zip.name}...
|
||||||
|
</echo>
|
||||||
|
<sshexec host="${host}" username="${user.name}" password="${user.pwd}" trust="true" command="rm -rf ${server.dir}/${zip.name};" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="upload" depends="cleanup">
|
||||||
|
<echo>
|
||||||
|
${host}:上传${app.dir}/${zip.name}...
|
||||||
|
</echo>
|
||||||
|
<scp file="${app.dir}/${zip.name}" todir="${user.name}:${user.pwd}@${host}:${server.dir}" trust="true" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="shutdown" depends="upload">
|
||||||
|
<echo>
|
||||||
|
${host}:停止${server.name}服务,删除${server.dir}/${server.name}...
|
||||||
|
</echo>
|
||||||
|
<sshexec host="${host}" username="${user.name}" password="${user.pwd}" trust="true" command="cd ${server.dir};pwd;sh ${server.name}/startup.sh stop;rm -rf ${server.dir}/${server.name};" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="startup" depends="shutdown">
|
||||||
|
<echo>
|
||||||
|
${host}:启动${server.dir}/${server.name}...
|
||||||
|
</echo>
|
||||||
|
<sshexec host="${host}" username="${user.name}" password="${user.pwd}" trust="true" command="cd ${server.dir};pwd;unzip ${zip.name};sh ${server.name}/startup.sh start;" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="build" depends="startup">
|
||||||
|
<echo>
|
||||||
|
app.dir = ${app.dir}
|
||||||
|
file.zip = ${app.dir}/${zip.name}
|
||||||
|
</echo>
|
||||||
|
</target>
|
||||||
|
<target name="deploy" depends="build">
|
||||||
|
</target>
|
||||||
|
</project>
|
||||||
144
script/startup.sh
Normal file
144
script/startup.sh
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
# Jar执行脚本
|
||||||
|
|
||||||
|
ulimit -n 110000
|
||||||
|
#Jdk home
|
||||||
|
JAVA_HOME="/usr/local/java"
|
||||||
|
|
||||||
|
#Executing user
|
||||||
|
RUNNING_USER=root
|
||||||
|
|
||||||
|
#App home
|
||||||
|
APP_HOME="/path/to/java/app"
|
||||||
|
|
||||||
|
#Main class
|
||||||
|
APP_MAINCLASS=xx.xxx.mainClass.fullName
|
||||||
|
|
||||||
|
#classpath
|
||||||
|
CLASSPATH=$APP_HOME/classes
|
||||||
|
for i in "$APP_HOME"/lib/*.jar; do
|
||||||
|
CLASSPATH="$CLASSPATH":"$i"
|
||||||
|
done
|
||||||
|
|
||||||
|
CLASSPATH="$CLASSPATH":"$APP_HOME"/conf
|
||||||
|
|
||||||
|
#jvm options
|
||||||
|
JAVA_OPTS="-Xms256m -Xmx512m -Djava.awt.headless=true -XX:MaxPermSize=128m -server -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=85 -XX:+DisableExplicitGC -Xnoclassgc -Xverify:none"
|
||||||
|
|
||||||
|
#psid
|
||||||
|
psid=0
|
||||||
|
|
||||||
|
checkpid() {
|
||||||
|
javaps=`$JAVA_HOME/bin/jps -l | grep $APP_MAINCLASS`
|
||||||
|
|
||||||
|
if [ -n "$javaps" ]; then
|
||||||
|
psid=`echo $javaps | awk '{print $1}'`
|
||||||
|
else
|
||||||
|
psid=0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
###################################
|
||||||
|
#startup
|
||||||
|
###################################
|
||||||
|
start() {
|
||||||
|
checkpid
|
||||||
|
|
||||||
|
if [ $psid -ne 0 ]; then
|
||||||
|
echo "================================"
|
||||||
|
echo "warn: $APP_MAINCLASS already started! (pid=$psid)"
|
||||||
|
echo "================================"
|
||||||
|
else
|
||||||
|
echo -n "Starting $APP_MAINCLASS ..."
|
||||||
|
# JAVA_CMD="nohup $JAVA_HOME/bin/java $JAVA_OPTS -classpath $CLASSPATH $APP_MAINCLASS >/dev/null 2>&1 &"
|
||||||
|
JAVA_CMD="$JAVA_HOME/bin/java $JAVA_OPTS -classpath $CLASSPATH $APP_MAINCLASS &"
|
||||||
|
su - $RUNNING_USER -c "$JAVA_CMD"
|
||||||
|
checkpid
|
||||||
|
if [ $psid -ne 0 ]; then
|
||||||
|
echo "(pid=$psid) [OK]"
|
||||||
|
else
|
||||||
|
echo "[Failed]"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
###################################
|
||||||
|
#stop
|
||||||
|
###################################
|
||||||
|
stop() {
|
||||||
|
checkpid
|
||||||
|
|
||||||
|
if [ $psid -ne 0 ]; then
|
||||||
|
echo -n "Stopping $APP_MAINCLASS ...(pid=$psid) "
|
||||||
|
su - $RUNNING_USER -c "kill -9 $psid"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "[OK]"
|
||||||
|
else
|
||||||
|
echo "[Failed]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
checkpid
|
||||||
|
if [ $psid -ne 0 ]; then
|
||||||
|
stop
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "================================"
|
||||||
|
echo "warn: $APP_MAINCLASS is not running"
|
||||||
|
echo "================================"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
###################################
|
||||||
|
#status
|
||||||
|
###################################
|
||||||
|
status() {
|
||||||
|
checkpid
|
||||||
|
|
||||||
|
if [ $psid -ne 0 ]; then
|
||||||
|
echo "$APP_MAINCLASS is running! (pid=$psid)"
|
||||||
|
else
|
||||||
|
echo "$APP_MAINCLASS is not running"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
###################################
|
||||||
|
#info
|
||||||
|
###################################
|
||||||
|
info() {
|
||||||
|
echo "System Information:"
|
||||||
|
echo "****************************"
|
||||||
|
echo `head -n 1 /etc/issue`
|
||||||
|
echo `uname -a`
|
||||||
|
echo
|
||||||
|
echo "JAVA_HOME=$JAVA_HOME"
|
||||||
|
echo `$JAVA_HOME/bin/java -version`
|
||||||
|
echo
|
||||||
|
echo "APP_HOME=$APP_HOME"
|
||||||
|
echo "APP_MAINCLASS=$APP_MAINCLASS"
|
||||||
|
echo "****************************"
|
||||||
|
}
|
||||||
|
|
||||||
|
###################################
|
||||||
|
#access only 1 argument:{start|stop|restart|status|info}
|
||||||
|
###################################
|
||||||
|
case "$1" in
|
||||||
|
'start')
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
'stop')
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
'restart')
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
'status')
|
||||||
|
status
|
||||||
|
;;
|
||||||
|
'info')
|
||||||
|
info
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart|status|info}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
exit 0
|
||||||
@ -682,6 +682,10 @@
|
|||||||
<code>45027</code>
|
<code>45027</code>
|
||||||
<text>mpnews每天只能发送100次</text>
|
<text>mpnews每天只能发送100次</text>
|
||||||
</error>
|
</error>
|
||||||
|
<error>
|
||||||
|
<code>45032</code>
|
||||||
|
<text>作者名字长度超过限制</text>
|
||||||
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<code>46001</code>
|
<code>46001</code>
|
||||||
<text>不存在媒体数据</text>
|
<text>不存在媒体数据</text>
|
||||||
|
|||||||
@ -1,20 +1,20 @@
|
|||||||
weixin4j-server
|
weixin4j-server
|
||||||
===============
|
===============
|
||||||
|
|
||||||
[微信回调消息](http://mp.weixin.qq.com/wiki/1/6239b44c206cab9145b1d52c67e6c551.html)服务器
|
[微信回调消息](http://mp.weixin.qq.com/wiki/1/6239b44c206cab9145b1d52c67e6c551.html)服务器
|
||||||
----------------
|
----------------
|
||||||
base on netty.
|
based on netty.
|
||||||
|
|
||||||
功能列表
|
功能列表
|
||||||
-------
|
-------
|
||||||
* `netty服务器`
|
* `netty服务器`
|
||||||
|
|
||||||
* `消息分发`
|
* `消息分发`
|
||||||
|
|
||||||
* `消息拦截`(还需更多测试
|
* `消息拦截`(还需更多测试
|
||||||
|
|
||||||
[如何使用](https://github.com/foxinmy/weixin4j/wiki/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8Server)
|
[如何使用](https://github.com/foxinmy/weixin4j/wiki/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8Server)
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
[更新LOG](./CHANGE.md)
|
[更新LOG](./CHANGE.md)
|
||||||
----------------------
|
----------------------
|
||||||
@ -1,54 +1,54 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<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">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.foxinmy</groupId>
|
<groupId>com.foxinmy</groupId>
|
||||||
<artifactId>weixin4j</artifactId>
|
<artifactId>weixin4j</artifactId>
|
||||||
<version>1.6.8</version>
|
<version>1.6.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>weixin4j-server</artifactId>
|
<artifactId>weixin4j-server</artifactId>
|
||||||
<version>1.1.7</version>
|
<version>1.1.7</version>
|
||||||
<name>weixin4j-server</name>
|
<name>weixin4j-server</name>
|
||||||
<url>https://github.com/foxinmy/weixin4j/tree/master/weixin4j-server</url>
|
<url>https://github.com/foxinmy/weixin4j/tree/master/weixin4j-server</url>
|
||||||
<description>微信消息netty服务器</description>
|
<description>微信消息netty服务器</description>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.netty</groupId>
|
<groupId>io.netty</groupId>
|
||||||
<artifactId>netty-all</artifactId>
|
<artifactId>netty-all</artifactId>
|
||||||
<version>4.0.23.Final</version>
|
<version>4.0.23.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpcore</artifactId>
|
<artifactId>httpcore</artifactId>
|
||||||
<version>4.2.5</version>
|
<version>4.2.5</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<version>4.2.5</version>
|
<version>4.2.5</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>commons-codec</groupId>
|
<groupId>commons-codec</groupId>
|
||||||
<artifactId>commons-codec</artifactId>
|
<artifactId>commons-codec</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpcore</artifactId>
|
<artifactId>httpcore</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-context</artifactId>
|
<artifactId>spring-context</artifactId>
|
||||||
<version>4.2.0.RELEASE</version>
|
<version>4.2.0.RELEASE</version>
|
||||||
<scope>test</scope>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
Loading…
x
Reference in New Issue
Block a user