fix(XPack): 修复ClassNotFound bug

This commit is contained in:
q4speed 2020-08-06 14:58:11 +08:00
parent e5c4885d3f
commit 7ce75319bb
2 changed files with 54 additions and 1 deletions

View File

@ -365,6 +365,54 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-and-filter-allatori-config</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target</outputDirectory>
<resources>
<resource>
<directory>${basedir}/allatori</directory>
<includes>
<include>allatori.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>run-allatori</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<arguments>
<argument>-Xms128m</argument>
<argument>-Xmx512m</argument>
<argument>-jar</argument>
<argument>${basedir}/target/classes/allatori/allatori.jar</argument>
<argument>${basedir}/target/classes/allatori/allatori.xml</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -3,8 +3,13 @@
<jar in="../../*.jar" out="../../*.jar"/>
</input>
<ignore-classes>
<class template="class regex:io.metersphere.(?!xpack).*"/>
<class template="class org.*"/>
</ignore-classes>
<keep-names>
<class access="private+">
<class template="class io.metersphere.xpack.*" access="private+">
<field access="protected+"/>
<method access="protected+"/>
</class>