XFF Maven Plugin

Last modified by Admin on 2024/07/05 17:43

cogMaven plugin to build XFF packages
TypeJAR
Category
Developed by

XWiki Development Team

Active Installs0
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

Maven plugin to build XFF packages

Introduction

With the Maven Plugin for XFF, you'll be able to build your XFF packages with Maven.  Better have an example than long description.

Example

The POM

This is what your pom.xml should look like.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 <modelVersion>4.0.0</modelVersion>
 <groupId>org.xwiki.contrib</groupId>
 <artifactId>my-application</artifactId>
 <version>0.1-SNAPSHOT</version>
 <name>My Application</name>
 <packaging>xff</packaging>
 <description>My simple application</description>
 <build>
   <plugins>
     <plugin>
       <groupId>org.xwiki.contrib</groupId>
       <artifactId>xff-maven-plugin</artifactId>
       <version>${xff.version}</version>
     </plugin>
   </plugins>
   <!-- Needed to add support for the XFF packaging -->
   <extensions>
     <extension>
       <groupId>org.xwiki.contrib</groupId>
       <artifactId>xff-maven-handler</artifactId>
       <version>${xff.version}</version>
     </extension>
   </extensions>
 </build>
</project>

The files

Once you have your pom.xml, you can put files in your folder src/main/resources.  For example, imagine you want something very simple, only the description of a page (with some specific configurations for the space and the wiki), then your folder would look like the following.

pom.xml
src/
└── main/
    └── resources/
        └── wikis/
            └── xwiki/
                ├── wiki.xml
                └── spaces/
                    └── Space/
                        ├── space.xml
                        └── pages/
                            └── Page/
                                └── page.xml

You'll find more information about XFF format in the page XFF filter.

Build it

It's Maven, so may just run

mvn package

Then you'll find your XFF package in the target directory.

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.

Dependencies

Dependencies for this extension (org.xwiki.contrib:xff-maven-plugin 0.4.0):

Get Connected