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

mysterious encoding during flatten:flatten #16

Closed
m50d opened this issue Mar 12, 2018 · 13 comments
Closed

mysterious encoding during flatten:flatten #16

m50d opened this issue Mar 12, 2018 · 13 comments

Comments

@m50d
Copy link

m50d commented Mar 12, 2018

"character 27 is not allowed in output" build error

Similar failures with the master and develop branches, using the included mvnw or system maven:

C:\Users\md401\eclipse-workspace\scalor-maven-plugin>mvnw install
[INFO] Arkon: provisioning...
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.carrotgarden.maven:scalor-maven-plugin_2.12:maven-plugin:1.3.3.20180312170837
[WARNING] 'build.plugins.plugin.version' for com.carrotgarden.maven:scalor-maven-plugin_2.12 is missing. @ com.carrotgarden.maven:scalor-maven-plugin:0-SNAPSHOT, C:\Users\md401\eclipse-workspace\scalor-maven-plugin\pom.xml, line 433, column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.carrotgarden.maven:scalor-maven-plugin:pom:0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for com.carrotgarden.maven:scalor-maven-plugin_2.12 is missing. @ line 433, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Scalor Maven Plugin
[INFO] Scalor Maven Plugin 2.12
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Scalor Maven Plugin 0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.scala-ide:org.scala-ide.sdt.core:jar:4.7.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:eclipse-config (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:register-macro (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:register-main (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:register-test (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:compile-macro (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:compile-main (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:compile-test (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- maven-plugin-plugin:3.5:descriptor (default-descriptor) @ scalor-maven-plugin ---
[WARNING] Unsupported packaging type pom, execution skipped
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:eclipse-prescomp (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- flatten-maven-plugin:1.3.20180210195103:flatten (default) @ scalor-maven-plugin ---
[INFO] Resolving dependencies.
[INFO] Can't extract module name from scala-xml_2.12-1.1.0.jar: scala.xml.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Can't extract module name from scalajs-tools_2.12-0.6.22.jar: scalajs.tools.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Can't extract module name from zinc_2.12-1.1.1.jar: zinc.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Can't extract module name from upickle_2.12-0.5.1.jar: upickle.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Can't extract module name from scalariform_2.12-0.2.6.jar: scalariform.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Can't extract module name from compiler-bridge_2.12-1.1.1.jar: compiler.bridge.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Removing pom.xml model members.
[ERROR] C:\Users\md401\eclipse-workspace\scalor-maven-plugin\pom.xml [1:1]: Flatten failure
java.lang.IllegalStateException: character 27 is not allowed in output
    at org.codehaus.plexus.util.xml.pull.MXSerializer.writeElementContent (MXSerializer.java:1191)
    at org.codehaus.plexus.util.xml.pull.MXSerializer.text (MXSerializer.java:958)
    at org.apache.maven.model.io.xpp3.MavenXpp3Writer.writeDependency (MavenXpp3Writer.java:572)
    at org.apache.maven.model.io.xpp3.MavenXpp3Writer.writeModel (MavenXpp3Writer.java:1108)
    at org.apache.maven.model.io.xpp3.MavenXpp3Writer.write (MavenXpp3Writer.java:115)
    at com.carrotgarden.maven.flatten.FlattenMojo.writePom (FlattenMojo.java:210)
    at com.carrotgarden.maven.flatten.FlattenMojo.persistModel (FlattenMojo.java:374)
    at com.carrotgarden.maven.flatten.FlattenMojo.execute (FlattenMojo.java:466)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    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:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    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 jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    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:55)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Scalor Maven Plugin ................................ FAILURE [  5.732 s]
[INFO] Scalor Maven Plugin 2.12 ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.975 s
[INFO] Finished at: 2018-03-12T17:08:45Z
[INFO] Final Memory: 54M/179M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.carrotgarden.maven:flatten-maven-plugin:1.3.20180210195103:flatten (default) on project scalor-maven-plugin: Flatten failure: character 27 is not allowed in output -> [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/MojoFailureException
@Andrei-Pozolotin
Copy link
Contributor

ok, checking

@Andrei-Pozolotin
Copy link
Contributor

  1. so far can not reproduce

  2. please confirm you can re-produce this issue with JDK-8

  3. please report you encoding, i.e. in powershell eval of

[Console]::InputEncoding
[Console]::OutputEncoding

@Andrei-Pozolotin
Copy link
Contributor

@Andrei-Pozolotin
Copy link
Contributor

@m50d
Copy link
Author

m50d commented Mar 31, 2018

I'm still seeing this - seems like the scope somehow gets corrupted as part of the flattening process:

main[1] where
  [1] com.carrotgarden.maven.flatten.FlattenMojo.execute (FlattenMojo.java:466)
  [2] org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
  [3] org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
  [4] org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
  [5] org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
  [6] org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
  [7] org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
  [8] org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
  [9] org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
  [10] org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
  [11] org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
  [12] org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
  [13] org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
  [14] org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
  [15] org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
  [16] jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (native method)
  [17] jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
  [18] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
  [19] java.lang.reflect.Method.invoke (Method.java:564)
  [20] org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
  [21] org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
  [22] org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
  [23] org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
main[1] dump flatModel.dependencies.elementData[2]
 flatModel.dependencies.elementData[2] = {
    groupId: "com.github.klieber"
    artifactId: "phantomjs-maven-plugin"
    version: "0.7"
    type: "jar"
    classifier: null
    scope: "compile�[36m"
    systemPath: null
    exclusions: null
    optional: null
    locations: null
    managementKey: null
}
main[1] dump project.getModel().dependencies.elementData[9]
 project.getModel().dependencies.elementData[9] = {
    groupId: "com.github.klieber"
    artifactId: "phantomjs-maven-plugin"
    version: "0.7"
    type: "jar"
    classifier: null
    scope: "compile"
    systemPath: null
    exclusions: instance of java.util.ArrayList(id=5449)
    optional: null
    locations: instance of java.util.LinkedHashMap(id=5450)
    managementKey: "com.github.klieber:phantomjs-maven-plugin:jar"
}
main[1]

That weird compile�[36m contains a character that's considered invalid for XML output.

@Andrei-Pozolotin Andrei-Pozolotin changed the title "character 27 is not allowed in output" build error mysterious encoding during flatten:flatten Apr 1, 2018
m50d added a commit to m50d/scalor-maven-plugin that referenced this issue Apr 2, 2018
@m50d
Copy link
Author

m50d commented Apr 2, 2018

How do I make scalor plugin use a new version of the flatten plugin? I have a branch where I've changed the version to a 1.4.x in .mvn/pom.xml, but whenever I try to install that parent pom or do anything with it the version somehow turns back into the current 1.3.x version?

@Andrei-Pozolotin
Copy link
Contributor

please verify if resolved in fresh 1.4.1
https://bintray.com/random-maven/maven/scalor-maven-plugin_2.12

@m50d
Copy link
Author

m50d commented Apr 3, 2018

Looks like the 1.4 release is somehow unavailable? https://travis-ci.org/m50d/tierney/builds/361796725?utm_source=github_status&utm_medium=notification

@Andrei-Pozolotin
Copy link
Contributor

need to keep updating to live version, they change after each commit and by cron
https://bintray.com/random-maven/maven/scalor-maven-plugin_2.12
https://travis-ci.org/random-maven/scalor-maven-plugin/builds

@m50d
Copy link
Author

m50d commented Apr 3, 2018

Have you got a branch I can pull from? This was an error in the build of the scalor plugin itself, not when using the plugin.

@Andrei-Pozolotin
Copy link
Contributor

use develop
https://github.com/random-maven/scalor-maven-plugin/tree/develop

please kill repo first and clone fresh, since I squash commits and simple pull will not work
basically, treating it as private branch

@m50d
Copy link
Author

m50d commented Apr 3, 2018

Issue is resolved on develop, thanks again.

@Andrei-Pozolotin
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants