cbeust / kobalt

A Kotlin-based build system for the JVM.
Apache License 2.0
432 stars 60 forks source link

Kobalt NPE #431

Closed ethauvin closed 7 years ago

ethauvin commented 7 years ago
git clone https://github.com/ethauvin/kobalt-property-file
cd example

$ ./kobaltw clean propertyFile --log 2                                                                                  
[Wrapper] Wrapper version: 1.0.75                                                                                       
[Wrapper]   Trying to install the same version 1.0.75 == 1.0.75, not overwriting the installed wrapper                  
[Wrapper] Launching [java, -Dfile.encoding=windows-1252, -jar, C:\Users\erik\.kobalt\wrapper\dist\kobalt-1.0.75\kobalt\w
rapper\kobalt-1.0.75.jar, clean, propertyFile, --log, 2]                                                                
Couldn't find C:\Users\erik\.config\kobalt\settings.xml, using default settings                                         
URL for core kobalt-plugin.xml: jar:file:/C:/Users/erik/.kobalt/wrapper/dist/kobalt-1.0.75/kobalt/wrapper/kobalt-1.0.75.
jar!/META-INF/kobalt-core-plugin.xml                                                                                    
Parsed plugin XML file, found: kobalt                                                                                   
            _  __          _               _   _                                                                        
           | |/ /   ___   | |__     __ _  | | | |_                                                                      
           | ' /   / _ \  | '_ \   / _` | | | | __|                                                                     
           | . \  | (_) | | |_) | | (_| | | | | |_                                                                      
           |_|\_\  \___/  |_.__/   \__,_| |_|  \__|  1.0.75                                                             

  Script jar files in: K:\kotlin\kobalt-property-file\example\.kobalt\build                                             
  Script jar files in: K:\kotlin\kobalt-property-file\example\.kobalt\build                                             
  Compiling buildScriptInfo C:\Users\erik\AppData\Local\Temp\1611762481371535230.kt to K:\kotlin\kobalt-property-file\ex
ample\.kobalt\build\preBuildScript-0.jar                                                                                
Compiling into K:\kotlin\kobalt-property-file\example\.kobalt\build\preBuildScript-0.jar                                
  Need to recompile {BuildSources K:\kotlin\kobalt-property-file\example\kobalt\src\Build.kt} because it's been modified

  Kotlin incremental compilation is disabled                                                                            
  Regular compilation time: 6730 ms                                                                                     
Created K:\kotlin\kobalt-property-file\example\.kobalt\build\preBuildScript-0.jar                                       
  Found buildScriptInfos: [com.beust.kobalt.app.BuildFiles$BuildFileWithBuildScript@54f0372a]                           
  Skipping buildScript{} line 8 from file K:\kotlin\kobalt-property-file\example\kobalt\src\Build.kt                    
  Skipping buildScript{} line 9 from file K:\kotlin\kobalt-property-file\example\kobalt\src\Build.kt                    
  Skipping buildScript{} line 10 from file K:\kotlin\kobalt-property-file\example\kobalt\src\Build.kt                   
  Skipping buildScript{} line 11 from file K:\kotlin\kobalt-property-file\example\kobalt\src\Build.kt                   
  Script jar files in: K:\kotlin\kobalt-property-file\example\.kobalt\build                                             
  Script jar files in: K:\kotlin\kobalt-property-file\example\.kobalt\build                                             
Downloading: https://jcenter.bintray.com/net/thauvin/erik/kobalt-property-file/maven-metadata.xml                       
Downloading: http://repo1.maven.org/maven2/net/thauvin/erik/kobalt-property-file/maven-metadata.xml                     
*****                                                                                                                   
***** ERROR java.lang.NullPointerException                                                                              
*****                                                                                                                   
java.lang.NullPointerException                                                                                          
        at com.beust.kobalt.maven.aether.KobaltMavenResolver.resolve(KobaltMavenResolver.kt:79)                         
        at com.beust.kobalt.maven.aether.KobaltMavenResolver.resolve$default(KobaltMavenResolver.kt:72)                 
        at com.beust.kobalt.maven.aether.KobaltMavenResolver.resolve(KobaltMavenResolver.kt:96)                         
        at com.beust.kobalt.maven.aether.KobaltMavenResolver.resolve$default(KobaltMavenResolver.kt:95)                 
        at com.beust.kobalt.maven.aether.AetherDependency.getJarFile(AetherDependency.kt:34)                            
        at com.beust.kobalt.app.BuildFileCompiler.findProjects(BuildFileCompiler.kt:112)                                
        at com.beust.kobalt.app.BuildFileCompiler.compileBuildFiles(BuildFileCompiler.kt:73)                            
        at com.beust.kobalt.app.BuildFileCompiler.compileBuildFiles$default(BuildFileCompiler.kt:47)                    
        at com.beust.kobalt.app.ProjectFinder.initForBuildFile(ProjectFinder.kt:20)                                     
        at com.beust.kobalt.Options.run(Options.kt:58)                                                                  
        at com.beust.kobalt.Main.runWithArgs(Main.kt:128)                                                               
        at com.beust.kobalt.Main.run(Main.kt:109)                                                                       
        at com.beust.kobalt.Main$Companion.launchMain(Main.kt:63)                                                       
        at com.beust.kobalt.Main$Companion.mainNoExit(Main.kt:42)                                                       
        at com.beust.kobalt.MainKt.main(Main.kt:20)                                                                     
cbeust commented 7 years ago

Not present on JCenter.

I added a better error message, though.