plugin: Change the way plug-ins are packaged

This commit is contained in:
qianmoQ 2022-09-23 11:24:16 +08:00
parent a65a552fc1
commit 399fb8a290
6 changed files with 34 additions and 54 deletions

View File

@ -2,7 +2,7 @@
<id>plugin</id> <id>plugin</id>
<formats> <formats>
<format>dir</format> <format>jar</format>
</formats> </formats>
<includeBaseDirectory>true</includeBaseDirectory> <includeBaseDirectory>true</includeBaseDirectory>

View File

@ -24,7 +24,7 @@
<filtered>true</filtered> <filtered>true</filtered>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>src/main/plugins/*</directory> <directory>src/main/plugins/</directory>
<outputDirectory>plugins</outputDirectory> <outputDirectory>plugins</outputDirectory>
<fileMode>0755</fileMode> <fileMode>0755</fileMode>
<lineEnding>unix</lineEnding> <lineEnding>unix</lineEnding>
@ -65,5 +65,13 @@
<outputDirectory>docs</outputDirectory> <outputDirectory>docs</outputDirectory>
<fileMode>0644</fileMode> <fileMode>0644</fileMode>
</fileSet> </fileSet>
<fileSet>
<directory>../dist/plugins</directory>
<outputDirectory>plugins</outputDirectory>
<includes>
<include>**/*</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
</fileSets> </fileSets>
</assembly> </assembly>

5
dist/plugins/README.md vendored Normal file
View File

@ -0,0 +1,5 @@
### Plugin Cache
> You can save the plug-ins used by the project.
>
> User-defined plug-ins can be stored in this location

View File

@ -36,39 +36,22 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId> <version>${assembly-plugin.version}</version>
<configuration> <configuration>
<outputDirectory>../../../server/src/main/plugins/${plugin.name}</outputDirectory> <finalName>${plugin.name}</finalName>
<excludes> <descriptors>
<exclude>**/*.properties</exclude> <descriptor>../../../configure/assembly/assembly-plugin.xml</descriptor>
<exclude>**/*.xml</exclude> </descriptors>
<exclude>**/*.yml</exclude> <outputDirectory>../../../dist/plugins/${plugin.name}</outputDirectory>
<exclude>static/**</exclude>
<exclude>templates/**</exclude>
</excludes>
</configuration> </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>copy-dependencies</id> <id>make-assembly</id>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>copy-dependencies</goal> <goal>single</goal>
</goals> </goals>
<configuration>
<outputDirectory>../../../server/src/main/plugins/${plugin.name}</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<includeArtifactIds>
clickhouse-jdbc
</includeArtifactIds>
<stripVersion>false</stripVersion>
<includeScope>runtime</includeScope>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>

View File

@ -44,39 +44,22 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId> <version>${assembly-plugin.version}</version>
<configuration> <configuration>
<outputDirectory>../../../server/src/main/plugins/${plugin.name}</outputDirectory> <finalName>${plugin.name}</finalName>
<excludes> <descriptors>
<exclude>**/*.properties</exclude> <descriptor>../../../configure/assembly/assembly-plugin.xml</descriptor>
<exclude>**/*.xml</exclude> </descriptors>
<exclude>**/*.yml</exclude> <outputDirectory>../../../dist/plugins/${plugin.name}</outputDirectory>
<exclude>static/**</exclude>
<exclude>templates/**</exclude>
</excludes>
</configuration> </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>copy-dependencies</id> <id>make-assembly</id>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>copy-dependencies</goal> <goal>single</goal>
</goals> </goals>
<configuration>
<outputDirectory>../../../server/src/main/plugins/${plugin.name}</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<includeArtifactIds>
mysql-connector-java
</includeArtifactIds>
<stripVersion>false</stripVersion>
<includeScope>runtime</includeScope>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>

View File

@ -31,6 +31,7 @@
<plugin.maven.findbugs.version>3.0.5</plugin.maven.findbugs.version> <plugin.maven.findbugs.version>3.0.5</plugin.maven.findbugs.version>
<plugin.maven.compiler.version>3.3</plugin.maven.compiler.version> <plugin.maven.compiler.version>3.3</plugin.maven.compiler.version>
<plugin.maven.cobertura.version>2.5.1</plugin.maven.cobertura.version> <plugin.maven.cobertura.version>2.5.1</plugin.maven.cobertura.version>
<plugin.maven.dependency.version>3.0.1</plugin.maven.dependency.version>
<environment.compile.java.version>1.8</environment.compile.java.version> <environment.compile.java.version>1.8</environment.compile.java.version>
</properties> </properties>