Skip to content
Nico Kutscherauer edited this page Sep 2, 2020 · 3 revisions

catalogBuilder-maven-plugin

Release 2.0 Samples

Standard configuration, with default options

<plugin>
  <groupId>top.marchand.xml.maven</groupId>
  <artifactId>catalogBuilder-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>catalog</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Generating for all URI patterns

<plugin>
  <groupId>top.marchand.xml.maven</groupId>
  <artifactId>catalogBuilder-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>catalog</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <uriPatterns>
      <uriPattern>compact</uriPattern>
      <uriPattern>standard</uriPattern>
      <uriPattern>full</uriPattern>
    </uriPatterns>
  </configuration>
</plugin>

Generating public, system and uri catalog entries

Not very useful, but you do what you want...

<plugin>
  <groupId>top.marchand.xml.maven</groupId>
  <artifactId>catalogBuilder-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>catalog</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <generates>
      <generate>public</generate>
      <generate>system</generate>
      <generate>uri</generate>
    </generates>
  </configuration>
</plugin>

Adding <delegatePublic/> entries

<plugin>
  <groupId>top.marchand.xml.maven</groupId>
  <artifactId>catalogBuilder-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>catalog</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <delegatesPublic>
      <entry>
        <startString>pouet://</startString>
        <catalog>catalog1.xml</catalog>
      </entry>
      <entry>
        <startString>ping://</startString>
        <catalog>catalog2.xml</catalog>
      </entry>
    </delegatesPublic>
  </configuration>
</plugin>

Adding <delegateSystem/> catalog entry

<plugin>
  <groupId>top.marchand.xml.maven</groupId>
  <artifactId>catalogBuilder-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>catalog</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <delegatesSystem>
      <entry>
        <startString>pouet://</startString>
        <catalog>catalog3.xml</catalog>
      </entry>
    </delegatesSystem>
  </configuration>
</plugin>

Adding <delegateURI/> catalog entry

<plugin>
  <groupId>top.marchand.xml.maven</groupId>
  <artifactId>catalogBuilder-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>catalog</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <delegatesURI>
      <entry>
        <startString>http://www.w3c.org/</startString>
        <catalog>catalog4.xml</catalog>
      </entry>
    </delegatesURI>
  </configuration>
</plugin>

Adding <nextCatalog/> catalog entry

<plugin>
  <groupId>top.marchand.xml.maven</groupId>
  <artifactId>catalogBuilder-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>catalog</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <nextCatalogs>
      <nextCatalog>catalog5.xml</nextCatalog>
      <nextCatalog>catalog6.xml</nextCatalog>
    </nextCatalogs>
  </configuration>
</plugin>

Defining another target location for generated catalog

<plugin>
  <groupId>top.marchand.xml.maven</groupId>
  <artifactId>catalogBuilder-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>catalog</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <catalogFileName>target/classes/catalog.xml</catalogFileName>
  </configuration>
</plugin>

Re-routing to another protocol

<plugin>
  <groupId>top.marchand.xml.maven</groupId>
  <artifactId>catalogBuilder-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>catalog</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <rewriteToProtocol>cp:/</rewriteToProtocol>
  </configuration>
</plugin>