<?xml version="1.0" encoding="UTF-8"?>
<?asciidoc-toc maxdepth="2"?>
<?asciidoc-numbered?>
<article xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
<info>
<title>ResourceList and Cartridge ResourceList Plugin</title>
<date>2020-09-29</date>
</info>
<note>
<simpara>Version 4 of this plugin will only work with Gradle 6 and JDK 8.</simpara>
</note>
<section xml:id="asciidocsummary">
<title>Summary</title>
<simpara>This resourcelist plugin generates, based on existing java source files and resources, a file with the listing of these resources.
The cartridge-resourcelist plugin generates two specific files. This configuration is provided to the resourcelist plugin.</simpara>
</section>
<section xml:id="asciidocusage-base-resourcelist-plugin">
<title>Usage Base-ResourceList Plugin</title>
<details open>
<summary>Groovy</summary>
<formalpara>
<title>build.gradle</title>
<para>
<programlisting language="groovy" linenumbering="unnumbered">plugins {
    id 'com.intershop.gradle.resourcelist' version '4.1.0'
}

resourcelist {
    lists {
        orm {
            sourceSetName = 'main'
            include '**/**/*.orm'
            resourceListFileName = "resources/\${project.name}/orm/orm.resource"
            fileExtension = 'orm'
        }
        pipelets {
            sourceSetName = 'main'
            include '**/pipelet/**/*.xml'
            exclude '**/*_??_??.xml'
            resourceListFileName = "resources/\${project.name}/pipeline/pipelets.resource"
            fileExtension = 'xml'
        }
    }
}</programlisting>
</para>
</formalpara>
</details>
<details>
<summary>Kotlin</summary>
<formalpara>
<title>build.gradle.kts</title>
<para>
<programlisting language="kotlin" linenumbering="unnumbered">plugins {
    id("com.intershop.gradle.resourcelist") version "4.1.0"
}

