-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
None
-
None
Note: this may not be a bug; it could just be a user error, as I'm figuring things out as I go. But the failure I'm seeing seems like a bug that would affect other uses.
Following is some WIP on a WildFly Quickstart showing Jakarta Data:
https://github.com/bstansberry/quickstart/commit/447de1c8f13b5172dec0fb58beb3fa6eba00dd03
This is a copy of the todo-backend quickstart, but tweaked to use Jakarta Data instead of Jakarta Persistence.
The wildfly-maven-plugin config differs from todo-backend in that it declares a feature-pack. This is because currently this functionality is only available from WildFly Preview.
<feature-packs> <feature-pack> <location>wildfly-preview@maven(org.jboss.universe:community-universe)#34.0.0.Beta1</location> </feature-pack> </feature-packs>
Trying to build fails, with the following output if -X -e are set (scroll down to see the key bits):
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:5.0.0.Final:package (default) on project todo-jakarta-data: java.io.FileNotFoundException: /Users/bstansberry/dev/wildfly/quickstart/todo-jakarta-data/target (Is a directory) -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:5.0.0.Final:package (default) on project todo-jakarta-data: java.io.FileNotFoundException: /Users/bstansberry/dev/wildfly/quickstart/todo-jakarta-data/target (Is a directory) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) Caused by: org.apache.maven.plugin.MojoExecutionException: java.io.FileNotFoundException: /Users/bstansberry/dev/wildfly/quickstart/todo-jakarta-data/target (Is a directory) at org.wildfly.plugin.provision.PackageServerMojo.buildGalleonConfig (PackageServerMojo.java:287) at org.wildfly.plugin.provision.AbstractProvisionServerMojo.provisionServer (AbstractProvisionServerMojo.java:296) at org.wildfly.plugin.provision.AbstractProvisionServerMojo.execute (AbstractProvisionServerMojo.java:266) at org.wildfly.plugin.provision.PackageServerMojo.execute (PackageServerMojo.java:302) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) Caused by: org.jboss.galleon.ProvisioningException: java.io.FileNotFoundException: /Users/bstansberry/dev/wildfly/quickstart/todo-jakarta-data/target (Is a directory) at org.jboss.galleon.api.ProvisioningImpl.storeProvisioningConfig (ProvisioningImpl.java:271) at org.wildfly.plugin.common.Utils.scanDeployment (Utils.java:132) at org.wildfly.plugin.provision.PackageServerMojo.buildGalleonConfig (PackageServerMojo.java:271) at org.wildfly.plugin.provision.AbstractProvisionServerMojo.provisionServer (AbstractProvisionServerMojo.java:296) at org.wildfly.plugin.provision.AbstractProvisionServerMojo.execute (AbstractProvisionServerMojo.java:266) at org.wildfly.plugin.provision.PackageServerMojo.execute (PackageServerMojo.java:302) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) Caused by: java.io.FileNotFoundException: /Users/bstansberry/dev/wildfly/quickstart/todo-jakarta-data/target (Is a directory) at java.io.FileOutputStream.open0 (Native Method) at java.io.FileOutputStream.open (FileOutputStream.java:293) at java.io.FileOutputStream.<init> (FileOutputStream.java:235) at java.io.FileOutputStream.<init> (FileOutputStream.java:184) at java.io.FileWriter.<init> (FileWriter.java:96) at org.jboss.galleon.caller.ProvisioningContextImpl.storeProvisioningConfig (ProvisioningContextImpl.java:137) at org.jboss.galleon.api.ProvisioningImpl.storeProvisioningConfig (ProvisioningImpl.java:266) at org.wildfly.plugin.common.Utils.scanDeployment (Utils.java:132) at org.wildfly.plugin.provision.PackageServerMojo.buildGalleonConfig (PackageServerMojo.java:271) at org.wildfly.plugin.provision.AbstractProvisionServerMojo.provisionServer (AbstractProvisionServerMojo.java:296) at org.wildfly.plugin.provision.AbstractProvisionServerMojo.execute (AbstractProvisionServerMojo.java:266) at org.wildfly.plugin.provision.PackageServerMojo.execute (PackageServerMojo.java:302) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
The key bits being:
Caused by: java.io.FileNotFoundException: /Users/bstansberry/dev/wildfly/quickstart/todo-jakarta-data/target (Is a directory) at java.io.FileOutputStream.open0 (Native Method) at java.io.FileOutputStream.open (FileOutputStream.java:293) at java.io.FileOutputStream.<init> (FileOutputStream.java:235) at java.io.FileOutputStream.<init> (FileOutputStream.java:184) at java.io.FileWriter.<init> (FileWriter.java:96) at org.jboss.galleon.caller.ProvisioningContextImpl.storeProvisioningConfig (ProvisioningContextImpl.java:137) at org.jboss.galleon.api.ProvisioningImpl.storeProvisioningConfig (ProvisioningImpl.java:266) at org.wildfly.plugin.common.Utils.scanDeployment (Utils.java:132) at org.wildfly.plugin.provision.PackageServerMojo.buildGalleonConfig (PackageServerMojo.java:271)
Note that the lines above are not from main; Utils.java:132 in the stack above is currently L136.
The key bits in Utils.scanDeployments:
if (!featurePacks.isEmpty()) { GalleonProvisioningConfig in = GalleonUtils.buildConfig(pm, featurePacks, layers, excludedLayers, galleonOptions, layersConfigurationFileName); inProvisioningFile = glowOutputFolder.resolve("glow-in-provisioning.xml"); pm.newProvisioningBuilder(in).build().storeProvisioningConfig(in, outputFolder); try (Provisioning p = pm.newProvisioningBuilder(in).build()) { p.storeProvisioningConfig(in, inProvisioningFile); } }
The 'pm.newProvisioningBuilder(in).build().storeProvisioningConfig(in, outputFolder);' line is what fails. It seems to me it would always fail, as 'outputFolder' is always a directory. It looks like that line is cruft, as the following try-with-resources looks to be doing the exact same thing, but using inProvisioningFile, which is not a directory.
- duplicates
-
WFMP-277 Exception when discover-provisioning-info and feature-packs are set
- Resolved