Commit 9d56c932 authored by Schudt, Christian's avatar Schudt, Christian Committed by Guus der Kinderen

Plugin assembly: Allow .html, .xml and .properties files to be filtered by Maven

Motivation:
Give third-party developers more flexibility to build their plugins. Currently it's not possible to filter anything besides the plugin.xml.

Further improvements:
- Include lib folder in the assembly (for non-Maven artifacts)
- Update namespace "http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" -> "http://maven.apache.org/ASSEMBLY/2.0.0"
parent 6c32335b
<assembly <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
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>openfire-plugin-assembly</id> <id>openfire-plugin-assembly</id>
<formats> <formats>
<format>jar</format> <format>jar</format>
...@@ -14,10 +12,20 @@ ...@@ -14,10 +12,20 @@
<outputDirectory/> <outputDirectory/>
<directory>${project.build.sourceDirectory}/../..</directory> <directory>${project.build.sourceDirectory}/../..</directory>
<includes> <includes>
<include>*.html</include>
<include>*.gif</include> <include>*.gif</include>
<include>*.png</include> <include>*.png</include>
<include>classes/**</include> <include>lib/**</include>
</includes>
</fileSet>
<!-- filtered metadata files (html, plugin.xml) -->
<fileSet>
<outputDirectory/>
<directory>${project.build.sourceDirectory}/../..</directory>
<filtered>true</filtered>
<includes>
<include>*.html</include>
<include>plugin.xml</include>
</includes> </includes>
</fileSet> </fileSet>
...@@ -30,14 +38,34 @@ ...@@ -30,14 +38,34 @@
<include>i18n/**</include> <include>i18n/**</include>
<include>web/**</include> <include>web/**</include>
</includes> </includes>
<!-- Don't include jsp pages, they will be compiled --> <!-- Exclude jsp pages (they will be compiled) and filterable resources -->
<excludes> <excludes>
<exclude>**/*.jsp</exclude> <exclude>**/*.jsp</exclude>
<exclude>i18n/**/*.properties</exclude>
<exclude>web/**/*.xml</exclude>
<exclude>web/**/*.html</exclude>
<exclude>web/**/*.properties</exclude>
</excludes>
</fileSet>
<!-- database, i18n and web directory (filtered) -->
<fileSet>
<outputDirectory/>
<directory>${project.build.sourceDirectory}/..</directory>
<filtered>true</filtered>
<includes>
<include>i18n/**/*.properties</include>
<include>web/**/*.xml</include>
<include>web/**/*.html</include>
<include>web/**/*.properties</include>
</includes>
<excludes>
<!-- Exclude the web.xml, it will be generated by JspC -->
<exclude>web/WEB-INF/web.xml</exclude> <exclude>web/WEB-INF/web.xml</exclude>
</excludes> </excludes>
</fileSet> </fileSet>
<!-- web.xml (it will be modified by JspC --> <!-- web.xml (it will be modified by JspC) -->
<fileSet> <fileSet>
<outputDirectory>web/WEB-INF</outputDirectory> <outputDirectory>web/WEB-INF</outputDirectory>
<directory>${project.build.directory}</directory> <directory>${project.build.directory}</directory>
...@@ -46,16 +74,28 @@ ...@@ -46,16 +74,28 @@
</includes> </includes>
</fileSet> </fileSet>
</fileSets> <!-- Include the classes folder (filtered) -->
<fileSet>
<!-- metadata files that need to have content replaced by Maven metadata --> <outputDirectory>classes</outputDirectory>
<files> <directory>classes</directory>
<file>
<source>plugin.xml</source>
<outputDirectory>/</outputDirectory>
<filtered>true</filtered> <filtered>true</filtered>
</file> <includes>
</files> <include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<!-- Include the classes folder -->
<fileSet>
<outputDirectory>classes</outputDirectory>
<directory>classes</directory>
<filtered>false</filtered>
<excludes>
<exclude>**/*.xml</exclude>
<exclude>**/*.properties</exclude>
</excludes>
</fileSet>
</fileSets>
<!-- Bundle the dependencies of this plugin --> <!-- Bundle the dependencies of this plugin -->
<dependencySets> <dependencySets>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment