Skip to content

Commit

Permalink
compress webhelp, xhtml and html docs after build (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximthomas authored Jun 28, 2024
1 parent ebdfb80 commit 0242033
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
34 changes: 34 additions & 0 deletions openam-documentation/openam-doc-source/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,40 @@
</formats>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>zip-docs</id>
<phase>package</phase>
<configuration>
<target>
<property name="compress_formats" value="webhelp,xhtml,html"/>
<ant antfile="${basedir}/src/main/ant/zip.xml">
<target name="docs"/>
</ant>>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>${ant.contrib.version}</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
Expand Down
23 changes: 23 additions & 0 deletions openam-documentation/openam-doc-source/src/main/ant/zip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<project name="zip">
<target name="docs">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<foreach param="docname" target="formats" inheritall="true">
<path>
<dirset dir="${basedir}/src/main/docbkx/" casesensitive="yes">
<include name="*/"/>
<exclude name="*/*/**"/>
<exclude name="resources"/>
<exclude name="shared"/>
</dirset>
</path>
<mapper type="flatten"/>
</foreach>
</target>
<target name="formats">
<foreach param="format" list="${compress_formats}" target="dozip" inheritall="true"/>
</target>
<target name="dozip" >
<echo message="compressing ${format} ${docname} from ${project_build_dir}/docbkx/${format}/${docname} to ${project_build_dir}/docbkx/${format}/${docname}.zip"/>
<zip basedir="${project.build.directory}/docbkx/${format}/${docname}" destfile="${project.build.directory}/docbkx/${format}/${docname}.zip"/>
</target>
</project>

0 comments on commit 0242033

Please sign in to comment.