Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
    • Number of attachments :
      0

      Description

      I'm trying to run the latex plugin to create pdf via pdflatex.

      The following is the pom snippet to configure the plugin:

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>latex-maven-plugin</artifactId>
          <version>1.1</version>
          <executions>
            <execution>
              <phase>pre-site</phase>
              <goals>
                <goal>latex</goal>
              </goals>
              <configuration>
                <binariesPath>/usr/bin/pdflatex</binariesPath>
                <docsRoot>${project.build.directory}/generated-site/latex/maui-guide/maui-guide.tex</docsRoot>
                <latexBuildDir>${project.build.directory}/generated-site/latex/maui-guide/</latexBuildDir>
              </configuration>
            </execution>
          </executions>
        </plugin>
      

      which results into the following error message if i do a mvn clean site (-X option)

      [INFO] 
      [INFO] --- latex-maven-plugin:1.1:latex (default) @ maui ---
      [DEBUG] org.codehaus.mojo:latex-maven-plugin:jar:1.1:
      [DEBUG]    org.apache.maven:maven-plugin-api:jar:2.0.2:compile
      [DEBUG]    org.apache.commons:commons-exec:jar:1.0.1:compile
      [DEBUG]    org.apache.commons:commons-io:jar:1.3.2:compile
      [DEBUG]    org.codehaus.plexus:plexus-utils:jar:1.1:runtime
      [DEBUG] Created new class realm plugin>org.codehaus.mojo:latex-maven-plugin:1.1
      [DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:latex-maven-plugin:1.1
      [DEBUG]   Imported:  < project>com.soebes.maven.guide:maui:0.1-SNAPSHOT
      [DEBUG] Populating class realm plugin>org.codehaus.mojo:latex-maven-plugin:1.1
      [DEBUG]   Included: org.codehaus.mojo:latex-maven-plugin:jar:1.1
      [DEBUG]   Included: org.apache.commons:commons-exec:jar:1.0.1
      [DEBUG]   Included: org.apache.commons:commons-io:jar:1.3.2
      [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:1.1
      [DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.2
      [DEBUG] Configuring mojo org.codehaus.mojo:latex-maven-plugin:1.1:latex from plugin realm ClassRealm[plugin>org.codehaus.mojo:latex-maven-plugin:1.1, parent: sun.misc.Launcher$AppClassLoader@1a16869]
      [DEBUG] Configuring mojo 'org.codehaus.mojo:latex-maven-plugin:1.1:latex' with basic configurator -->
      [DEBUG]   (f) binariesPath = /usr/bin/pdflatex
      [DEBUG]   (f) buildDir = /home/kama/ws-git/maui/target
      [DEBUG]   (f) commonsDirName = common
      [DEBUG]   (f) docsRoot = /home/kama/ws-git/maui/target/generated-site/latex/maui-guide/maui-guide.tex
      [DEBUG]   (f) latexBuildDir = /home/kama/ws-git/maui/target/generated-site/latex/maui-guide
      [DEBUG] -- end configuration --
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 7.908s
      [INFO] Finished at: Sat May 28 22:00:06 CEST 2011
      [INFO] Final Memory: 22M/252M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.codehaus.mojo:latex-maven-plugin:1.1:latex (default) on project maui: Execution default of goal org.codehaus.mojo:latex-maven-plugin:1.1:latex failed. NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:latex-maven-plugin:1.1:latex (default) on project maui: Execution default of goal org.codehaus.mojo:latex-maven-plugin:1.1:latex failed.
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.codehaus.mojo:latex-maven-plugin:1.1:latex failed.
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      	... 19 more
      Caused by: java.lang.NullPointerException
      	at org.codehaus.mojo.latex.LaTeXMojo.prepareLaTeXBuildDirectories(LaTeXMojo.java:201)
      	at org.codehaus.mojo.latex.LaTeXMojo.execute(LaTeXMojo.java:95)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      	... 20 more
      [ERROR] 
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
      

      The full code of the project can be reached via https://github.com/khmarbaise/maui

        Activity

        Hide
        Karl-Heinz Marbaise added a comment -

        I found out after diving into the source code of the plugin that it was intended to convert a number of latex files instead of a single one which couldn't be defined by docRoots...which must be a directory instead of a file. This might be documented in a better way into the documentation of the plugin.

        Show
        Karl-Heinz Marbaise added a comment - I found out after diving into the source code of the plugin that it was intended to convert a number of latex files instead of a single one which couldn't be defined by docRoots...which must be a directory instead of a file. This might be documented in a better way into the documentation of the plugin.
        Hide
        Michael added a comment -

        the NPE is still a bug.
        I've got a patch for that.
        Where can I send it to?

        Show
        Michael added a comment - the NPE is still a bug. I've got a patch for that. Where can I send it to?

          People

          • Assignee:
            Unassigned
            Reporter:
            Karl-Heinz Marbaise
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: