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

maximthomas
30.08.2024 50f8aa6371aae644cc227b14175b23f5de2d3c4b
Add generated pdf docs archive as an uploaded artifact
2 files modified
51 ■■■■ changed files
opendj-doc-generated-ref/pom.xml 35 ●●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/src/main/ant/zip.xml 16 ●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/pom.xml
@@ -671,6 +671,41 @@
                            </execution>
                        </executions>
                    </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="pdf" />
                                        <property name="project_name" value="${project.name}" />
                                        <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>
opendj-doc-generated-ref/src/main/ant/zip.xml
@@ -1,22 +1,10 @@
<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="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"/>
        <echo message="compressing ${format} from ${project.build.directory}/asciidoc/${format} to ${project.build.directory}/${project.name}-${format}.zip"/>
        <zip basedir="${project.build.directory}/asciidoc/${format}" destfile="${project.build.directory}/${project.name}-${format}.zip"/>
    </target>
</project>