 | This information is for WCB's based on pre-WM 9.7 archetypes.
From WM 9.7 on, the archetypes contain the things described below. |
A Webmanager Component Bundle contains the bare necessities for a functional component. It is possible to create a Web Component Archive to store additional information with a WCB; think of the source code or Javadoc documentation. Creating a WCA is similar to creating a WCB, below are instructions how to do it.
Add the red colored code snippets to your "pom.xml":
<build>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>create-javadoc</id>
<phase>package</phase>
<goals>
<goal>javadoc</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assemble-zip</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptors>
<descriptor>src/main/assembly/dist-assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<reportOutputDirectory>target/apidocs</reportOutputDirectory>
</configuration>
</plugin>
</plugins>
</reporting>
Copy the contents below to a file in your WCB directory structure named "src/main/assembly/dist-assembly.xml":
<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="http://maven.apache.org/ASSEMBLY" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
<id>dist</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<includeSiteDirectory>false</includeSiteDirectory>
<fileSets>
<fileSet>
<directory></directory>
<filtered>false</filtered>
<useStrictFiltering>true</useStrictFiltering>
<outputDirectory>/</outputDirectory>
<includes>
<include>changelog.txt</include>
<include>readme.txt</include>
<include>pom.xml</include>
</includes>
</fileSet>
<fileSet>
<directory>doc</directory>
<filtered>false</filtered>
<useStrictFiltering>true</useStrictFiltering>
<outputDirectory>doc</outputDirectory>
</fileSet>
<fileSet>
<directory>target/apidocs</directory>
<filtered>false</filtered>
<outputDirectory>doc/apidocs</outputDirectory>
</fileSet>
<fileSet>
<directory>target</directory>
<filtered>false</filtered>
<outputDirectory>bin</outputDirectory>
<includes>
<include>${pom.artifactId}-${pom.version}.jar</include>
</includes>
</fileSet>
<fileSet>
<directory>src</directory>
<filtered>false</filtered>
<useStrictFiltering>true</useStrictFiltering>
<outputDirectory>src</outputDirectory>
</fileSet>
</fileSets>
</assembly>
Be sure to add files "readme.txt" and "changelog.txt" (templates are here) to your directories.
Build as usual ("mvn -s C:\GX\WebManager9\settings.xml clean package"). The WCA .zip file will appear in the target directory.