1
1
mirror of https://github.com/geekfrog/PermissionsTime.git synced 2024-11-21 23:08:48 +00:00

自动化部署

This commit is contained in:
GeekFrog 2017-07-07 18:59:59 +08:00
parent 5f3ef90d9f
commit f5ad6d7c11
3 changed files with 84 additions and 1 deletions

14
assembly/package.xml Normal file
View File

@ -0,0 +1,14 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>bin</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>zip</format>
</formats>
<files>
<file>
<source>${project.build.directory}/${artifactId}.jar</source>
<outputDirectory>/</outputDirectory>
<destName>PermissionsTime.jar</destName>
</file>
</files>
</assembly>

69
pom.xml
View File

@ -31,7 +31,8 @@
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main</sourceDirectory>
<finalName>PermissionsTime</finalName>
<sourceDirectory>${basedir}/src/main</sourceDirectory>
<resources>
<resource>
<directory>src/resources</directory>
@ -44,8 +45,74 @@
<configuration>
<source>1.8</source>
<target>1.8</target>
<excludes>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>assembly/package.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>build</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.5</version>
<configuration>
<artifactSet>
<includes>
<include>commons-logging:commons-logging</include>
<include>org.apache.tomcat:tomcat-jdbc</include>
<include>org.apache.tomcat:tomcat-juli</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.apache.commons.logging</pattern>
<shadedPattern>com.gmail.nossr50.commons.logging</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.juli</pattern>
<shadedPattern>com.gmail.nossr50.database.tomcat.juli</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.tomcat</pattern>
<shadedPattern>com.gmail.nossr50.database.tomcat</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<version>2.2</version>
</extension>
</extensions>
</build>
<ciManagement>
<system>Jenkins</system>
<url>http://jenkins.frog.gg/jenkins/job/PermissionsTime/</url>
</ciManagement>
</project>

View File

@ -28,6 +28,8 @@ public class PluginMain extends JavaPlugin {
cm = new ConfigManager(this);
pm.getServer().getConsoleSender().sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + "==============================="));
pm.getServer().getConsoleSender().sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + " " + PluginMain.PLUGIN_NAME + " v" + PluginMain.PLUGIN_VERSION));
pm.getServer().getConsoleSender().sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + " 作者:宅宅蛙 QQ324747460"));
pm.getServer().getConsoleSender().sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + " https://github.com/geekfrog/PermissionsTime/ "));
pm.getServer().getConsoleSender().sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX));
}