ARTEMIS-3328: fix assembly descriptors and stop downgrading assembly plugin

- Remove assembly plugin downgrade from 7733a76649 in ARTEMIS-3296.
- Ensure bin descriptor marks key artemis setup/startup script executable file permissions, it wasnt
  before as while aiming to it only defined inclusions for old files that no longer exist.
- Add mode fields to every area to make clear what they will be using, make formats consistent with doc.
- Update source release assembly to similarly mark key scripts with executable file permissions.
This commit is contained in:
Robbie Gemmell 2021-06-03 11:40:57 +01:00
parent 73bcc78beb
commit 5bf3228259
3 changed files with 73 additions and 25 deletions

View File

@ -21,8 +21,8 @@
<dependencySets>
<dependencySet>
<directoryMode>755</directoryMode>
<fileMode>644</fileMode>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
<outputDirectory>lib</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<unpack>false</unpack>
@ -34,8 +34,8 @@
</dependencySet>
<dependencySet>
<directoryMode>755</directoryMode>
<fileMode>644</fileMode>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
<includes>
<!-- modules -->
@ -106,8 +106,8 @@
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
<dependencySet>
<directoryMode>755</directoryMode>
<fileMode>644</fileMode>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
<includes>
<include>org.apache.activemq:artemis-jms-client-all</include>
</includes>
@ -128,6 +128,8 @@
</includes>
</unpackOptions>
<useProjectArtifact>false</useProjectArtifact>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</dependencySet>
<dependencySet>
<includes>
@ -139,6 +141,8 @@
<outputDirectory>web</outputDirectory>
<unpack>true</unpack>
<useProjectArtifact>false</useProjectArtifact>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</dependencySet>
<dependencySet>
<includes>
@ -147,6 +151,8 @@
<outputDirectory>web/api</outputDirectory>
<unpack>true</unpack>
<useProjectArtifact>false</useProjectArtifact>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</dependencySet>
<!-- Management Console Dependencies -->
@ -158,6 +164,8 @@
<unpack>false</unpack>
<outputFileNameMapping>console.war</outputFileNameMapping>
<useProjectArtifact>false</useProjectArtifact>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</dependencySet>
<dependencySet>
<includes>
@ -167,6 +175,8 @@
<unpack>false</unpack>
<outputFileNameMapping>activemq-branding.war</outputFileNameMapping>
<useProjectArtifact>false</useProjectArtifact>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</dependencySet>
<dependencySet>
<includes>
@ -176,6 +186,8 @@
<unpack>false</unpack>
<outputFileNameMapping>artemis-plugin.war</outputFileNameMapping>
<useProjectArtifact>false</useProjectArtifact>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</dependencySet>
</dependencySets>
@ -185,16 +197,22 @@
<directory>${activemq.basedir}/artemis-server/src/main/resources/schema/</directory>
<outputDirectory>schema</outputDirectory>
<lineEnding>keep</lineEnding>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${activemq.basedir}/artemis-jms-server/src/main/resources/schema/</directory>
<outputDirectory>schema</outputDirectory>
<lineEnding>keep</lineEnding>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${activemq.basedir}/artemis-dto/target/schema/org.apache.activemq/dto/</directory>
<outputDirectory>schema</outputDirectory>
<lineEnding>keep</lineEnding>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</fileSet>
<!-- resources -->
<fileSet>
@ -202,25 +220,21 @@
<outputDirectory>${file.separator}</outputDirectory>
<lineEnding>keep</lineEnding>
<excludes>
<exclude>bin/activemq</exclude>
<exclude>bin/run.sh</exclude>
<exclude>bin/stop.sh</exclude>
<exclude>bin/artemis</exclude>
<exclude>**/target/**</exclude>
<exclude>**/**/*.iml</exclude>
<exclude>**/**/*.dat</exclude>
<exclude>**/licenses/**</exclude>
<exclude>docker/**</exclude>
</excludes>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</fileSet>
<!-- chmod to 755 on linux executables -->
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>${file.separator}</outputDirectory>
<lineEnding>keep</lineEnding>
<includes>
<include>bin/activemq</include>
<include>bin/run.sh</include>
<include>bin/stop.sh</include>
<include>bin/artemis</include>
</includes>
<directoryMode>0755</directoryMode>
<fileMode>0755</fileMode>
@ -235,18 +249,38 @@
<exclude>**/**/*.iml</exclude>
<exclude>**/**/*.dat</exclude>
<exclude>**/**/*.md</exclude>
<exclude>**/**/*.sh</exclude>
</excludes>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>${activemq.basedir}/examples</directory>
<outputDirectory>examples</outputDirectory>
<lineEnding>keep</lineEnding>
<includes>
<include>**/**/*.sh</include>
</includes>
<excludes>
<exclude>**/target/**</exclude>
</excludes>
<directoryMode>0755</directoryMode>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.build.directory}/markdown-pages/examples</directory>
<outputDirectory>examples</outputDirectory>
<lineEnding>keep</lineEnding>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</fileSet>
<!-- Include license and notice files -->
<fileSet>
<directory>${activemq.basedir}/artemis-distribution/src/main/resources/licenses/bin</directory>
<outputDirectory>${file.separator}</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</fileSet>
</fileSets>
</component>

View File

@ -34,12 +34,18 @@
<directory>${activemq.basedir}</directory>
<outputDirectory>${file.separator}</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<!-- TODO These excludes were lifted from maven-resources-apache-source-release-assembly-descriptor-1.0.4. We
should use this descriptor directly in future -->
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
<excludes>
<exclude>tests/extra-tests/</exclude>
<exclude>tests/performance-jmh/</exclude>
<exclude>artemis-distribution/src/main/resources/bin/artemis</exclude>
<exclude>artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis</exclude>
<exclude>artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service</exclude>
<exclude>scripts/*.sh</exclude>
<exclude>**/**/*.sh</exclude>
<!-- in case some of the build generates data, this needs to be ignored -->
<exclude>data/</exclude>
@ -130,5 +136,22 @@
</excludes>
</fileSet>
<fileSet>
<directory>${activemq.basedir}</directory>
<outputDirectory>${file.separator}</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<directoryMode>0755</directoryMode>
<fileMode>0755</fileMode>
<includes>
<include>artemis-distribution/src/main/resources/bin/artemis</include>
<include>artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis</include>
<include>artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service</include>
<include>scripts/*.sh</include>
<include>**/**/*.sh</include>
</includes>
<excludes>
<exclude>**/target/**</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>

View File

@ -97,10 +97,6 @@
<jetty.version>9.4.40.v20210413</jetty.version>
<jgroups.version>3.6.13.Final</jgroups.version>
<errorprone.version>2.6.0</errorprone.version>
<!-- Overrides the parent pom to downgrade to assembly plugin to < 3.2.0, and
keep the old file permission copying behaviour until such time as the assembly
descriptor properly defines them. See also MASSEMBLY-941. -->
<maven.assembly.plugin.version>3.1.1</maven.assembly.plugin.version>
<maven.enforcer.plugin.version>3.0.0-M3</maven.enforcer.plugin.version>
<maven.bundle.plugin.version>5.1.2</maven.bundle.plugin.version>
<mockito.version>3.9.0</mockito.version>
@ -1482,11 +1478,6 @@
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven.assembly.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-rar-plugin</artifactId>