joonsrenderer 1.1-java → 1.3.1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +5 -5
  2. data/.mvn/extensions.xml +1 -1
  3. data/.mvn/wrapper/MavenWrapperDownloader.java +117 -0
  4. data/.mvn/wrapper/maven-wrapper.properties +2 -0
  5. data/CHANGELOG.md +12 -1
  6. data/README.md +1 -1
  7. data/Rakefile +6 -1
  8. data/docs/Gemfile +2 -0
  9. data/docs/_config.yml +3 -0
  10. data/docs/_includes/header.html +1 -1
  11. data/docs/_includes/top.html +11 -0
  12. data/docs/_layouts/default.html +6 -15
  13. data/docs/_posts/2017-01-06-media.md +101 -0
  14. data/docs/_posts/2017-01-08-animated_ray_tracing.md +2 -2
  15. data/docs/_posts/2017-01-08-resources.md +14 -0
  16. data/docs/about.md +2 -2
  17. data/docs/assets/media_captured.png +0 -0
  18. data/docs/assets/media_rendered.png +0 -0
  19. data/joonsrenderer.gemspec +2 -2
  20. data/lib/commons.compiler/module-info.class +0 -0
  21. data/lib/commons.compiler/module-info.java +7 -0
  22. data/lib/janino/module-info.class +0 -0
  23. data/lib/janino/module-info.java +5 -0
  24. data/lib/joonsrenderer/version.rb +1 -1
  25. data/mvnw +310 -0
  26. data/mvnw.cmd +182 -0
  27. data/pom.rb +22 -22
  28. data/pom.xml +32 -17
  29. data/src/{test/java/a_maintest.java → a_maintest.java} +1 -1
  30. data/src/main/java/SunflowGUI.java +295 -351
  31. data/src/main/java/joons/JRFiller.java +15 -23
  32. data/src/main/java/joons/JoonsRenderer.java +6 -5
  33. data/src/main/java/org/sunflow/AsciiFileSunflowAPI.java +1 -1
  34. data/src/main/java/org/sunflow/BinaryFileSunflowAPI.java +1 -1
  35. data/src/main/java/org/sunflow/SunflowAPI.java +5 -5
  36. data/src/main/java/org/sunflow/core/GIEngine.java +3 -1
  37. data/src/main/java/org/sunflow/core/Geometry.java +1 -1
  38. data/src/main/java/org/sunflow/core/ImageSampler.java +3 -0
  39. data/src/main/java/org/sunflow/core/InstanceList.java +1 -1
  40. data/src/main/java/org/sunflow/core/IntersectionState.java +7 -6
  41. data/src/main/java/org/sunflow/core/ParameterList.java +3 -2
  42. data/src/main/java/org/sunflow/core/PhotonStore.java +1 -0
  43. data/src/main/java/org/sunflow/core/Ray.java +4 -3
  44. data/src/main/java/org/sunflow/core/TextureCache.java +1 -1
  45. data/src/main/java/org/sunflow/core/accel/BoundingIntervalHierarchy.java +1 -1
  46. data/src/main/java/org/sunflow/core/accel/KDTree.java +1 -1
  47. data/src/main/java/org/sunflow/core/photonmap/CausticPhotonMap.java +2 -2
  48. data/src/main/java/org/sunflow/core/photonmap/GlobalPhotonMap.java +2 -2
  49. data/src/main/java/org/sunflow/core/renderer/BucketRenderer.java +3 -1
  50. data/src/main/java/org/sunflow/image/writers/EXRBitmapWriter.java +28 -19
  51. data/src/main/java/org/sunflow/image/writers/PNGBitmapWriter.java +5 -0
  52. data/src/main/java/org/sunflow/image/writers/TGABitmapWriter.java +20 -14
  53. data/src/main/java/org/sunflow/system/BenchmarkFramework.java +2 -2
  54. data/src/main/java/org/sunflow/system/RenderGlobalsPanel.java +5 -4
  55. metadata +20 -8
  56. data/docs/_includes/head.html +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: '088d1b6c9941961bcb31efd2eb9df78fc60cd94c'
4
- data.tar.gz: 8c13cf3f0ad02782a5094c2da66d8427d6e9d482
2
+ SHA256:
3
+ metadata.gz: ea4f982aac8886ab6cd63fc52318e3f5d8e68ca1e7e2b52c88f6781fc9d4028d
4
+ data.tar.gz: 41fdf28a02c5fa8baabd96390248786b79f0828aea2e9ade64078b0fb26855d3
5
5
  SHA512:
6
- metadata.gz: 30dd72018005d8d405444e5500101edd882e3ce10eeb3c0dc573205dbd82bc3782defcbbcd556f7dadc5b193b47e1f64d6a26778ca535f23b7ddea02cf9b0076
7
- data.tar.gz: c493ee501fe16ece08b6d91302debec262f2fe73c4caf4cc792a54f7dffb18eec58c5d061c3dc4815ece09483235098cd563ac1f7a11dc60bdadd10ef0d1b71d
6
+ metadata.gz: 0d4a1c30410ee7ea51a95e261aa3a228c46586a5466b0141d45153028ad518d6194cab5eb6646ed36564b7176043952bd69a1606e95e070e4b224a92cdd9d9ca
7
+ data.tar.gz: 308c2abbb7181d0633b2cc0b75cd713257db143017e3798abbc2061da4084a97573d2575d6f0c8ee7c50628277cf1832a17ab720ee328266c876b9c8a5cad8ad
@@ -3,6 +3,6 @@
3
3
  <extension>
4
4
  <groupId>io.takari.polyglot</groupId>
5
5
  <artifactId>polyglot-ruby</artifactId>
6
- <version>0.1.19</version>
6
+ <version>0.4.3</version>
7
7
  </extension>
8
8
  </extensions>
@@ -0,0 +1,117 @@
1
+ /*
2
+ * Copyright 2007-present the original author or authors.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import java.net.*;
17
+ import java.io.*;
18
+ import java.nio.channels.*;
19
+ import java.util.Properties;
20
+
21
+ public class MavenWrapperDownloader {
22
+
23
+ private static final String WRAPPER_VERSION = "0.5.5";
24
+ /**
25
+ * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
26
+ */
27
+ private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
28
+ + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
29
+
30
+ /**
31
+ * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
32
+ * use instead of the default one.
33
+ */
34
+ private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
35
+ ".mvn/wrapper/maven-wrapper.properties";
36
+
37
+ /**
38
+ * Path where the maven-wrapper.jar will be saved to.
39
+ */
40
+ private static final String MAVEN_WRAPPER_JAR_PATH =
41
+ ".mvn/wrapper/maven-wrapper.jar";
42
+
43
+ /**
44
+ * Name of the property which should be used to override the default download url for the wrapper.
45
+ */
46
+ private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
47
+
48
+ public static void main(String args[]) {
49
+ System.out.println("- Downloader started");
50
+ File baseDirectory = new File(args[0]);
51
+ System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
52
+
53
+ // If the maven-wrapper.properties exists, read it and check if it contains a custom
54
+ // wrapperUrl parameter.
55
+ File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
56
+ String url = DEFAULT_DOWNLOAD_URL;
57
+ if(mavenWrapperPropertyFile.exists()) {
58
+ FileInputStream mavenWrapperPropertyFileInputStream = null;
59
+ try {
60
+ mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
61
+ Properties mavenWrapperProperties = new Properties();
62
+ mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
63
+ url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
64
+ } catch (IOException e) {
65
+ System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
66
+ } finally {
67
+ try {
68
+ if(mavenWrapperPropertyFileInputStream != null) {
69
+ mavenWrapperPropertyFileInputStream.close();
70
+ }
71
+ } catch (IOException e) {
72
+ // Ignore ...
73
+ }
74
+ }
75
+ }
76
+ System.out.println("- Downloading from: " + url);
77
+
78
+ File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
79
+ if(!outputFile.getParentFile().exists()) {
80
+ if(!outputFile.getParentFile().mkdirs()) {
81
+ System.out.println(
82
+ "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
83
+ }
84
+ }
85
+ System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
86
+ try {
87
+ downloadFileFromURL(url, outputFile);
88
+ System.out.println("Done");
89
+ System.exit(0);
90
+ } catch (Throwable e) {
91
+ System.out.println("- Error downloading");
92
+ e.printStackTrace();
93
+ System.exit(1);
94
+ }
95
+ }
96
+
97
+ private static void downloadFileFromURL(String urlString, File destination) throws Exception {
98
+ if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
99
+ String username = System.getenv("MVNW_USERNAME");
100
+ char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
101
+ Authenticator.setDefault(new Authenticator() {
102
+ @Override
103
+ protected PasswordAuthentication getPasswordAuthentication() {
104
+ return new PasswordAuthentication(username, password);
105
+ }
106
+ });
107
+ }
108
+ URL website = new URL(urlString);
109
+ ReadableByteChannel rbc;
110
+ rbc = Channels.newChannel(website.openStream());
111
+ FileOutputStream fos = new FileOutputStream(destination);
112
+ fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
113
+ fos.close();
114
+ rbc.close();
115
+ }
116
+
117
+ }
@@ -0,0 +1,2 @@
1
+ distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
2
+ wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar
@@ -1,2 +1,13 @@
1
+ **v1.3.1** Bump for janino-3.1.3 and processing-4.0
1
2
 
2
- **v1.1.0** I'm conflicted about versioning here, this a later version than Joon Hyub Lee joonsrenderer. What is different is sunflow is integrated and updated (switch on String, try with resources etc, and importantly updated janino). I hava also hacked joons renderer a bit as well.
3
+ **v1.3.0** Bump for janino-3.1.2, and jdk11
4
+
5
+ **v1.2.0** Bump for janino-3.0.12, plus some refactoring
6
+
7
+ **v1.1.3** Bump for processing-3.3.4
8
+
9
+ **v1.1.2** Use sunflow.util.FloatList and IntList, netbeans profiling suggest it is worth doing (there is a vanilla processing alternative, with a different interface)
10
+
11
+ **v1.1.1** Left out GLASS from fill type switch easily fixed though
12
+
13
+ **v1.1.0** I'm conflicted about versioning here, this a later version than Joon Hyub Lee joonsrenderer. What is different is sunflow is integrated and updated (switch on String, try with resources etc, and importantly updated janino). I have also hacked joons renderer a bit as well.
data/README.md CHANGED
@@ -1,2 +1,2 @@
1
1
  # joonsrenderer
2
- gem to use sunflow (raytacer) with JRubyArt and propane
2
+ A gem to use the sunflow (raytacer) with JRubyArt and propane. Pretty quick and dirty stuff, if you are really serious you might choose to export processing sketch to some 3D format, parse that through [MeshLab](http://www.meshlab.net/) to clean it up before rendering with [blender](https://www.blender.org/) but for everyone else this is pretty easy.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ def create_manifest
6
6
  file = File.open('MANIFEST.MF', 'w') do |f|
7
7
  f.puts(title)
8
8
  f.puts(version)
9
- f.puts('Class-Path: janino-3.0.6.jar commons-compiler-3.0.6.jar')
9
+ f.puts('Class-Path: janino-3.1.3.jar commons-compiler-3.1.3.jar')
10
10
  end
11
11
  end
12
12
 
@@ -33,6 +33,11 @@ task :install do
33
33
  sh "mv target/joonsrenderer.jar lib"
34
34
  end
35
35
 
36
+ desc 'JDeps Tool'
37
+ task :jdeps do
38
+ system 'mvn jdeps:jdkinternals'
39
+ end
40
+
36
41
  desc 'clean'
37
42
  task :clean do
38
43
  Dir['./**/*.%w{jar gem}'].each do |path|
@@ -0,0 +1,2 @@
1
+ gem 'jekyll-feed'
2
+ gem 'jekyll-seo-tag'
@@ -18,3 +18,6 @@ syntax-highlighting:
18
18
  enabled: true
19
19
  # Build settings
20
20
  markdown: kramdown
21
+ gems:
22
+ - jekyll-feed
23
+ - jekyll-seo-tag
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div class="wrapper">
4
4
 
5
- <a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
5
+ <a class="site-title" href="{{ site.github.url }}/{{ site.title }}"</a>
6
6
 
7
7
  <nav class="site-nav">
8
8
  <a href="#" class="menu-icon">
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE HTML>
2
+ <html lang="en-US">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <meta name="generator" content="Jekyll v{{ jekyll.version }}">
7
+ {% feed_meta %}
8
+ <link rel="stylesheet" href="/css/main.css">
9
+ <link rel="icon" type="image/x-icon" href="/favicon.ico">
10
+ {% seo %}
11
+ </head>
@@ -1,20 +1,11 @@
1
- <!DOCTYPE html>
2
- <html>
1
+ {% include top.html %}
3
2
 
4
- {% include head.html %}
3
+ <body class="wrap">
4
+ {% include header.html %}
5
5
 
6
- <body>
6
+ {{ content }}
7
7
 
8
- {% include header.html %}
9
-
10
- <div class="page-content">
11
- <div class="wrapper">
12
- {{ content }}
13
- </div>
14
- </div>
15
-
16
- {% include footer.html %}
17
-
18
- </body>
8
+ {% include footer.html %}
19
9
 
10
+ </body>
20
11
  </html>
@@ -0,0 +1,101 @@
1
+ ---
2
+ layout: post
3
+ title: "Media Demo"
4
+ date: 2017-01-08 04:31:13
5
+ categories: joonsrenderer update
6
+ ---
7
+ Sunflow is an open source global illumination rendering system written in Java written by [Christopher Kulla][fpsunflower]. I have recently updated to [build with maven][maven] using jdk-8 and to use the latest [janino jars][janino]. This is gem makes sunflow rendering easily available to `JRubyArt` and `propane` users using Joon Hylub Lees [joons-renderer][joons]:-
8
+
9
+ ### media_demo.rb (JRubyArt Sketch)
10
+ ```ruby
11
+ require 'joonsrenderer'
12
+ include_package 'joons'
13
+
14
+ attr_reader :jr, :eye, :center, :up
15
+
16
+ def setup
17
+ sketch_title 'Media Demo'
18
+ @jr = JoonsRenderer.new(self)
19
+ jr.set_sampler('ipr') # Rendering mode, either 'ipr' or 'bucket'.
20
+ jr.set_size_multiplier(2) # Set size of PNG file as a multiple of Processing sketch size.
21
+ jr.setAA(-2, 0) # Set anti aliasing, (aaMin, aaMax, aaSamples). aaMin & aaMax = .. -2, -1, .. , 1, 2 .. aaMin < aaMax.
22
+ jr.set_caustics(10) # Set caustics. 1, 5, 10 .., affects quality of light reflected & refracted through glass.
23
+ # Camera Setting.
24
+ @eye = Vec3D.new(0, 0, 120)
25
+ @center = Vec3D.new(0, 0, -1)
26
+ @up = Vec3D.new(0, 1, 0)
27
+ end
28
+
29
+ def draw
30
+ jr.begin_record # Make sure to include things you want rendered.
31
+ kamera(eye: eye, center: center, up: up)
32
+ perspektiv(fov: PI / 4.0, aspect_ratio: 4 / 3.0, near_z: 5, far_z: 10_000)
33
+ jr.background('gi_instant') # Global illumination.
34
+ jr.background('cornell_box', 100, 100, 100) # Cornell box, width, height, depth.
35
+ push_matrix
36
+ translate(-40, 20, -20)
37
+ push_matrix
38
+ rotateY(-PI / 8)
39
+ # jr.fill('light', r, g, b)
40
+ jr.fill('light', 5, 5, 5)
41
+ sphere(13)
42
+ translate(27, 0, 0)
43
+ # jr.fill('mirror', r, g, b)
44
+ jr.fill('mirror', 255, 255, 255)
45
+ sphere(13)
46
+ translate(27, 0, 0)
47
+ # jr.fill('diffuse', r, g, b)
48
+ jr.fill('diffuse', 150, 255, 255)
49
+ sphere(13)
50
+ translate(27, 0, 0)
51
+ # jr.fill('shiny', r, g, b, shininess)
52
+ jr.fill('shiny', 150, 255, 255, 0.1)
53
+ sphere(13)
54
+ translate(27, 0, 0)
55
+ pop_matrix
56
+ rotateY(PI / 8)
57
+ translate(-10, -27, 30)
58
+ # jr.fill('ambient occlusion', bright r, g, b, dark r, g, b, maximum distance, int samples)
59
+ jr.fill('ambient_occlusion', 150, 255, 255, 0, 0, 255, 50, 16)
60
+ sphere(13)
61
+ translate(27, 0, 0)
62
+ # jr.fill('phong', r, g, b)
63
+ jr.fill('phong', 150, 255, 255)
64
+ sphere(13)
65
+ translate(27, 0, 0)
66
+ # jr.fill('glass', r, g, b)
67
+ jr.fill('glass', 255, 255, 255)
68
+ sphere(13)
69
+ translate(27, 0, 0)
70
+ # jr.fill('constant', r, g, b)
71
+ jr.fill('constant', 150, 255, 255)
72
+ sphere(13)
73
+ pop_matrix
74
+ jr.end_record # Make sure to end record.
75
+ # Display rendered image if render is completed, and the argument is true.
76
+ jr.display_rendered(true)
77
+ end
78
+
79
+ def key_pressed
80
+ jr.render if (key == 'r' || key == 'R') # Press 'r' key to start rendering.
81
+ end
82
+
83
+ def settings
84
+ size(800, 600, P3D)
85
+ end
86
+
87
+ ```
88
+
89
+ ### The Processing Sketch
90
+
91
+ <img src="{{site.github.url}}/assets/media_captured.png" />
92
+
93
+ ### The RayTraced Image
94
+
95
+ <img src="{{site.github.url}}/assets/media_rendered.png" />
96
+
97
+ [fpsunflower]:http://sunflow.sourceforge.net/
98
+ [maven]:https://github.com/monkstone/sunflow
99
+ [joons]:https://github.com/joonhyublee/joons-renderer
100
+ [janino]:http://janino-compiler.github.io/janino/
101
+ [github]:https://github.com/monkstone/joonsrenderer
@@ -8,7 +8,7 @@ Sunflow is an open source global illumination rendering system written in Java w
8
8
 
9
9
  ### test.rb (JRubyArt Sketch)
10
10
  ```ruby
11
- load_library :joonsrenderer
11
+ require 'joonsrenderer'
12
12
  include_package 'joons'
13
13
 
14
14
  attr_reader :jr, :eye, :center, :up, :count, :radius, :file_name
@@ -62,7 +62,7 @@ png2yuv -j Animation_%0.3d.png -f 25 -I p -b 1 > tmp.yuv # zip it all up
62
62
  ffmpeg2theora --optimize --videobitrate 16778 -o Animation.ogv tmp.yuv # convert
63
63
  ```
64
64
 
65
- <video src="/assets/Animation.ogv" poster="/assets/Animation.png" width="800" height="600" controls preload></video>
65
+ <video src="{{site.github.url}}/assets/Animation.ogv" poster="{{site.github.url}}/assets/Animation.png" width="800" height="600" controls preload></video>
66
66
 
67
67
 
68
68
  [fpsunflower]:http://sunflow.sourceforge.net/
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: post
3
+ title: "Resource References"
4
+ date: 2017-01-08 05:00:13
5
+ categories: joonsrenderer update
6
+ ---
7
+ Get some inspiration on [flickr][flickr] and [vimeo][vimeo] (and by [Joon Hyub Lee][joonsvimeo]). See also this [tutorial][tutorial] by Joon Hyub Lee
8
+ and this link to a [pdf][wiki] of a defunct wiki from a sunflow developer.
9
+
10
+ [flickr]:https://www.flickr.com/search/?text=sunflow
11
+ [joonsvimeo]:https://vimeo.com/user4562261
12
+ [vimeo]:https://vimeo.com/search?q=sunflow
13
+ [tutorial]:https://github.com/joonhyublee/joons-renderer/wiki
14
+ [wiki]:https://geneome.com/sunflow-wiki/
@@ -3,9 +3,9 @@ layout: page
3
3
  title: About
4
4
  permalink: /about/
5
5
  ---
6
- JoonsRenderer is a library for Processing by [Joon Hyub Lee][joonhyublee]. It includes the sunflow java raytracer by [Christopher Kulla][fpsunflower], and the necessary janino compiler by [Arno Unkrig][Arno]. In this gem the JoonsLibrary and sunflower libraries are re-compiled (by Martin Prout) for java-8 and to use janino-3.0.6. The gem is designed to be used with [JRubyArt][jruby_art] or [propane][propane], all you need to do is `require 'joonsrenderer'` and `include_package 'joons'` to use the library.
6
+ JoonsRenderer is a library for Processing by [Joon Hyub Lee][joonhyublee]. It includes the sunflow java raytracer by [Christopher Kulla][fpsunflower], and the necessary janino compiler by [Arno Unkrig][Arno]. In this gem the JoonsLibrary and sunflower libraries are re-compiled (by Martin Prout) for java-8 and to use janino-3.0.12 The gem is designed to be used with [JRubyArt][jruby_art] or [propane][propane], all you need to do is `require 'joonsrenderer'` and `include_package 'joons'` to use the library.
7
7
 
8
- [joonhyublee]:https://joonhyublee/joons-renderer/wiki/
8
+ [joonhyublee]:https://github.com/joonhyublee/joons-renderer/wiki
9
9
  [fpsunflower]:https://github.com/fpsunflower/sunflow
10
10
  [Arno]:http://janino-compiler.github.io/janino/
11
11
  [propane]:https://ruby-processing.github.io/propane/
@@ -14,8 +14,8 @@ Gem::Specification.new do |gem|
14
14
  gem.homepage = 'https://ruby-processing.github.io/joonsrenderer/'
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.files << 'lib/joonsrenderer.jar'
17
- gem.files << 'lib/janino-3.0.6.jar'
18
- gem.files << 'lib/commons-compiler-3.0.6.jar'
17
+ gem.files << 'lib/janino-3.1.3.jar'
18
+ gem.files << 'lib/commons-compiler-3.1.3.jar'
19
19
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
20
20
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
21
21
  gem.require_paths = ['lib']
@@ -0,0 +1,7 @@
1
+ module commons.compiler {
2
+ exports org.codehaus.commons.compiler;
3
+ exports org.codehaus.commons.compiler.samples;
4
+ exports org.codehaus.commons.compiler.util;
5
+ exports org.codehaus.commons.nullanalysis;
6
+
7
+ }
@@ -0,0 +1,5 @@
1
+ module janino{
2
+ requires commons.compiler;
3
+ exports org.codehaus.janino;
4
+
5
+ }
@@ -1,3 +1,3 @@
1
1
  module JoonsRenderer
2
- VERSION = '1.1'
2
+ VERSION = '1.3.1'
3
3
  end
data/mvnw ADDED
@@ -0,0 +1,310 @@
1
+ #!/bin/sh
2
+ # ----------------------------------------------------------------------------
3
+ # Licensed to the Apache Software Foundation (ASF) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The ASF licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+ # ----------------------------------------------------------------------------
20
+
21
+ # ----------------------------------------------------------------------------
22
+ # Maven2 Start Up Batch script
23
+ #
24
+ # Required ENV vars:
25
+ # ------------------
26
+ # JAVA_HOME - location of a JDK home dir
27
+ #
28
+ # Optional ENV vars
29
+ # -----------------
30
+ # M2_HOME - location of maven2's installed home dir
31
+ # MAVEN_OPTS - parameters passed to the Java VM when running Maven
32
+ # e.g. to debug Maven itself, use
33
+ # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
+ # MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35
+ # ----------------------------------------------------------------------------
36
+
37
+ if [ -z "$MAVEN_SKIP_RC" ] ; then
38
+
39
+ if [ -f /etc/mavenrc ] ; then
40
+ . /etc/mavenrc
41
+ fi
42
+
43
+ if [ -f "$HOME/.mavenrc" ] ; then
44
+ . "$HOME/.mavenrc"
45
+ fi
46
+
47
+ fi
48
+
49
+ # OS specific support. $var _must_ be set to either true or false.
50
+ cygwin=false;
51
+ darwin=false;
52
+ mingw=false
53
+ case "`uname`" in
54
+ CYGWIN*) cygwin=true ;;
55
+ MINGW*) mingw=true;;
56
+ Darwin*) darwin=true
57
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
58
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
59
+ if [ -z "$JAVA_HOME" ]; then
60
+ if [ -x "/usr/libexec/java_home" ]; then
61
+ export JAVA_HOME="`/usr/libexec/java_home`"
62
+ else
63
+ export JAVA_HOME="/Library/Java/Home"
64
+ fi
65
+ fi
66
+ ;;
67
+ esac
68
+
69
+ if [ -z "$JAVA_HOME" ] ; then
70
+ if [ -r /etc/gentoo-release ] ; then
71
+ JAVA_HOME=`java-config --jre-home`
72
+ fi
73
+ fi
74
+
75
+ if [ -z "$M2_HOME" ] ; then
76
+ ## resolve links - $0 may be a link to maven's home
77
+ PRG="$0"
78
+
79
+ # need this for relative symlinks
80
+ while [ -h "$PRG" ] ; do
81
+ ls=`ls -ld "$PRG"`
82
+ link=`expr "$ls" : '.*-> \(.*\)$'`
83
+ if expr "$link" : '/.*' > /dev/null; then
84
+ PRG="$link"
85
+ else
86
+ PRG="`dirname "$PRG"`/$link"
87
+ fi
88
+ done
89
+
90
+ saveddir=`pwd`
91
+
92
+ M2_HOME=`dirname "$PRG"`/..
93
+
94
+ # make it fully qualified
95
+ M2_HOME=`cd "$M2_HOME" && pwd`
96
+
97
+ cd "$saveddir"
98
+ # echo Using m2 at $M2_HOME
99
+ fi
100
+
101
+ # For Cygwin, ensure paths are in UNIX format before anything is touched
102
+ if $cygwin ; then
103
+ [ -n "$M2_HOME" ] &&
104
+ M2_HOME=`cygpath --unix "$M2_HOME"`
105
+ [ -n "$JAVA_HOME" ] &&
106
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
107
+ [ -n "$CLASSPATH" ] &&
108
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
109
+ fi
110
+
111
+ # For Mingw, ensure paths are in UNIX format before anything is touched
112
+ if $mingw ; then
113
+ [ -n "$M2_HOME" ] &&
114
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
115
+ [ -n "$JAVA_HOME" ] &&
116
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
117
+ fi
118
+
119
+ if [ -z "$JAVA_HOME" ]; then
120
+ javaExecutable="`which javac`"
121
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
122
+ # readlink(1) is not available as standard on Solaris 10.
123
+ readLink=`which readlink`
124
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
125
+ if $darwin ; then
126
+ javaHome="`dirname \"$javaExecutable\"`"
127
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
128
+ else
129
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
130
+ fi
131
+ javaHome="`dirname \"$javaExecutable\"`"
132
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
133
+ JAVA_HOME="$javaHome"
134
+ export JAVA_HOME
135
+ fi
136
+ fi
137
+ fi
138
+
139
+ if [ -z "$JAVACMD" ] ; then
140
+ if [ -n "$JAVA_HOME" ] ; then
141
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
142
+ # IBM's JDK on AIX uses strange locations for the executables
143
+ JAVACMD="$JAVA_HOME/jre/sh/java"
144
+ else
145
+ JAVACMD="$JAVA_HOME/bin/java"
146
+ fi
147
+ else
148
+ JAVACMD="`which java`"
149
+ fi
150
+ fi
151
+
152
+ if [ ! -x "$JAVACMD" ] ; then
153
+ echo "Error: JAVA_HOME is not defined correctly." >&2
154
+ echo " We cannot execute $JAVACMD" >&2
155
+ exit 1
156
+ fi
157
+
158
+ if [ -z "$JAVA_HOME" ] ; then
159
+ echo "Warning: JAVA_HOME environment variable is not set."
160
+ fi
161
+
162
+ CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
163
+
164
+ # traverses directory structure from process work directory to filesystem root
165
+ # first directory with .mvn subdirectory is considered project base directory
166
+ find_maven_basedir() {
167
+
168
+ if [ -z "$1" ]
169
+ then
170
+ echo "Path not specified to find_maven_basedir"
171
+ return 1
172
+ fi
173
+
174
+ basedir="$1"
175
+ wdir="$1"
176
+ while [ "$wdir" != '/' ] ; do
177
+ if [ -d "$wdir"/.mvn ] ; then
178
+ basedir=$wdir
179
+ break
180
+ fi
181
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
182
+ if [ -d "${wdir}" ]; then
183
+ wdir=`cd "$wdir/.."; pwd`
184
+ fi
185
+ # end of workaround
186
+ done
187
+ echo "${basedir}"
188
+ }
189
+
190
+ # concatenates all lines of a file
191
+ concat_lines() {
192
+ if [ -f "$1" ]; then
193
+ echo "$(tr -s '\n' ' ' < "$1")"
194
+ fi
195
+ }
196
+
197
+ BASE_DIR=`find_maven_basedir "$(pwd)"`
198
+ if [ -z "$BASE_DIR" ]; then
199
+ exit 1;
200
+ fi
201
+
202
+ ##########################################################################################
203
+ # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
204
+ # This allows using the maven wrapper in projects that prohibit checking in binary data.
205
+ ##########################################################################################
206
+ if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
207
+ if [ "$MVNW_VERBOSE" = true ]; then
208
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
209
+ fi
210
+ else
211
+ if [ "$MVNW_VERBOSE" = true ]; then
212
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
213
+ fi
214
+ if [ -n "$MVNW_REPOURL" ]; then
215
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
216
+ else
217
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
218
+ fi
219
+ while IFS="=" read key value; do
220
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
221
+ esac
222
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
223
+ if [ "$MVNW_VERBOSE" = true ]; then
224
+ echo "Downloading from: $jarUrl"
225
+ fi
226
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
227
+ if $cygwin; then
228
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
229
+ fi
230
+
231
+ if command -v wget > /dev/null; then
232
+ if [ "$MVNW_VERBOSE" = true ]; then
233
+ echo "Found wget ... using wget"
234
+ fi
235
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
236
+ wget "$jarUrl" -O "$wrapperJarPath"
237
+ else
238
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
239
+ fi
240
+ elif command -v curl > /dev/null; then
241
+ if [ "$MVNW_VERBOSE" = true ]; then
242
+ echo "Found curl ... using curl"
243
+ fi
244
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
245
+ curl -o "$wrapperJarPath" "$jarUrl" -f
246
+ else
247
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
248
+ fi
249
+
250
+ else
251
+ if [ "$MVNW_VERBOSE" = true ]; then
252
+ echo "Falling back to using Java to download"
253
+ fi
254
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
255
+ # For Cygwin, switch paths to Windows format before running javac
256
+ if $cygwin; then
257
+ javaClass=`cygpath --path --windows "$javaClass"`
258
+ fi
259
+ if [ -e "$javaClass" ]; then
260
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
261
+ if [ "$MVNW_VERBOSE" = true ]; then
262
+ echo " - Compiling MavenWrapperDownloader.java ..."
263
+ fi
264
+ # Compiling the Java class
265
+ ("$JAVA_HOME/bin/javac" "$javaClass")
266
+ fi
267
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
268
+ # Running the downloader
269
+ if [ "$MVNW_VERBOSE" = true ]; then
270
+ echo " - Running MavenWrapperDownloader.java ..."
271
+ fi
272
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
273
+ fi
274
+ fi
275
+ fi
276
+ fi
277
+ ##########################################################################################
278
+ # End of extension
279
+ ##########################################################################################
280
+
281
+ export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
282
+ if [ "$MVNW_VERBOSE" = true ]; then
283
+ echo $MAVEN_PROJECTBASEDIR
284
+ fi
285
+ MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
286
+
287
+ # For Cygwin, switch paths to Windows format before running java
288
+ if $cygwin; then
289
+ [ -n "$M2_HOME" ] &&
290
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
291
+ [ -n "$JAVA_HOME" ] &&
292
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
293
+ [ -n "$CLASSPATH" ] &&
294
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
295
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
296
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
297
+ fi
298
+
299
+ # Provide a "standardized" way to retrieve the CLI args that will
300
+ # work with both Windows and non-Windows executions.
301
+ MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
302
+ export MAVEN_CMD_LINE_ARGS
303
+
304
+ WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
305
+
306
+ exec "$JAVACMD" \
307
+ $MAVEN_OPTS \
308
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
309
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
310
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"