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

FileNotFoundException when gradle.properties is absent #48

Open
lukaseder opened this issue Sep 20, 2023 · 3 comments
Open

FileNotFoundException when gradle.properties is absent #48

lukaseder opened this issue Sep 20, 2023 · 3 comments

Comments

@lukaseder
Copy link

The plugin probably makes a few assumptions I'm unaware of (and will still discover), but this error is probably avoidable:

[ERROR] C:\Users\lukas\jOOQ\3.19\workspace\jOOQ-pro\jOOQ-codegen-gradle\gradle.properties (The system cannot find the file specified)
java.io.FileNotFoundException: C:\Users\lukas\jOOQ\3.19\workspace\jOOQ-pro\jOOQ-codegen-gradle\gradle.properties (The system cannot find the file specified)
    at java.io.FileInputStream.open0 (Native Method)
    at java.io.FileInputStream.open (FileInputStream.java:213)
    at java.io.FileInputStream.<init> (FileInputStream.java:152)
    at kotlin.io.FilesKt__FileReadWriteKt.forEachLine (FileReadWrite.kt:190)
    at kotlin.io.FilesKt__FileReadWriteKt.readLines (FileReadWrite.kt:219)
    at com.antwerkz.graven.ReplacementMojo.updateProjectVersion (ReplacementMojo.kt:137)
    at com.antwerkz.graven.ReplacementMojo.execute (ReplacementMojo.kt:67)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:342)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:330)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:76)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
    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:260)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:172)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:100)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:821)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:270)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    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.

Most other file access calls are guarded by if (file.exists()), but not this one:

@evanchooly
Copy link
Owner

Yeah. I wrote it such that it works in my setup but there are some rough edges. I'm currently about to take off in a plane but I'll clean that up as soon as I can.

@evanchooly
Copy link
Owner

evanchooly commented Sep 23, 2023 via email

@lukaseder
Copy link
Author

Thanks, I'm not in a hurry. Just thought this might be something worth pointing out as new users might stumble upon this...

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

No branches or pull requests

2 participants