thufir

Untitled

Jan 30th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. thufir@mordor:~/java$
  2. thufir@mordor:~/java$ nl build.gradle
  3. 1 apply plugin: 'java'
  4.  
  5. 2 archiveBaseName = "HelloWorld"
  6. 3 version = "0.5"
  7.  
  8.  
  9. 4 task hello << {
  10. 5 println 'hello, world'
  11. 6 }
  12.  
  13.  
  14.  
  15. 7 jar {
  16. 8 manifest {
  17. 9 attributes(
  18. 10 'Class-Path': configurations.compile.collect { it.getName() }.join(' ')
  19. 11 'Main-Class': 'HelloWorld'
  20. 12 )
  21. 13 }
  22. 14 }
  23. thufir@mordor:~/java$
  24. thufir@mordor:~/java$ gradle tasks
  25.  
  26. FAILURE: Build failed with an exception.
  27.  
  28. * Where:
  29. Build file '/home/thufir/java/build.gradle' line: 17
  30.  
  31. * What went wrong:
  32. Could not compile build file '/home/thufir/java/build.gradle'.
  33. > startup failed:
  34. build file '/home/thufir/java/build.gradle': 17: unexpected token: Main-Class @ line 17, column 7.
  35. 'Main-Class': 'HelloWorld'
  36. ^
  37.  
  38. 1 error
  39.  
  40.  
  41. * Try:
  42. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  43.  
  44. BUILD FAILED
  45.  
  46. Total time: 3.425 secs
  47. thufir@mordor:~/java$
Advertisement
Add Comment
Please, Sign In to add comment