Login  Register

maven plugin keeps installing gems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

maven plugin keeps installing gems

Paul van der Maden
This post was updated on Dec 11, 2014; 7:55am.
Hi,

I am a first time user of asciidoctor and so far I like it a lot. I already converted a few docs from word to asciidoc and I am really happy with the result.

I am working on a java project, build with maven and as such I followed the asciidoc-to-pdf-example to automaticly generate my asciidocs to pdf with every build. My main problem is that it keeps installing gems.

I found a way around that by letting it install outside of my target directory and let it be part of my production code. It feels a bit dirty though because when I look at some of the generated stuff like asciidoctor-pdf.bat, it contains paths of my local machine.

Is there a best practice for doing this?
I saw you released a new asciidoctorj (1.5.2) this week, but as far as I can see there is not a rubyless way for generating the docs with an already existing maven plugin or is there?

cheers,
Paul
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: maven plugin keeps installing gems

Paul van der Maden
I figured it out :)

My configuration now looks like this:

  <plugin>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctor-maven-plugin</artifactId>
                <version>1.5.0</version>
                <dependencies>
                    <dependency>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctorj-pdf</artifactId>
                        <version>1.5.0-alpha.6</version>
                    </dependency>
                    <dependency>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctorj</artifactId>
                        <version>1.5.2</version>
                    </dependency>
                </dependencies>

                <configuration>
                    <sourceDirectory>${project.basedir}/src/docs</sourceDirectory>
                    <outputDirectory>target/classes/01.Documentatie</outputDirectory>


                    <attributes>
                        <sourcedir>${project.build.sourceDirectory}</sourcedir>
                        <version>APP-${project.version}</version>
                    </attributes>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-html-doc</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                        <configuration>
                            <backend>pdf</backend>
                           
                            <sourceHighlighter>coderay</sourceHighlighter>
                            <attributes>
                                <imagesdir>/</imagesdir>
                                <pagenums />
                                <toc />
                                <idprefix />
                                <idseparator>-</idseparator>
                            </attributes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

and it works like a charm.

Only thing not working is bulleted lists with a table cell when rendered to PDF. To html it works great.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: maven plugin keeps installing gems

mojavelinux
Administrator
Excellent!

Note that we need to update the Maven examples to demonstrate the use of the asciidoctorj-pdf jar. If you are feeling brave, we'd be glad to have your input.


Cheers,

-Dan

On Thu, Dec 11, 2014 at 2:47 AM, Paul van der Maden [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I figured it out :)

My configuration now looks like this:

  <plugin>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctor-maven-plugin</artifactId>
                <version>1.5.0</version>
                <dependencies>
                    <dependency>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctorj-pdf</artifactId>
                        <version>1.5.0-alpha.6</version>
                    </dependency>
                    <dependency>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctorj</artifactId>
                        <version>1.5.2</version>
                    </dependency>
                </dependencies>

                <configuration>
                    <sourceDirectory>${project.basedir}/src/docs</sourceDirectory>
                    <outputDirectory>target/classes/01.Documentatie</outputDirectory>


                    <attributes>
                        <sourcedir>${project.build.sourceDirectory}</sourcedir>
                        <version>APP-${project.version}</version>
                    </attributes>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-html-doc</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                        <configuration>
                            <backend>pdf</backend>
                           
                            <sourceHighlighter>coderay</sourceHighlighter>
                            <attributes>
                                <imagesdir>/</imagesdir>
                                <pagenums />
                                <toc />
                                <idprefix />
                                <idseparator>-</idseparator>
                            </attributes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

and it works like a charm.

Only thing not working is bulleted lists with a table cell when rendered to PDF. To html it works great.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/maven-plugin-keeps-installing-gems-tp2520p2525.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: maven plugin keeps installing gems

Paul van der Maden
Hi Dan,

I might have some time this week do this. Do you want me to submit an example project?

cheers,
Paul
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: maven plugin keeps installing gems

mojavelinux
Administrator
Paul,

That would be a huge help. If you want, you can simply revise the pdf example in that repository. Specifically:


Just switch to using asciidoctorj-pdf and cut out any references to rubygems and the torquebox repos.

Cheers,

-Dan

On Mon, Dec 15, 2014 at 1:31 AM, Paul van der Maden [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi Dan,

I might have some time this week do this. Do you want me to submit an example project?

cheers,
Paul


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/maven-plugin-keeps-installing-gems-tp2520p2545.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--