resourcelist {
    lists {
        register("orm") {
            sourceSetName = "main"
            include("**/**/*.orm")
            resourceListFileName = "resources/\${project.name}/orm/orm.resource"
            fileExtension = "orm"
        }
        register("pipelets") {
            sourceSetName = "main"
            include("**/pipelet/**/*.xml")
            exclude("**/*_??_??.xml")
            resourceListFileName = "resources/\${project.name}/pipeline/pipelets.resource"
            fileExtension = "xml"
        }
    }
}</programlisting>
</para>
</formalpara>
</details>
<simpara>The resource list task creates a list of classes, that match to the filter configuration.</simpara>
</section>
<section xml:id="asciidocusage-resourcelist-plugin">
<title>Usage ResourceList Plugin</title>
<programlisting language="groovy" linenumbering="unnumbered">plugins {
    id 'com.intershop.gradle.cartridge-resourcelist' version '4.1.0'
}</programlisting>
<simpara>The cartridge-resourcelist plugin adds two configurations for Intershop orm files and Intershop pipelet files.</simpara>
<important>
<simpara>The JavaBasePlugin must be applied to the project for this plugin, otherwise the functionality is not available.</simpara>
</important>
</section>
<section xml:id="asciidoctasks">
<title>Tasks</title>
<simpara>The resourcelist plugins add a resource list task for each configuration. The resource process task depends on all
resource list tasks of a project.</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<?dbhtml table-width="95%, options="?>
<?dbfo table-width="95%, options="?>
<?dblatex table-width="95%, options="?>
<tgroup cols="3">
<colspec colname="col_1" colwidth="100.9375*"/>
<colspec colname="col_2" colwidth="121.125*"/>
<colspec colname="col_3" colwidth="181.6875*"/>
<tbody>
<row>
<entry align="left" valign="top"><simpara>Task name</simpara></entry>
<entry align="left" valign="top"><simpara>Type</simpara></entry>
<entry align="left" valign="top"><simpara>Description</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara>resourceList&lt;configuration name&gt;</simpara></entry>
<entry align="left" valign="top"><simpara>com.intershop.gradle.resourcelist.task.ResourceListFileTask</simpara></entry>
<entry align="left" valign="top"><simpara>This task generates resource list files from special java sources.</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
<simpara>The cartridge resource list plugin provides two special tasks</simpara>
<informaltable frame="all" rowsep="1" colsep="1">
<?dbhtml table-width="95%, options="?>
<?dbfo table-width="95%, options="?>
<?dblatex table-width="95%, options="?>
<tgroup cols="3">
<colspec colname="col_1" colwidth="100.9375*"/>
<colspec colname="col_2" colwidth="121.125*"/>
<colspec colname="col_3" colwidth="181.6875*"/>
<tbody>
<row>
<entry align="left" valign="top"><simpara>Task name</simpara></entry>
<entry align="left" valign="top"><simpara>Type</simpara></entry>
<entry align="left" valign="top"><simpara>Description</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara>resourceListOrm</simpara></entry>
<entry align="left" valign="top"><simpara>com.intershop.gradle.resourcelist.task.ResourceListFileTask</simpara></entry>
<entry align="left" valign="top"><simpara>This task generates resource list files for orm configurationes.</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara>resourceListPipelets</simpara></entry>
<entry align="left" valign="top"><simpara>com.intershop.gradle.resourcelist.task.ResourceListFileTask</simpara></entry>
<entry align="left" valign="top"><simpara>This task generates resource list files for pipelets.</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
<section xml:id="asciidocproject-extension-resourcelist">
<title>Project Extension 'resourcelist'</title>
<simpara>This plugin adds an extension <emphasis role="strong"><literal>resourcelist</literal></emphasis> to the project.</simpara>
<section xml:id="asciidocmethods">
<title>Methods</title>
<informaltable frame="all" rowsep="1" colsep="1">
<?dbhtml table-width="90%, options="?>
<?dbfo table-width="90%, options="?>
<?dblatex table-width="90%, options="?>
<tgroup cols="4">
<colspec colname="col_1" colwidth="65.025*"/>
<colspec colname="col_2" colwidth="65.025*"/>
<colspec colname="col_3" colwidth="65.025*"/>
<colspec colname="col_4" colwidth="187.4249*"/>
<tbody>
<row>
<entry align="left" valign="top"><simpara>Method</simpara></entry>
<entry align="left" valign="top"><simpara>Type</simpara></entry>
<entry align="left" valign="top"><simpara>Default value</simpara></entry>
<entry align="left" valign="top"><simpara>Description</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara>lists</simpara></entry>
<entry align="left" valign="top"><simpara><link linkend="lists">ListsConfiguration</link></simpara></entry>
<entry align="left" valign="top"></entry>
<entry align="left" valign="top"><simpara>This contains all source list configurations.</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
<section xml:id="asciidocobject-lists-listsconfiguration">
<title><anchor xml:id="lists" xreflabel="[lists]"/>Object 'lists' (ListsConfiguration)</title>
<informaltable frame="all" rowsep="1" colsep="1">
<?dbhtml table-width="90%, options="?>
<?dbfo table-width="90%, options="?>
<?dblatex table-width="90%, options="?>
<tgroup cols="4">
<colspec colname="col_1" colwidth="65.025*"/>
<colspec colname="col_2" colwidth="65.025*"/>
<colspec colname="col_3" colwidth="57.375*"/>
<colspec colname="col_4" colwidth="195.075*"/>
<thead>
<row>
<entry align="left" valign="top">Property</entry>
<entry align="left" valign="top">Type</entry>
<entry align="left" valign="top">Default value</entry>
<entry align="left" valign="top">Description</entry>
</row>
</thead>
<tbody>
<row>
<entry align="left" valign="top"><simpara><emphasis role="strong">fileExtension</emphasis></simpara></entry>
<entry align="left" valign="top"><simpara><literal>String</literal></simpara></entry>
<entry align="left" valign="top"><simpara>Name of the list configuration</simpara></entry>
<entry align="left" valign="top"><simpara>Extension of the analysed files</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara><emphasis role="strong">resourceListFileName</emphasis></simpara></entry>
<entry align="left" valign="top"><simpara><literal>String</literal></simpara></entry>
<entry align="left" valign="top"><simpara>''</simpara></entry>
<entry align="left" valign="top"><simpara>Path for the resource file.</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara><emphasis role="strong">outputDir</emphasis></simpara></entry>
<entry align="left" valign="top"><simpara><literal>File</literal></simpara></entry>
<entry align="left" valign="top"><simpara>'generated/resourcelist/&lt;configuration name&gt;</simpara></entry>
<entry align="left" valign="top"><simpara>Output directory for the generated code</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara><emphasis role="strong">sourceSetName</emphasis></simpara></entry>
<entry align="left" valign="top"><simpara><literal>String</literal></simpara></entry>
<entry align="left" valign="top"><simpara>'main'</simpara></entry>
<entry align="left" valign="top"><simpara>Source set name with analysed sources.</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara><emphasis role="strong">excludes</emphasis></simpara></entry>
<entry align="left" valign="top"><simpara>List&lt;String&gt;</simpara></entry>
<entry align="left" valign="top"><simpara>[]</simpara></entry>
<entry align="left" valign="top"><simpara>List of exclude filters of this configuration.</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara><emphasis role="strong">includes</emphasis></simpara></entry>
<entry align="left" valign="top"><simpara>List&lt;String&gt;</simpara></entry>
<entry align="left" valign="top"><simpara>[]</simpara></entry>
<entry align="left" valign="top"><simpara>List of includes filters of this configuration.</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
</section>
<section xml:id="asciidocmethods-2">
<title>Methods</title>
<informaltable frame="all" rowsep="1" colsep="1">
<?dbhtml table-width="95%"?>
<?dbfo table-width="95%"?>
<?dblatex table-width="95%"?>
<tgroup cols="3">
<colspec colname="col_1" colwidth="80.75*"/>
<colspec colname="col_2" colwidth="60.5625*"/>
<colspec colname="col_3" colwidth="262.4375*"/>
<thead>
<row>
<entry align="left" valign="top">Method</entry>
<entry align="left" valign="top">Values</entry>
<entry align="left" valign="top">Description</entry>
</row>
</thead>
<tbody>
<row>
<entry align="left" valign="top"><simpara><emphasis role="strong">exclude</emphasis></simpara></entry>
<entry align="left" valign="top"><simpara><literal>String</literal></simpara></entry>
<entry align="left" valign="top"><simpara>Add exclude filter to excludes list</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara><emphasis role="strong">include</emphasis></simpara></entry>
<entry align="left" valign="top"><simpara><literal>String</literal></simpara></entry>
<entry align="left" valign="top"><simpara>Add include filter to excludes list</simpara></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
</section>
<section xml:id="asciidoclicense">
<title>License</title>
<simpara>Copyright 2014-2018 Intershop Communications.</simpara>
<simpara>Licensed 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</simpara>
<simpara><link xl:href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</link></simpara>
<simpara>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.</simpara>
</section>
</article>