Comments (12)
Thanks @ThomasHurek for reporting this issue.
Would you be willing to collect more logging by running with the "Start ..." and adding the -e
parameter and sharing the exception stack trace as well as the version of mvn you're using (mvn -v
) ? If nothing in the project is particularly sensitive, perhaps you'd also be willing to run with the -X
parm and share that output as well?
The Liberty Tools Eclipse IDE tooling provides only a thin wrapper around the underlying liberty-maven-plugin "dev mode", so I'd expect the same issue would exist either inside the IDE or outside (e.g. from a shell via mvn CLI). If you get the chance maybe you could try that.
Does the problem go away or reappear based on doing a clean (or not doing a clean)? (There is no way to do this currently using the IDE tooling, you'd have to use a separate CLI shell or use the "m2e" Maven support in Eclipse).
from ci.maven.
@scottkurz Thx for taking a look at the issue. Attaching the requested output:
mvn -version
Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
Maven home: /opt/homebrew/Cellar/maven/3.9.4/libexec
Java version: 11.0.18, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "12.6.8", arch: "aarch64", family: "mac"
Exception stack:
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.7.1:dev (default-cli) on project engine-ear: Use a resource collection to copy directories. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.7.1:dev (default-cli) on project engine-ear: Use a resource collection to copy directories.
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:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
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: Use a resource collection to copy directories.
at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:129)
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:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
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: Use a resource collection to copy directories.
at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:137)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojo (StartDebugMojoSupport.java:363)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoCreate (StartDebugMojoSupport.java:308)
at io.openliberty.tools.maven.server.DevMojo.runLibertyMojoCreate (DevMojo.java:1931)
at io.openliberty.tools.maven.server.DevMojo.doExecute (DevMojo.java:1326)
at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:122)
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:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
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.tools.ant.BuildException: Use a resource collection to copy directories.
at org.apache.tools.ant.taskdefs.Copy.validateAttributes (Copy.java:689)
at org.apache.tools.ant.taskdefs.Copy.execute (Copy.java:450)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.copyDependencies (StartDebugMojoSupport.java:472)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.copyDependencies (StartDebugMojoSupport.java:412)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.copyConfigFiles (StartDebugMojoSupport.java:652)
at io.openliberty.tools.maven.server.CreateServerMojo.doExecute (CreateServerMojo.java:88)
at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:122)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojo (StartDebugMojoSupport.java:363)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoCreate (StartDebugMojoSupport.java:308)
at io.openliberty.tools.maven.server.DevMojo.runLibertyMojoCreate (DevMojo.java:1931)
at io.openliberty.tools.maven.server.DevMojo.doExecute (DevMojo.java:1326)
at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:122)
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:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
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)
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :engine-ear
from ci.maven.
I tried with clean and without clean and the same issue happens:
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.7.1:dev (default-cli) on project engine-ear: Use a resource collection to copy directories. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.7.1:dev (default-cli) on project engine-ear: Use a resource collection to copy directories.
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:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
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: Use a resource collection to copy directories.
at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:129)
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:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
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: Use a resource collection to copy directories.
at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:137)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojo (StartDebugMojoSupport.java:363)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoCreate (StartDebugMojoSupport.java:308)
at io.openliberty.tools.maven.server.DevMojo.runLibertyMojoCreate (DevMojo.java:1931)
at io.openliberty.tools.maven.server.DevMojo.doExecute (DevMojo.java:1326)
at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:122)
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:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
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.tools.ant.BuildException: Use a resource collection to copy directories.
at org.apache.tools.ant.taskdefs.Copy.validateAttributes (Copy.java:689)
at org.apache.tools.ant.taskdefs.Copy.execute (Copy.java:450)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.copyDependencies (StartDebugMojoSupport.java:472)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.copyDependencies (StartDebugMojoSupport.java:412)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.copyConfigFiles (StartDebugMojoSupport.java:652)
at io.openliberty.tools.maven.server.CreateServerMojo.doExecute (CreateServerMojo.java:88)
at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:122)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojo (StartDebugMojoSupport.java:363)
at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoCreate (StartDebugMojoSupport.java:308)
at io.openliberty.tools.maven.server.DevMojo.runLibertyMojoCreate (DevMojo.java:1931)
at io.openliberty.tools.maven.server.DevMojo.doExecute (DevMojo.java:1326)
at org.codehaus.mojo.pluginsupport.MojoSupport.execute (MojoSupport.java:122)
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:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
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)
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :engine-ear
from ci.maven.
Seems the logs are not pasted complete so pasting as file.
output.log
from ci.maven.
@ThomasHurek thanks for the logs.
It seems from the exception that one of the dependencies included via the copyDependencies config resolves to a directory location. This could be a dependency listed directly, or more likely, transitively (the name "aggregator-manager" suggests this might aggregate a number of dependencies).
Do you happen to have any guess as to which dependency this might be?
I wonder if it is one of the standard packaging types or something custom perhaps, or at least less common.
The log seems like it got truncated, unfortunately, so I can't really draw any conclusions from that.
Did you happen to have a chance to try recreating outside of Liberty Tools Eclipse?
Thanks.
from ci.maven.
I tried mvn liberty:dev (after triggering a build of all components with mvn install) and it starts fine:
[INFO] CWWKM2015I: Match number: 1 is [11/1/23, 17:33:29:420 EDT] 00000026 com.ibm.ws.kernel.feature.internal.FeatureManager A CWWKF0011I: The engineServer server is ready to run a smarter planet. The engineServer server started in 30.721 seconds..
[INFO] ************************************************************************
[INFO] * Liberty is running in dev mode.
[INFO] * Automatic generation of features: [ Off ]
[INFO] * h - see the help menu for available actions, type 'h' and press Enter.
[INFO] * q - stop the server and quit dev mode, press Ctrl-C or type 'q' and press Enter.
[INFO] *
[INFO] * Liberty server port information:
[INFO] * Liberty server HTTP port: [ 9080 ]
[INFO] * Liberty server HTTPS port: [ 9443 ]
[INFO] * Liberty debug port: [ 50218 ]
[INFO] ************************************************************************
from ci.maven.
Yes the aggregator-manager is used for gathering transitive dependencies. It is pretty straightforward but it does use exclusions like:
<exclusion>
<groupId>hcl.dx.bla</groupId>
<artifactId>webservices</artifactId>
</exclusion>
from ci.maven.
OK, I think I have an idea what type of problem we're dealing with.
This is a bit long but let me leave some notes to consider.
OBSERVATION
You appear to be doing a multi-module build, and the dependency you're copying via <copyDependencies>
is also being built in this same multi-module build.
I'm observing this looking at the build output:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for DX Core Engine 0.0.1-SNAPSHOT:
....
[INFO] aggregator-manager ................................. SUCCESS [ 0.192 s]
...
[INFO] pzn-war ............................................ SUCCESS [ 0.462 s]
[INFO] EAR Module ......................................... FAILURE [ 2.323 s]
[INFO] ------------------------------------------------------------------------
as this 'aggregator-manager' matches the artifactId in one of your <copyDependencies>
entries.
MULTI-MODULE BEHAVIOR EXPLAINED
In some contexts, the Maven APIs we're using in liberty-maven-plugin will associate a Maven artifact with the path of the locally-installed artifact. This is what would be used for a completely external dependency.
In certain multi-module contexts, though,Maven will associate the artifact with its output directory, e.g. target/classes.
This makes sense if you stop to think about how mvn compile
would work. If Maven needed to use a locally installed artifact to compile against then you'd have to do mvn install
with each component of the dependency graph before you could compile against it, and it would make multi-module builds a lot more difficult to work with.
RECREATE
Anyway, I can now easily recreate a problem like this by taking the multi-module guide app: https://github.com/OpenLiberty/guide-maven-multimodules and adding to its ear module the liberty-maven-plugin config:
<copyDependencies>
<dependency>
<groupId>io.openliberty.guides</groupId>
<artifactId>guide-maven-multimodules-jar</artifactId>
</dependency>
</copyDependencies>
and then doing a multi-module mvn liberty:dev
.
In fact, doing a mvn install
doesn't make this problem go away. So there must be something a bit different about your scenario.
And the scenario I constructed is in fact kind of unrealistic. The guide-maven-multimodules-jar
in this case is already going to be packaged within the WAR within the application EAR, so there's no value or need to use to move the binary into place like I did here.
The copyDependencies function was originally developed with a use case more like "copy a provided-scoped JDBC driver dependency into place", since such a dependency would NOT get packaged within the building of the EAR/WAR.
NEXT STEPS
I have to stop here for the day without having gotten to what the next step should be, but let me just paste that analysis for now, regardless.
from ci.maven.
I don't think this change broke anything (I think the basic issue exists before and after this was merged), but this PR: #1570 overlapped some of the constructs here (the output dir in a multi-mod build)..so might be something to learn from.
from ci.maven.
Yes you are totally right it is a multi-module setup. The ear module sits in parallel with various other modules.
from ci.maven.
Yes you are totally right it is a multi-module setup. The ear module sits in parallel with various other modules.
So how do the contents in aggregator-manager get used? Via some kind of global/shared library or resource (JDBC) library?
If, OTOH, they are just application-level libraries then I wonder if you should by using copyDependencies vs. just packaging them into the app (EAR).
from ci.maven.
They are used in multiple shared libraries.
from ci.maven.
Related Issues (20)
- liberty-maven-plugin should rely on the build toolchain configuration to build / rebuild code HOT 3
- Maven plugin prints extraneous warnings HOT 2
- Unable to measure code coverage after migrating to 3.10 HOT 5
- Warning message on download of feature *.esa.ac file when installing features yet feature verification seems to succeed HOT 4
- Support expansion variables for server.env config files
- In liberty:create goal, liberty-plugin-config.xml doesn't reflect precedence of liberty.bootstrap.* props over <bootstrapPropertiesFile> plugin config HOT 2
- Deploy goal doesn't allow for user-specified <springBootApplication> config in server.xml; will always generate deployment config HOT 1
- Exception when 'run' goal is executed for SpringBoot repackaged WAR with looseApplication=false and SB deploy
- Detect installation directory changes when `dev` mode is running and handle it somehow
- Incorrect values in liberty-plugin-config.xml for assemblyArtifact and assemblyInstallDirectory HOT 1
- Handle spaces in project path for devc HOT 3
- Error found when running Liberty dev container mode with Liberty Maven Plugin 3.10.1 on Linux HOT 2
- Maven Version issue HOT 4
- LMP 3.10 and 3.10.1 do not pickup the change from server.xml HOT 4
- In version 3.10.1, encountering an error in 'Start in container' functionality while running in Podman. HOT 5
- Improper http proxy format HOT 8
- LMP 3.10.2 liberty:run/dev goal skipped using spring-boot and JAR packaging type HOT 6
- Goal 'compile-jsp' uses wrong source/target HOT 11
- Liberty plugin pulls unreleased version for openliberty-kernel HOT 3
- Server stopped after source code change in dev mode (Maven plugin) HOT 29
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ci.maven.