-
Notifications
You must be signed in to change notification settings - Fork 0
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
Comments
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. |
I pushed a snapshot last night (0.5.1-SNAPSHOT) if you'd like to confirm or
I can just push a release thus morning.
…On Wed, Sep 20, 2023, 11:37 AM Lukas Eder ***@***.***> wrote:
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:
https://github.com/evanchooly/graven/blob/17b2ab122a02eae6bb8387060f9c539cef453cef/mojo/src/main/kotlin/com/antwerkz/graven/ReplacementMojo.kt#L135
—
Reply to this email directly, view it on GitHub
<#48>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABPTTOJ3CWSTFSE6ISY7ITX3LBOTANCNFSM6AAAAAA47WFRUM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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
The plugin probably makes a few assumptions I'm unaware of (and will still discover), but this error is probably avoidable:
Most other
file
access calls are guarded byif (file.exists())
, but not this one:graven/mojo/src/main/kotlin/com/antwerkz/graven/ReplacementMojo.kt
Line 135 in 17b2ab1
The text was updated successfully, but these errors were encountered: