mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Maxim Thomas
28.54.2024 b625705eb7e9f56e7b005cc4d5b3f50ffa7bd548
compress webhelp, xhtml and html docs after build (#348)

1 files added
2 files modified
56 ■■■■■ changed files
opendj-doc-generated-ref/pom.xml 34 ●●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/src/main/ant/zip.xml 21 ●●●●● patch | view | raw | blame | history
pom.xml 1 ●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/pom.xml
@@ -611,6 +611,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>
                    <!-- Generate Artifacts -->
                    <plugin>
opendj-doc-generated-ref/src/main/ant/zip.xml
New file
@@ -0,0 +1,21 @@
<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="*/*/**"/>
                </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>
pom.xml
@@ -55,6 +55,7 @@
        <!--  ForgeRock build tools and Checkstyle versions (to avoid many checkstyle errors with ForgeRock Parent 2.0.10) -->
        <checkstylePluginVersion>2.9.1</checkstylePluginVersion>
        <checkstyleVersion>5.5</checkstyleVersion>
        <ant.contrib.version>1.0b3</ant.contrib.version>
        <argLine>-Xmx512m</argLine>
    </properties>