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>
<formats>
<format>dir</format>
<format>jar</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>

View File

@ -24,7 +24,7 @@
<filtered>true</filtered>
</fileSet>
<fileSet>
<directory>src/main/plugins/*</directory>
<directory>src/main/plugins/</directory>
<outputDirectory>plugins</outputDirectory>
<fileMode>0755</fileMode>
<lineEnding>unix</lineEnding>
@ -65,5 +65,13 @@
<outputDirectory>docs</outputDirectory>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>../dist/plugins</directory>
<outputDirectory>plugins</outputDirectory>
<includes>
<include>**/*</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
</fileSets>
</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>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${assembly-plugin.version}</version>
<configuration>
<outputDirectory>../../../server/src/main/plugins/${plugin.name}</outputDirectory>
<excludes>
<exclude>**/*.properties</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.yml</exclude>
<exclude>static/**</exclude>
<exclude>templates/**</exclude>
</excludes>
<finalName>${plugin.name}</finalName>
<descriptors>
<descriptor>../../../configure/assembly/assembly-plugin.xml</descriptor>
</descriptors>
<outputDirectory>../../../dist/plugins/${plugin.name}</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
<goal>single</goal>
</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>
</executions>
</plugin>

View File

@ -44,39 +44,22 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${assembly-plugin.version}</version>
<configuration>
<outputDirectory>../../../server/src/main/plugins/${plugin.name}</outputDirectory>
<excludes>
<exclude>**/*.properties</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.yml</exclude>
<exclude>static/**</exclude>
<exclude>templates/**</exclude>
</excludes>
<finalName>${plugin.name}</finalName>
<descriptors>
<descriptor>../../../configure/assembly/assembly-plugin.xml</descriptor>
</descriptors>
<outputDirectory>../../../dist/plugins/${plugin.name}</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
<goal>single</goal>
</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>
</executions>
</plugin>

View File

@ -31,6 +31,7 @@
<plugin.maven.findbugs.version>3.0.5</plugin.maven.findbugs.version>
<plugin.maven.compiler.version>3.3</plugin.maven.compiler.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>
</properties>