wildfly-extras / wildfly-jar-maven-plugin

WildFly Bootable JAR
https://docs.wildfly.org/bootablejar/
Apache License 2.0
57 stars 40 forks source link

Examples cannot be packaged when M2 repository path contains spaces and the provisioning is forked #210

Closed himnaz closed 3 years ago

himnaz commented 3 years ago

Hi, I am trying to build the example provided in the bootable-jar-3.0.Final-Released. I am getting the Build Failure with the following message. Appreciate if someone could tell me what I am doing wrong. I am using jdk-15.0.2, Apache Maven 3.6.3

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.041 s
[INFO] Finished at: 2021-03-11T14:10:53Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-jar-maven-plugin:3.0.2.Final:package (default) on project jsf-ejb-jpa: Provisioning failed: Forked embedded process has failed -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.wildfly.plugins:wildfly-jar-maven-plugin:3.0.2.Final:package (default) on project jsf-ejb-jpa: Provisioning failed
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    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:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64)
    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:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Provisioning failed
    at org.wildfly.plugins.bootablejar.maven.goals.AbstractBuildBootableJarMojo.execute (AbstractBuildBootableJarMojo.java:403)
    at org.wildfly.plugins.bootablejar.maven.goals.BuildBootableJarMojo.execute (BuildBootableJarMojo.java:63)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    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:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64)
    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:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.jboss.galleon.ProvisioningException: Forked embedded process has failed
    at org.wildfly.galleon.plugin.server.ForkedEmbeddedUtil.fork (ForkedEmbeddedUtil.java:161)
    at org.wildfly.galleon.plugin.server.ForkedEmbeddedUtil.fork (ForkedEmbeddedUtil.java:95)
    at org.wildfly.galleon.plugin.config.generator.WfConfigGenerator.doGenerate (WfConfigGenerator.java:138)
    at org.wildfly.galleon.plugin.config.generator.WfConfigGenerator.generate (WfConfigGenerator.java:89)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.wildfly.galleon.plugin.WfInstallPlugin.generateConfigs (WfInstallPlugin.java:611)
    at org.wildfly.galleon.plugin.WfInstallPlugin.postInstall (WfInstallPlugin.java:397)
    at org.jboss.galleon.runtime.ProvisioningRuntime$3.visitPlugin (ProvisioningRuntime.java:263)
    at org.jboss.galleon.runtime.ProvisioningRuntime$3.visitPlugin (ProvisioningRuntime.java:260)
    at org.jboss.galleon.layout.ProvisioningLayout$Handle.visitPlugins (ProvisioningLayout.java:285)
    at org.jboss.galleon.layout.ProvisioningLayout.visitPlugins (ProvisioningLayout.java:838)
    at org.jboss.galleon.runtime.ProvisioningRuntime.provision (ProvisioningRuntime.java:260)
    at org.jboss.galleon.ProvisioningManager.doProvision (ProvisioningManager.java:644)
    at org.jboss.galleon.ProvisioningManager.provision (ProvisioningManager.java:415)
    at org.wildfly.plugins.bootablejar.maven.goals.AbstractBuildBootableJarMojo.provisionServer (AbstractBuildBootableJarMojo.java:1218)
    at org.wildfly.plugins.bootablejar.maven.goals.AbstractBuildBootableJarMojo.execute (AbstractBuildBootableJarMojo.java:401)
    at org.wildfly.plugins.bootablejar.maven.goals.BuildBootableJarMojo.execute (BuildBootableJarMojo.java:63)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    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:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64)
    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:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[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/MojoExecutionException
jfdenise commented 3 years ago

Hi, could you remove the plugin-options from your pom.xml: https://github.com/wildfly-extras/wildfly-jar-maven-plugin/blob/master/examples/jsf-ejb-jpa/pom.xml#L39 It would help debug your problem.

himnaz commented 3 years ago

Hi, Thank you very much. When built without the plugin-options it worked.

jfdenise commented 3 years ago

Ah, so could you add the options back and enable debug (-X) and send me the output (jdenise at redhat dot com)? We need to findout the problem you are running into.

jfdenise commented 3 years ago

@himnaz , any news on this reported issue?

himnaz commented 3 years ago

Hi Jean, Attached the output. wildfly_jar_error_output.txt

jfdenise commented 3 years ago

@himnaz , thank-you. I can see that we have some space in the paths of some JARs (the .m2 repository is located inside your home that contains spaces) that are wrongly converted into %20 (URL encoded). This is a bug that we need to fix.

jfdenise commented 3 years ago

Root causes in Galleon plugin: https://issues.redhat.com/browse/WFGP-196 We also have an issue when forking CI script.

jfdenise commented 3 years ago

This issue will be fixed starting WildFly 23.0.1.Final and Bootable JAR 4.0.1.Final

jfdenise commented 3 years ago

If you are using Wildfly 23.0.1.Final and Maven plugin 4.0.4.Final, the problem will be fixed.