Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the scala variant just NPEs. #88

Closed
paulvi opened this issue Apr 19, 2016 · 10 comments
Closed

the scala variant just NPEs. #88

paulvi opened this issue Apr 19, 2016 · 10 comments

Comments

@paulvi
Copy link
Contributor

paulvi commented Apr 19, 2016

as tried by @talios in #82 (comment)

The simple project has this plugin defined:

  <plugin>
    <groupId>io.repaint.maven</groupId>
    <artifactId>tiles-maven-plugin</artifactId>
    <version>2.8</version>
    <extensions>true</extensions>
    <configuration>
      <tiles>
        <tile>com.smxemail.tiles:com.smxemail.tiles.release:[2.0.0,3.0.0)</tile>
        <tile>com.smxemail.tiles:com.smxemail.tiles.enforcements:[2.0.0,3.0.0)</tile>
        <tile>com.smxemail.tiles:com.smxemail.tiles.osgiservices:[2.0.0,3.0.0)</tile>
        <tile>com.smxemail.tiles:com.smxemail.tiles.karaffeature:[2.0.0,3.0.0)</tile>
      </tiles>
    </configuration>
  </plugin>

and the scala variant just NPEs.

@lefou
Copy link
Contributor

lefou commented Apr 19, 2016

Could you please show the complete project file so that others can reproduce the issue. Thanks.

@talios
Copy link

talios commented Apr 20, 2016

@lefou The entire project was:

<project
  xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.talios.test</groupId>
  <artifactId>polyglot-tiles</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>polyglot-tiles</name>
  <url>http://maven.apache.org</url>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>io.repaint.maven</groupId>
        <artifactId>tiles-maven-plugin</artifactId>
        <version>2.8</version>
        <extensions>true</extensions>
        <configuration>
          <tiles>
            <tile>com.smxemail.tiles:com.smxemail.tiles.release:[2.0.0,3.0.0)</tile>
            <tile>com.smxemail.tiles:com.smxemail.tiles.enforcements:[2.0.0,3.0.0)</tile>
            <tile>com.smxemail.tiles:com.smxemail.tiles.osgiservices:[2.0.0,3.0.0)</tile>
            <tile>com.smxemail.tiles:com.smxemail.tiles.karaffeature:[2.0.0,3.0.0)</tile>
          </tiles>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

You won't be able to resolve those tiles tho as their on our company nexus - not sure if the translator requires resolving the deps as well...

@lefou
Copy link
Contributor

lefou commented Apr 20, 2016

As you said, the translation to pom.scala is not reproducible without access to those tiles. Could you provide your pom.scala too?

@lefou
Copy link
Contributor

lefou commented Apr 20, 2016

I removed the 4 tiles from the pom.xml and can now reproduce the NPE.

lefou@x3 ~/work/tmp/tiles-polyglot $ mvn io.takari.polyglot:polyglot-translate-plugin:translate   -Dinput=pom.xml -Doutput=pom.scala
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building polyglot-tiles 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- polyglot-translate-plugin:0.1.10:translate (default-cli) @ polyglot-tiles ---
[INFO] Translating /home/lefou/work/tmp/tiles-polyglot/pom.xml -> /home/lefou/work/tmp/tiles-polyglot/pom.scala
[INFO] ------------------------------------------------------------------------                                                                                         
[INFO] BUILD FAILURE                                                                                                                                                    
[INFO] ------------------------------------------------------------------------                                                                                         
[INFO] Total time: 1.435 s                                                                                                                                              
[INFO] Finished at: 2016-04-20T12:29:51+02:00
[INFO] Final Memory: 16M/236M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.takari.polyglot:polyglot-translate-plugin:0.1.10:translate (default-cli) on project polyglot-tiles: Execution default-cli of goal io.takari.polyglot:polyglot-translate-plugin:0.1.10:translate failed. NullPointerException -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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
lefou@x3 ~/work/tmp/tiles-polyglot $ mvn io.takari.polyglot:polyglot-translate-plugin:translate   -Dinput=pom.xml -Doutput=pom.scala -X
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T13:57:37+02:00)
Maven home: /usr/share/maven-bin-3.3
Java version: 1.8.0_77, vendor: Oracle Corporation
Java home: /opt/oracle-jdk-bin-1.8.0.77/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "4.1.15-gentoo-r1", arch: "amd64", family: "unix"
[DEBUG] Reading global settings from /usr/share/maven-bin-3.3/conf/settings.xml
[DEBUG] Reading user settings from /home/lefou/.m2/settings.xml
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/lefou/.m2/repository
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, ConflictMarker.markTime=0, ConflictMarker.nodeCount=26, ConflictIdSorter.graphTime=1, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=14, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=3, ConflictResolver.conflictItemCount=25, DefaultDependencyCollector.collectTime=153, DefaultDependencyCollector.transformTime=7}
[DEBUG] io.takari.polyglot:polyglot-scala:jar:0.1.11:
[DEBUG]    io.takari.polyglot:polyglot-common:jar:0.1.11:compile
[DEBUG]    com.twitter:util-eval_2.10:jar:6.23.0:compile
[DEBUG]       org.scala-lang:scala-compiler:jar:2.10.4:compile
[DEBUG]       com.twitter:util-core_2.10:jar:6.23.0:compile
[DEBUG]    com.googlecode.kiama:kiama_2.10:jar:1.8.0:compile
[DEBUG]       com.google.code.findbugs:jsr305:jar:2.0.3:compile
[DEBUG]       com.google.guava:guava:jar:18.0:compile
[DEBUG]       org.bitbucket.inkytonik.dsinfo:dsinfo_2.10:jar:0.3.0:compile
[DEBUG]       org.bitbucket.inkytonik.dsprofile:dsprofile_2.10:jar:0.3.0:compile
[DEBUG]       org.rogach:scallop_2.10:jar:0.9.5:compile
[DEBUG]       org.scala-lang:scala-reflect:jar:2.10.4:compile
[DEBUG]       jline:jline:jar:2.12:compile
[DEBUG]    org.scala-lang:scala-library:jar:2.10.5:compile
[DEBUG] Populating class realm coreExtension>io.takari.polyglot:polyglot-scala:0.1.11
[DEBUG]   Included /home/lefou/.m2/repository/io/takari/polyglot/polyglot-scala/0.1.11/polyglot-scala-0.1.11.jar
[DEBUG]   Included /home/lefou/.m2/repository/io/takari/polyglot/polyglot-common/0.1.11/polyglot-common-0.1.11.jar
[DEBUG]   Included /home/lefou/.m2/repository/com/twitter/util-eval_2.10/6.23.0/util-eval_2.10-6.23.0.jar
[DEBUG]   Included /home/lefou/.m2/repository/org/scala-lang/scala-compiler/2.10.4/scala-compiler-2.10.4.jar
[DEBUG]   Included /home/lefou/.m2/repository/com/twitter/util-core_2.10/6.23.0/util-core_2.10-6.23.0.jar
[DEBUG]   Included /home/lefou/.m2/repository/com/googlecode/kiama/kiama_2.10/1.8.0/kiama_2.10-1.8.0.jar
[DEBUG]   Included /home/lefou/.m2/repository/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
[DEBUG]   Included /home/lefou/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar
[DEBUG]   Included /home/lefou/.m2/repository/org/bitbucket/inkytonik/dsinfo/dsinfo_2.10/0.3.0/dsinfo_2.10-0.3.0.jar
[DEBUG]   Included /home/lefou/.m2/repository/org/bitbucket/inkytonik/dsprofile/dsprofile_2.10/0.3.0/dsprofile_2.10-0.3.0.jar
[DEBUG]   Included /home/lefou/.m2/repository/org/rogach/scallop_2.10/0.9.5/scallop_2.10-0.9.5.jar
[DEBUG]   Included /home/lefou/.m2/repository/org/scala-lang/scala-reflect/2.10.4/scala-reflect-2.10.4.jar
[DEBUG]   Included /home/lefou/.m2/repository/jline/jline/2.12/jline-2.12.jar
[DEBUG]   Included /home/lefou/.m2/repository/org/scala-lang/scala-library/2.10.5/scala-library-2.10.5.jar
[DEBUG] Populating class realm maven.ext
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG]   Imported: javax.enterprise.inject.* < maven.ext
[DEBUG]   Imported: javax.enterprise.util.* < maven.ext
[DEBUG]   Imported: javax.inject.* < maven.ext
[DEBUG]   Imported: org.apache.maven.* < maven.ext
[DEBUG]   Imported: org.apache.maven.artifact < maven.ext
[DEBUG]   Imported: org.apache.maven.classrealm < maven.ext
[DEBUG]   Imported: org.apache.maven.cli < maven.ext
[DEBUG]   Imported: org.apache.maven.configuration < maven.ext
[DEBUG]   Imported: org.apache.maven.exception < maven.ext
[DEBUG]   Imported: org.apache.maven.execution < maven.ext
[DEBUG]   Imported: org.apache.maven.execution.scope < maven.ext
[DEBUG]   Imported: org.apache.maven.lifecycle < maven.ext
[DEBUG]   Imported: org.apache.maven.model < maven.ext
[DEBUG]   Imported: org.apache.maven.monitor < maven.ext
[DEBUG]   Imported: org.apache.maven.plugin < maven.ext
[DEBUG]   Imported: org.apache.maven.profiles < maven.ext
[DEBUG]   Imported: org.apache.maven.project < maven.ext
[DEBUG]   Imported: org.apache.maven.reporting < maven.ext
[DEBUG]   Imported: org.apache.maven.repository < maven.ext
[DEBUG]   Imported: org.apache.maven.rtinfo < maven.ext
[DEBUG]   Imported: org.apache.maven.settings < maven.ext
[DEBUG]   Imported: org.apache.maven.toolchain < maven.ext
[DEBUG]   Imported: org.apache.maven.usability < maven.ext
[DEBUG]   Imported: org.apache.maven.wagon.* < maven.ext
[DEBUG]   Imported: org.apache.maven.wagon.authentication < maven.ext
[DEBUG]   Imported: org.apache.maven.wagon.authorization < maven.ext
[DEBUG]   Imported: org.apache.maven.wagon.events < maven.ext
[DEBUG]   Imported: org.apache.maven.wagon.observers < maven.ext
[DEBUG]   Imported: org.apache.maven.wagon.proxy < maven.ext
[DEBUG]   Imported: org.apache.maven.wagon.repository < maven.ext
[DEBUG]   Imported: org.apache.maven.wagon.resource < maven.ext
[DEBUG]   Imported: org.codehaus.classworlds < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.* < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.classworlds < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.component < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.configuration < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.container < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.context < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.lifecycle < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.logging < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.personality < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < maven.ext
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < maven.ext
[DEBUG]   Imported: org.eclipse.aether.* < maven.ext
[DEBUG]   Imported: org.eclipse.aether.artifact < maven.ext
[DEBUG]   Imported: org.eclipse.aether.collection < maven.ext
[DEBUG]   Imported: org.eclipse.aether.deployment < maven.ext
[DEBUG]   Imported: org.eclipse.aether.graph < maven.ext
[DEBUG]   Imported: org.eclipse.aether.impl < maven.ext
[DEBUG]   Imported: org.eclipse.aether.installation < maven.ext
[DEBUG]   Imported: org.eclipse.aether.internal.impl < maven.ext
[DEBUG]   Imported: org.eclipse.aether.metadata < maven.ext
[DEBUG]   Imported: org.eclipse.aether.repository < maven.ext
[DEBUG]   Imported: org.eclipse.aether.resolution < maven.ext
[DEBUG]   Imported: org.eclipse.aether.spi < maven.ext
[DEBUG]   Imported: org.eclipse.aether.transfer < maven.ext
[DEBUG]   Imported: org.eclipse.aether.version < maven.ext
[DEBUG]   Imported: org.slf4j.* < maven.ext
[DEBUG]   Imported: org.slf4j.spi.* < maven.ext
[DEBUG]   Imported: org.sonatype.maven.polyglot < maven.ext
[DEBUG]   Imported: org.sonatype.maven.polyglot.execute < maven.ext
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven-bin-3.3/conf/settings.xml
[DEBUG] Reading user settings from /home/lefou/.m2/settings.xml
[DEBUG] Reading global toolchains from /usr/share/maven-bin-3.3/conf/toolchains.xml
[DEBUG] Reading user toolchains from /home/lefou/.m2/toolchains.xml
[DEBUG] Using local repository at /home/lefou/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /home/lefou/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=1, ConflictMarker.nodeCount=152, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=55, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=6, ConflictResolver.conflictItemCount=104, DefaultDependencyCollector.collectTime=347, DefaultDependencyCollector.transformTime=7}
[DEBUG] io.repaint.maven:tiles-maven-plugin:jar:2.8:
[DEBUG]    org.codehaus.groovy:groovy-all:jar:2.4.6:compile
[DEBUG]    org.apache.maven:maven-core:jar:3.3.3:compile
[DEBUG]       org.apache.maven:maven-model:jar:3.3.3:compile
[DEBUG]       org.apache.maven:maven-settings:jar:3.3.3:compile
[DEBUG]       org.apache.maven:maven-settings-builder:jar:3.3.3:compile
[DEBUG]          org.apache.maven:maven-builder-support:jar:3.3.3:compile
[DEBUG]       org.apache.maven:maven-repository-metadata:jar:3.3.3:compile
[DEBUG]       org.apache.maven:maven-artifact:jar:3.3.3:compile
[DEBUG]       org.apache.maven:maven-plugin-api:jar:3.3.3:compile
[DEBUG]       org.apache.maven:maven-model-builder:jar:3.3.3:compile
[DEBUG]          com.google.guava:guava:jar:18.0:compile
[DEBUG]       org.apache.maven:maven-aether-provider:jar:3.3.3:compile
[DEBUG]          org.eclipse.aether:aether-spi:jar:1.0.2.v20150114:compile
[DEBUG]       org.eclipse.aether:aether-impl:jar:1.0.2.v20150114:compile
[DEBUG]       org.eclipse.aether:aether-api:jar:1.0.2.v20150114:compile
[DEBUG]       org.eclipse.aether:aether-util:jar:1.0.2.v20150114:compile
[DEBUG]       org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.0:compile
[DEBUG]          javax.enterprise:cdi-api:jar:1.0:compile
[DEBUG]             javax.annotation:jsr250-api:jar:1.0:compile
[DEBUG]          org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.0:compile
[DEBUG]       org.sonatype.sisu:sisu-guice:jar:no_aop:3.2.5:compile
[DEBUG]          javax.inject:javax.inject:jar:1:compile
[DEBUG]          aopalliance:aopalliance:jar:1.0:compile
[DEBUG]       org.codehaus.plexus:plexus-interpolation:jar:1.21:compile
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:3.0.20:compile
[DEBUG]       org.codehaus.plexus:plexus-classworlds:jar:2.5.2:compile
[DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG]       org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
[DEBUG]          org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[DEBUG]    org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.4:compile
[DEBUG]    org.apache.maven.shared:maven-filtering:jar:1.3:compile
[DEBUG]       org.apache.maven:maven-project:jar:2.2.1:compile
[DEBUG]          org.apache.maven:maven-profile:jar:2.2.1:compile
[DEBUG]          org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
[DEBUG]             backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
[DEBUG]          org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
[DEBUG]          org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG]             junit:junit:jar:3.8.1:compile
[DEBUG]             classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG]       org.apache.maven.shared:maven-shared-utils:jar:0.6:compile
[DEBUG]          com.google.code.findbugs:jsr305:jar:2.0.1:compile
[DEBUG]       org.sonatype.plexus:plexus-build-api:jar:0.0.4:compile
[DEBUG] Created new class realm extension>io.repaint.maven:tiles-maven-plugin:2.8
[DEBUG] Importing foreign packages into class realm extension>io.repaint.maven:tiles-maven-plugin:2.8
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm extension>io.repaint.maven:tiles-maven-plugin:2.8
[DEBUG]   Included: io.repaint.maven:tiles-maven-plugin:jar:2.8
[DEBUG]   Included: org.codehaus.groovy:groovy-all:jar:2.4.6
[DEBUG]   Included: org.apache.maven:maven-builder-support:jar:3.3.3
[DEBUG]   Included: com.google.guava:guava:jar:18.0
[DEBUG]   Included: org.eclipse.aether:aether-util:jar:1.0.2.v20150114
[DEBUG]   Included: javax.enterprise:cdi-api:jar:1.0
[DEBUG]   Included: javax.annotation:jsr250-api:jar:1.0
[DEBUG]   Included: org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.0
[DEBUG]   Included: org.sonatype.sisu:sisu-guice:jar:no_aop:3.2.5
[DEBUG]   Included: aopalliance:aopalliance:jar:1.0
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.21
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.0.20
[DEBUG]   Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
[DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
[DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4
[DEBUG]   Included: org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.4
[DEBUG]   Included: org.apache.maven.shared:maven-filtering:jar:1.3
[DEBUG]   Included: backport-util-concurrent:backport-util-concurrent:jar:3.1
[DEBUG]   Included: junit:junit:jar:3.8.1
[DEBUG]   Included: org.apache.maven.shared:maven-shared-utils:jar:0.6
[DEBUG]   Included: com.google.code.findbugs:jsr305:jar:2.0.1
[DEBUG]   Included: org.sonatype.plexus:plexus-build-api:jar:0.0.4
[DEBUG] Extension realms for project com.talios.test:polyglot-tiles:jar:1.0-SNAPSHOT: [ClassRealm[extension>io.repaint.maven:tiles-maven-plugin:2.8, parent: sun.misc.Launcher$AppClassLoader@70dea4e]]
[DEBUG] Created new class realm project>com.talios.test:polyglot-tiles:1.0-SNAPSHOT
[DEBUG] Populating class realm project>com.talios.test:polyglot-tiles:1.0-SNAPSHOT
[DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[project>com.talios.test:polyglot-tiles:1.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]
[DEBUG] Resolving plugin version for io.takari.polyglot:polyglot-translate-plugin
[DEBUG] Skipped remote request for io.takari.polyglot:polyglot-translate-plugin/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Resolved plugin version for io.takari.polyglot:polyglot-translate-plugin to 0.1.10 from repository central (https://repo.maven.apache.org/maven2, default, releases)
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com.talios.test:polyglot-tiles:jar:1.0-SNAPSHOT
[DEBUG] Tasks:   [io.takari.polyglot:polyglot-translate-plugin:translate]
[DEBUG] Style:   Aggregating
[DEBUG] =======================================================================
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building polyglot-tiles 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[DEBUG] Resolving plugin version for io.takari.polyglot:polyglot-translate-plugin
[DEBUG] Skipped remote request for io.takari.polyglot:polyglot-translate-plugin/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Resolved plugin version for io.takari.polyglot:polyglot-translate-plugin to 0.1.10 from repository central (https://repo.maven.apache.org/maven2, default, releases)
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project:       com.talios.test:polyglot-tiles:1.0-SNAPSHOT
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): []
[DEBUG] Repositories (dependencies): [central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] Repositories (plugins)     : [central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal:          io.takari.polyglot:polyglot-translate-plugin:0.1.10:translate (default-cli)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <input>${input}</input>
  <output>${output}</output>
</configuration>
[DEBUG] =======================================================================
[INFO] 
[INFO] --- polyglot-translate-plugin:0.1.10:translate (default-cli) @ polyglot-tiles ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=1, ConflictMarker.nodeCount=77, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=48, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, ConflictResolver.conflictItemCount=76, DefaultDependencyCollector.collectTime=110, DefaultDependencyCollector.transformTime=3}
[DEBUG] io.takari.polyglot:polyglot-translate-plugin:jar:0.1.10:
[DEBUG]    io.takari.polyglot:polyglot-common:jar:0.1.10:compile
[DEBUG]    io.takari.polyglot:polyglot-ruby:jar:0.1.10:compile
[DEBUG]       org.jruby:jruby-noasm:pom:1.7.20:compile
[DEBUG]          org.jruby:jruby-core:jar:noasm:1.7.20:compile
[DEBUG]             org.jruby.joni:joni:jar:2.1.3:compile
[DEBUG]             com.github.jnr:jnr-netdb:jar:1.1.2:compile
[DEBUG]             com.github.jnr:jnr-enxio:jar:0.9:compile
[DEBUG]             com.github.jnr:jnr-x86asm:jar:1.0.2:compile
[DEBUG]             com.github.jnr:jnr-unixsocket:jar:0.8:compile
[DEBUG]             com.github.jnr:jnr-posix:jar:3.0.12:compile
[DEBUG]             org.jruby.extras:bytelist:jar:1.0.11:compile
[DEBUG]             com.github.jnr:jnr-constants:jar:0.8.7:compile
[DEBUG]             org.jruby.jcodings:jcodings:jar:1.0.13:compile
[DEBUG]             com.github.jnr:jffi:jar:1.2.9:compile
[DEBUG]             com.github.jnr:jffi:jar:native:1.2.9:compile
[DEBUG]             com.jcraft:jzlib:jar:1.1.3:compile
[DEBUG]             com.headius:invokebinder:jar:1.2:compile
[DEBUG]             com.martiansoftware:nailgun-server:jar:0.9.1:compile
[DEBUG]             org.jruby:yecht:jar:1.0:compile
[DEBUG]             joda-time:joda-time:jar:2.5:compile
[DEBUG]             com.headius:options:jar:1.2:compile
[DEBUG]          org.jruby:jruby-stdlib:jar:1.7.20:compile
[DEBUG]    io.takari.polyglot:polyglot-groovy:jar:0.1.10:compile
[DEBUG]       org.codehaus.groovy:groovy:jar:1.7.3:compile
[DEBUG]          antlr:antlr:jar:2.7.7:compile
[DEBUG]          asm:asm:jar:3.2:compile
[DEBUG]          asm:asm-commons:jar:3.2:compile
[DEBUG]          asm:asm-util:jar:3.2:compile
[DEBUG]          asm:asm-analysis:jar:3.2:compile
[DEBUG]          asm:asm-tree:jar:3.2:compile
[DEBUG]       commons-logging:commons-logging:jar:1.1.1:compile
[DEBUG]    io.takari.polyglot:polyglot-atom:jar:0.1.10:compile
[DEBUG]    io.takari.polyglot:polyglot-scala:jar:0.1.10:compile
[DEBUG]       com.twitter:util-eval_2.10:jar:6.23.0:compile
[DEBUG]          org.scala-lang:scala-compiler:jar:2.10.4:compile
[DEBUG]          com.twitter:util-core_2.10:jar:6.23.0:compile
[DEBUG]       com.googlecode.kiama:kiama_2.10:jar:1.8.0:compile
[DEBUG]          com.google.code.findbugs:jsr305:jar:2.0.3:compile
[DEBUG]          com.google.guava:guava:jar:18.0:compile
[DEBUG]          org.bitbucket.inkytonik.dsinfo:dsinfo_2.10:jar:0.3.0:compile
[DEBUG]          org.bitbucket.inkytonik.dsprofile:dsprofile_2.10:jar:0.3.0:compile
[DEBUG]          org.rogach:scallop_2.10:jar:0.9.5:compile
[DEBUG]          org.scala-lang:scala-reflect:jar:2.10.4:compile
[DEBUG]          jline:jline:jar:2.12:compile
[DEBUG]       org.scala-lang:scala-library:jar:2.10.5:compile
[DEBUG]    io.takari.polyglot:polyglot-yaml:jar:0.1.10:compile
[DEBUG]       org.yaml:snakeyaml:jar:1.4:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:1.1:runtime
[DEBUG] Created new class realm plugin>io.takari.polyglot:polyglot-translate-plugin:0.1.10
[DEBUG] Importing foreign packages into class realm plugin>io.takari.polyglot:polyglot-translate-plugin:0.1.10
[DEBUG]   Imported:  < project>com.talios.test:polyglot-tiles:1.0-SNAPSHOT
[DEBUG] Populating class realm plugin>io.takari.polyglot:polyglot-translate-plugin:0.1.10
[DEBUG]   Included: io.takari.polyglot:polyglot-translate-plugin:jar:0.1.10
[DEBUG]   Included: io.takari.polyglot:polyglot-ruby:jar:0.1.10
[DEBUG]   Included: org.jruby:jruby-noasm:pom:1.7.20
[DEBUG]   Included: org.jruby:jruby-core:jar:noasm:1.7.20
[DEBUG]   Included: org.jruby.joni:joni:jar:2.1.3
[DEBUG]   Included: com.github.jnr:jnr-netdb:jar:1.1.2
[DEBUG]   Included: com.github.jnr:jnr-enxio:jar:0.9
[DEBUG]   Included: com.github.jnr:jnr-x86asm:jar:1.0.2
[DEBUG]   Included: com.github.jnr:jnr-unixsocket:jar:0.8
[DEBUG]   Included: com.github.jnr:jnr-posix:jar:3.0.12
[DEBUG]   Included: org.jruby.extras:bytelist:jar:1.0.11
[DEBUG]   Included: com.github.jnr:jnr-constants:jar:0.8.7
[DEBUG]   Included: org.jruby.jcodings:jcodings:jar:1.0.13
[DEBUG]   Included: com.github.jnr:jffi:jar:1.2.9
[DEBUG]   Included: com.github.jnr:jffi:jar:native:1.2.9
[DEBUG]   Included: com.jcraft:jzlib:jar:1.1.3
[DEBUG]   Included: com.headius:invokebinder:jar:1.2
[DEBUG]   Included: com.martiansoftware:nailgun-server:jar:0.9.1
[DEBUG]   Included: org.jruby:yecht:jar:1.0
[DEBUG]   Included: joda-time:joda-time:jar:2.5
[DEBUG]   Included: com.headius:options:jar:1.2
[DEBUG]   Included: org.jruby:jruby-stdlib:jar:1.7.20
[DEBUG]   Included: io.takari.polyglot:polyglot-groovy:jar:0.1.10
[DEBUG]   Included: org.codehaus.groovy:groovy:jar:1.7.3
[DEBUG]   Included: antlr:antlr:jar:2.7.7
[DEBUG]   Included: asm:asm:jar:3.2
[DEBUG]   Included: asm:asm-commons:jar:3.2
[DEBUG]   Included: asm:asm-util:jar:3.2
[DEBUG]   Included: asm:asm-analysis:jar:3.2
[DEBUG]   Included: asm:asm-tree:jar:3.2
[DEBUG]   Included: commons-logging:commons-logging:jar:1.1.1
[DEBUG]   Included: io.takari.polyglot:polyglot-atom:jar:0.1.10
[DEBUG]   Included: io.takari.polyglot:polyglot-scala:jar:0.1.10
[DEBUG]   Included: com.twitter:util-eval_2.10:jar:6.23.0
[DEBUG]   Included: org.scala-lang:scala-compiler:jar:2.10.4
[DEBUG]   Included: com.twitter:util-core_2.10:jar:6.23.0
[DEBUG]   Included: com.googlecode.kiama:kiama_2.10:jar:1.8.0
[DEBUG]   Included: com.google.code.findbugs:jsr305:jar:2.0.3
[DEBUG]   Included: com.google.guava:guava:jar:18.0
[DEBUG]   Included: org.bitbucket.inkytonik.dsinfo:dsinfo_2.10:jar:0.3.0
[DEBUG]   Included: org.bitbucket.inkytonik.dsprofile:dsprofile_2.10:jar:0.3.0
[DEBUG]   Included: org.rogach:scallop_2.10:jar:0.9.5
[DEBUG]   Included: org.scala-lang:scala-reflect:jar:2.10.4
[DEBUG]   Included: jline:jline:jar:2.12
[DEBUG]   Included: org.scala-lang:scala-library:jar:2.10.5
[DEBUG]   Included: io.takari.polyglot:polyglot-yaml:jar:0.1.10
[DEBUG]   Included: org.yaml:snakeyaml:jar:1.4
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:1.1
[DEBUG] Configuring mojo io.takari.polyglot:polyglot-translate-plugin:0.1.10:translate from plugin realm ClassRealm[plugin>io.takari.polyglot:polyglot-translate-plugin:0.1.10, parent: sun.misc.Launcher$AppClassLoader@70dea4e]
[DEBUG] Configuring mojo 'io.takari.polyglot:polyglot-translate-plugin:0.1.10:translate' with basic configurator -->
[DEBUG]   (f) input = /home/lefou/work/tmp/tiles-polyglot/pom.xml
[DEBUG]   (f) output = /home/lefou/work/tmp/tiles-polyglot/pom.scala
[DEBUG] -- end configuration --
[INFO] Translating /home/lefou/work/tmp/tiles-polyglot/pom.xml -> /home/lefou/work/tmp/tiles-polyglot/pom.scala
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.457 s
[INFO] Finished at: 2016-04-20T12:30:42+02:00
[INFO] Final Memory: 17M/297M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.takari.polyglot:polyglot-translate-plugin:0.1.10:translate (default-cli) on project polyglot-tiles: Execution default-cli of goal io.takari.polyglot:polyglot-translate-plugin:0.1.10:translate failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.takari.polyglot:polyglot-translate-plugin:0.1.10:translate (default-cli) on project polyglot-tiles: Execution default-cli of goal io.takari.polyglot:polyglot-translate-plugin:0.1.10:translate failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
        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:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal io.takari.polyglot:polyglot-translate-plugin:0.1.10:translate failed.
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 20 more
Caused by: java.lang.NullPointerException
        at org.kiama.output.PrettyPrinter$$anonfun$text$1.apply(PrettyPrinter.scala:1004)
        at org.kiama.output.PrettyPrinter$$anonfun$text$1.apply(PrettyPrinter.scala:1003)
        at org.kiama.output.PrettyPrinter$Doc.apply(PrettyPrinter.scala:978)
        at org.kiama.output.PrettyPrinter$Doc$$anonfun$$less$greater$1$$anonfun$apply$31$$anonfun$apply$32.apply(PrettyPrinter.scala:988)
        at org.kiama.output.PrettyPrinter$Doc$$anonfun$$less$greater$1$$anonfun$apply$31$$anonfun$apply$32.apply(PrettyPrinter.scala:986)
        at org.kiama.util.Trampolines$Trampoline$$anonfun$resume$1.apply(Trampolines.scala:59)
        at org.kiama.util.Trampolines$Trampoline$$anonfun$resume$1.apply(Trampolines.scala:59)
        at org.kiama.util.Trampolines$Trampoline.runT(Trampolines.scala:47)
        at org.kiama.output.PrettyPrinter$class.pretty(PrettyPrinter.scala:1112)
        at org.sonatype.maven.polyglot.scala.ScalaPrettyPrinter$.pretty(ScalaModelWriter.scala:23)
        at org.sonatype.maven.polyglot.scala.ScalaModelWriter.write(ScalaModelWriter.scala:296)
        at org.sonatype.maven.polyglot.io.ModelWriterSupport.write(ModelWriterSupport.java:47)
        at org.sonatype.maven.polyglot.TeslaModelTranslator.translate(TeslaModelTranslator.java:116)
        at org.sonatype.maven.polyglot.TeslaModelTranslator.translate(TeslaModelTranslator.java:99)
        at org.sonatype.maven.polyglot.TeslaModelTranslator.translate(TeslaModelTranslator.java:83)
        at io.takari.maven.polyglot.TranslatorMojo.translate(TranslatorMojo.java:54)
        at io.takari.maven.polyglot.TranslatorMojo.translate(TranslatorMojo.java:50)
        at io.takari.maven.polyglot.TranslatorMojo.execute(TranslatorMojo.java:43)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        ... 21 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

@lefou
Copy link
Contributor

lefou commented Apr 20, 2016

If you add the following line at the beginning of the pom.xml, the translation works as expected.

<?xml version="1.0" encoding="UTF-8"?>

@paulvi
Copy link
Contributor Author

paulvi commented Apr 20, 2016

@lefou Tobias, well, I guess both @talios Mark and me are looking not for how make build/translation to pass, but to make sure it works and/or all users knows how to overcome an error.

And NullPointerException is the least informative message.

BTW, @lefou where you looking into the sources/adding commits ?

Also take a look at #84 (translate without project, build, etc blocks)

@talios
Copy link

talios commented Apr 20, 2016

@lefou Good to know ( altho that's how the mvn archetype generated the file ).

@cstroe
Copy link
Contributor

cstroe commented Nov 24, 2016

I am able to reproduce the NPE while translating this pom.xml.

Running:

./mvnw -e io.takari.polyglot:polyglot-translate-plugin:translate \
  -Dinput=pom.xml -Doutput=pom.scala

in the AgreementMaker-OSGi directory produces:

[ERROR] Failed to execute goal io.takari.polyglot:polyglot-translate-plugin:0.1.19:translate (default-cli) on project AgreementMaker-OSGi: Execution default-cli of goal io.takari.polyglot:polyglot-translate-plugin:0.1.19:translate failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.takari.polyglot:polyglot-translate-plugin:0.1.19:translate (default-cli) on project AgreementMaker-OSGi: Execution default-cli of goal io.takari.polyglot:polyglot-translate-plugin:0.1.19:translate failed.
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	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:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
	at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
	at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal io.takari.polyglot:polyglot-translate-plugin:0.1.19:translate failed.
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 27 more
Caused by: java.lang.NullPointerException
	at org.kiama.output.PrettyPrinter$$anonfun$text$1.apply(PrettyPrinter.scala:1004)
	at org.kiama.output.PrettyPrinter$$anonfun$text$1.apply(PrettyPrinter.scala:1003)
	at org.kiama.output.PrettyPrinter$Doc.apply(PrettyPrinter.scala:978)
	at org.kiama.output.PrettyPrinter$Doc$$anonfun$$less$greater$1$$anonfun$apply$31$$anonfun$apply$32.apply(PrettyPrinter.scala:988)
	at org.kiama.output.PrettyPrinter$Doc$$anonfun$$less$greater$1$$anonfun$apply$31$$anonfun$apply$32.apply(PrettyPrinter.scala:986)
	at org.kiama.util.Trampolines$Trampoline$$anonfun$resume$1.apply(Trampolines.scala:59)
	at org.kiama.util.Trampolines$Trampoline$$anonfun$resume$1.apply(Trampolines.scala:59)
	at org.kiama.util.Trampolines$Trampoline.runT(Trampolines.scala:47)
	at org.kiama.output.PrettyPrinter$class.pretty(PrettyPrinter.scala:1112)
	at org.sonatype.maven.polyglot.scala.ScalaPrettyPrinter$.pretty(ScalaModelWriter.scala:23)
	at org.sonatype.maven.polyglot.scala.ScalaModelWriter.write(ScalaModelWriter.scala:296)
	at org.sonatype.maven.polyglot.io.ModelWriterSupport.write(ModelWriterSupport.java:47)
	at org.sonatype.maven.polyglot.io.ModelWriterSupport.write(ModelWriterSupport.java:36)
	at org.sonatype.maven.polyglot.TeslaModelTranslator.translate(TeslaModelTranslator.java:70)
	at org.sonatype.maven.polyglot.TeslaModelTranslator.translate(TeslaModelTranslator.java:56)
	at io.takari.maven.polyglot.TranslatorMojo.execute(TranslatorMojo.java:51)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	... 28 more

The pom file has:

<?xml version="1.0" encoding="UTF-8"?>

at the top.

@szantopeter
Copy link
Contributor

@cstroe the pom you reference is failing, because it's child module's pom.xml doesn't contain the XML header

@lefou
Copy link
Contributor

lefou commented Aug 31, 2017

This is fixed by #130.

@mosabua mosabua closed this as completed Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants