Skip to content

Commit

Permalink
feat(#2061): Extend maven-assembly-plugin to generate installer zip f…
Browse files Browse the repository at this point in the history
…ile (#2062)
  • Loading branch information
dominikriemer committed Oct 20, 2023
1 parent 7ca3a88 commit 19efa05
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 54 deletions.
86 changes: 33 additions & 53 deletions pom.xml
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>29</version>
<version>30</version>
</parent>

<groupId>org.apache.streampipes</groupId>
Expand Down Expand Up @@ -176,7 +176,6 @@
<inlong.version>1.9.0</inlong.version>

<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
<maven.javadoc.plugin.version>3.1.1</maven.javadoc.plugin.version>

<!-- Connect Dependencies-->
<animal-sniffer-annotations.version>1.17</animal-sniffer-annotations.version>
Expand All @@ -195,14 +194,8 @@
<checkstyle.version>10.12.1</checkstyle.version>
<extra-enforcer-rules.version>1.7.0</extra-enforcer-rules.version>
<formatter-maven-plugin.version>2.23.0</formatter-maven-plugin.version>
<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
<maven-checkstyle-plugin.version>3.2.1</maven-checkstyle-plugin.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<maven.dependency.check.plugin.version>8.4.0</maven.dependency.check.plugin.version>
<maven-dependency-plugin.version>3.5.0</maven-dependency-plugin.version>
<maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
<mave-release-plugin.version>3.0.0-M5</mave-release-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-shade-plugin.version>3.4.1</maven-shade-plugin.version>
<micrometer-prometheus.version>1.11.0</micrometer-prometheus.version>
<micrometer-observation.version>1.11.0</micrometer-observation.version>
Expand Down Expand Up @@ -1477,22 +1470,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>17</release>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand All @@ -1510,22 +1492,22 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<configuration>
<finalName>apache-streampipes-${project.version}</finalName>
<descriptors>
<descriptor>tools/maven/assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
<executions>
<execution>
<id>source-release-assembly</id>
<configuration>
<finalName>apache-streampipes-${project.version}</finalName>
<descriptors>
<descriptor>tools/maven/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
Expand All @@ -1551,16 +1533,6 @@
<failOnViolation>true</failOnViolation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>${apache-rat-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
Expand All @@ -1579,6 +1551,26 @@


<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>installer-files</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
<finalName>apache-streampipes-${project.version}-installer</finalName>
<descriptors>
<descriptor>tools/maven/installer.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
Expand Down Expand Up @@ -1764,18 +1756,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
1 change: 0 additions & 1 deletion streampipes-maven-plugin/pom.xml
Expand Up @@ -146,7 +146,6 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
Expand Down
40 changes: 40 additions & 0 deletions tools/maven/installer.xml
@@ -0,0 +1,40 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->

<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>zip</id>
<includeBaseDirectory>false</includeBaseDirectory>

<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<useDefaultExcludes>true</useDefaultExcludes>
<excludes>
<exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.gitignore]</exclude>
</excludes>
<directory>${project.basedir}/installer</directory>
<outputDirectory>.</outputDirectory>
<lineEnding>lf</lineEnding>
<fileMode>755</fileMode>
</fileSet>
</fileSets>
</assembly>

0 comments on commit 19efa05

Please sign in to comment.