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
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">
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>openfire-plugin-assembly</id>
<formats>
<format>jar</format>
......@@ -14,10 +12,20 @@
<outputDirectory/>
<directory>${project.build.sourceDirectory}/../..</directory>
<includes>
<include>*.html</include>
<include>*.gif</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>
</fileSet>
......@@ -30,14 +38,34 @@
<include>i18n/**</include>
<include>web/**</include>
</includes>
<!-- Don't include jsp pages, they will be compiled -->
<!-- Exclude jsp pages (they will be compiled) and filterable resources -->
<excludes>
<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>
</excludes>
</fileSet>
<!-- web.xml (it will be modified by JspC -->
<!-- web.xml (it will be modified by JspC) -->
<fileSet>
<outputDirectory>web/WEB-INF</outputDirectory>
<directory>${project.build.directory}</directory>
......@@ -46,16 +74,28 @@
</includes>
</fileSet>
</fileSets>
<!-- metadata files that need to have content replaced by Maven metadata -->
<files>
<file>
<source>plugin.xml</source>
<outputDirectory>/</outputDirectory>
<!-- Include the classes folder (filtered) -->
<fileSet>
<outputDirectory>classes</outputDirectory>
<directory>classes</directory>
<filtered>true</filtered>
</file>
</files>
<includes>
<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 -->
<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