Can't get maven plugin OutputFile option to work

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't get maven plugin OutputFile option to work

deevodavis
I'm using the latest version of the maven plugin (1.5.5) and can't get the "outputFile" option to work in terms of changing the name of the generated PDF file. Any help would be appreciated.

In the example below I am trying to get the file to be called XXXXXX.pdf, but it refuses to be called anything other than swagger.pdf!

			<plugin>
				<groupId>org.asciidoctor</groupId>
				<artifactId>asciidoctor-maven-plugin</artifactId>
				<version>1.5.5</version>
				<dependencies>
                    			<dependency>
                        			<groupId>org.asciidoctor</groupId>
                       				<artifactId>asciidoctorj</artifactId>
                        			<version>1.5.6</version>
                    			</dependency>				
					<dependency>
						<groupId>org.asciidoctor</groupId>
						<artifactId>asciidoctorj-pdf</artifactId>
						<version>1.5.0-alpha.16</version>
					</dependency>
				</dependencies>
				<configuration>
					<sourceDirectory>../../offline-docs/asciidoc</sourceDirectory>
					<sourceDocumentName>swagger.adoc</sourceDocumentName>
					<embedAssets>true</embedAssets>
					<attributes>
						<doctype>book</doctype>
						<toc>left</toc>
						<toclevels>2</toclevels>
						<sectnums>true</sectnums>
						<generated>${basedir}/target/swagger-docs/asciidoc</generated>
						<imagesdir>../../offline-docs/asciidoc/images</imagesdir>
						<title-logo-image>image:MYLOGO_WHITE.png[pdfwidth=5in,align=center]</title-logo-image>
						<pdf-stylesdir>../../offline-docs/asciidoc/theme</pdf-stylesdir> 
                        <pdf-style>custom</pdf-style> 
					</attributes>
				</configuration>
				<executions>
					<execution>
						<id>asciidoc-to-html</id>
						<phase>package</phase>
						<goals>
							<goal>process-asciidoc</goal>
						</goals>
						<configuration>
							<backend>html5</backend>
							<skip>${api.docs.skip}</skip>
							<outputDirectory>${basedir}/target/swagger-docs/generated-html</outputDirectory>
						</configuration>
					</execution>
					<execution>
						<id>asciidoc-to-pdf</id>
						<phase>package</phase>
						<goals>
							<goal>process-asciidoc</goal>
						</goals>
						<configuration>
							<backend>pdf</backend>
							<skip>${api.docs.skip}</skip>
							<outputDirectory>${basedir}/target/swagger-docs/generated-pdf</outputDirectory>
							<outputFile>XXXXXX.pdf</outputFile>
						</configuration>
					</execution>
				</executions>
			</plugin>
Reply | Threaded
Open this post in threaded view
|

Re: Can't get maven plugin OutputFile option to work

abelsromero
The `outputFile` options is for 1.5.6 and has not been released yet. I hope to have some time during next week to implement this (https://github.com/asciidoctor/asciidoctor-maven-plugin/issues/303) and release. In the meantime you'll have to plug another maven plugin to do the renaming.

By the way, I assume you are using https://github.com/Swagger2Markup/swagger2markup.
Reply | Threaded
Open this post in threaded view
|

Re: Can't get maven plugin OutputFile option to work

deevodavis
Thanks for the quick response... I look forward to the next release!

Yes, as you correctly say I use 3 x maven plugins to take my Swagger annotated classes and produce an HTML and PDF representation from them.

com.github.kongchen / swagger-maven-plugin
io.github.robwin / swagger2markup-maven-plugin
org.asciidoctor / asciidoctor-maven-plugin

Regards Steve