Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5549

vdb-maven-plugin - FileNotFoundException when target directory doesn't exist

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 11.0.2
    • Fix Version/s: 11.2.1
    • Component/s: Build/Kits, VDB
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      1. Create -vdb.xml-only project
      2. mvn clean install -DskipTests
      3. [ERROR] Failed to execute goal org.teiid:vdb-maven-plugin:1.2:vdb (default-vdb) on project metrics-vdb: Exception when creating artifact archive.: target/vdb.xml (No such file or directory) -> [Help 1]
        org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.teiid:vdb-maven-plugin:1.2:vdb (default-vdb) on project metrics-vdb: Exception when creating artifact archive.
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
            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: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:954)
            at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
            at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
            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.MojoExecutionException: Exception when creating artifact archive.
            at org.teiid.VdbMojo.execute (VdbMojo.java:169)
            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
            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: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:954)
            at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
            at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
            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: java.io.FileNotFoundException: target/vdb.xml (No such file or directory)
            at java.io.FileOutputStream.open0 (Native Method)
            at java.io.FileOutputStream.open (FileOutputStream.java:270)
            at java.io.FileOutputStream.<init> (FileOutputStream.java:213)
            at java.io.FileOutputStream.<init> (FileOutputStream.java:162)
            at org.teiid.VdbMojo.execute (VdbMojo.java:165)
            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
            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: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:954)
            at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
            at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
            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)
        
      Show
      Create -vdb.xml -only project mvn clean install -DskipTests [ERROR] Failed to execute goal org.teiid:vdb-maven-plugin:1.2:vdb ( default -vdb) on project metrics-vdb: Exception when creating artifact archive.: target/vdb.xml (No such file or directory) -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.teiid:vdb-maven-plugin:1.2:vdb ( default -vdb) on project metrics-vdb: Exception when creating artifact archive. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213) 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: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:954) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) 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.MojoExecutionException: Exception when creating artifact archive. at org.teiid.VdbMojo.execute (VdbMojo.java:169) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) 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: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:954) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) 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: java.io.FileNotFoundException: target/vdb.xml (No such file or directory) at java.io.FileOutputStream.open0 (Native Method) at java.io.FileOutputStream.open (FileOutputStream.java:270) at java.io.FileOutputStream.<init> (FileOutputStream.java:213) at java.io.FileOutputStream.<init> (FileOutputStream.java:162) at org.teiid.VdbMojo.execute (VdbMojo.java:165) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) 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: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:954) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) 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)

      Description

      When building, if the target parent directory doesn't exist yet, the build will fail with a FileNotFoundException.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rareddy Ramesh Reddy
                Reporter:
                rbellamy G. Richard Bellamy
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: