buildr 1.5.3-x86-mswin32 → 1.5.4-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +25 -1
- data/addon/buildr/bnd.rb +8 -2
- data/addon/buildr/findbugs.rb +2 -2
- data/addon/buildr/gpg.rb +7 -1
- data/addon/buildr/gwt.rb +41 -1
- data/addon/buildr/jacoco.rb +18 -18
- data/addon/buildr/jetty.rb +14 -5
- data/addon/buildr/jetty6.rb +243 -0
- data/addon/buildr/org/apache/buildr/Jetty6Wrapper$1.class +0 -0
- data/addon/buildr/org/apache/buildr/Jetty6Wrapper$BuildrHandler.class +0 -0
- data/addon/buildr/org/apache/buildr/Jetty6Wrapper.class +0 -0
- data/addon/buildr/org/apache/buildr/Jetty6Wrapper.java +144 -0
- data/addon/buildr/org/apache/buildr/JettyWrapper$BuildrHandler.class +0 -0
- data/addon/buildr/org/apache/buildr/JettyWrapper.class +0 -0
- data/addon/buildr/org/apache/buildr/JettyWrapper.java +13 -13
- data/buildr.buildfile +7 -1
- data/doc/contributing.textile +0 -19
- data/doc/download.textile +18 -6
- data/doc/index.textile +20 -12
- data/doc/languages.textile +23 -1
- data/doc/packaging.textile +21 -0
- data/lib/buildr/ide/idea.rb +4 -2
- data/lib/buildr/java/commands.rb +1 -1
- data/lib/buildr/kotlin.rb +17 -0
- data/lib/buildr/kotlin/compiler.rb +282 -0
- data/lib/buildr/kotlin/org/apache/buildr/KotlinMessageCollector$1.class +0 -0
- data/lib/buildr/kotlin/org/apache/buildr/KotlinMessageCollector.class +0 -0
- data/lib/buildr/kotlin/org/apache/buildr/KotlinMessageCollector.java +46 -0
- data/lib/buildr/packaging/archive.rb +47 -11
- data/lib/buildr/packaging/package.rb +3 -2
- data/lib/buildr/packaging/tar.rb +51 -16
- data/lib/buildr/packaging/ziptask.rb +45 -17
- data/lib/buildr/version.rb +1 -1
- data/spec/addon/bnd_spec.rb +80 -20
- data/spec/kotlin/compiler_spec.rb +274 -0
- data/spec/packaging/archive_spec.rb +30 -0
- data/spec/sandbox.rb +1 -0
- metadata +13 -3
- data/lib/buildr/scala/org/apache/buildr/Specs2Runner.class +0 -0
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,144 @@
|
|
1
|
+
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
* contributor license agreements. See the NOTICE file distributed with this
|
3
|
+
* work for additional information regarding copyright ownership. The ASF
|
4
|
+
* licenses this file to you under the Apache License, Version 2.0 (the
|
5
|
+
* "License"); 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, WITHOUT
|
12
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
* License for the specific language governing permissions and limitations
|
14
|
+
* under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
|
18
|
+
package org.apache.buildr;
|
19
|
+
|
20
|
+
import org.mortbay.jetty.Server;
|
21
|
+
import org.mortbay.jetty.Request;
|
22
|
+
import org.mortbay.jetty.Handler;
|
23
|
+
import org.mortbay.jetty.handler.AbstractHandler;
|
24
|
+
import org.mortbay.jetty.handler.ContextHandler;
|
25
|
+
import org.mortbay.jetty.handler.ContextHandlerCollection;
|
26
|
+
import org.mortbay.jetty.webapp.WebAppContext;
|
27
|
+
import org.mortbay.jetty.webapp.WebAppClassLoader;
|
28
|
+
|
29
|
+
import javax.servlet.http.HttpServletRequest;
|
30
|
+
import javax.servlet.http.HttpServletResponse;
|
31
|
+
import javax.servlet.ServletException;
|
32
|
+
import java.io.IOException;
|
33
|
+
import java.util.HashMap;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* @author Matthieu Riou <mriou at apache dot org>
|
37
|
+
*/
|
38
|
+
public class Jetty6Wrapper {
|
39
|
+
|
40
|
+
private Server _server;
|
41
|
+
private ContextHandlerCollection _handlerColl;
|
42
|
+
|
43
|
+
public Jetty6Wrapper(int port) throws Exception {
|
44
|
+
_server = new Server(port);
|
45
|
+
// Adding the buildr handler to control our server lifecycle
|
46
|
+
ContextHandler context = new ContextHandler();
|
47
|
+
context.setContextPath("/buildr");
|
48
|
+
Handler handler = new BuildrHandler();
|
49
|
+
context.setHandler(handler);
|
50
|
+
|
51
|
+
_handlerColl = new ContextHandlerCollection();
|
52
|
+
_handlerColl.setHandlers(new Handler[] {context});
|
53
|
+
|
54
|
+
_server.addHandler(_handlerColl);
|
55
|
+
_server.start();
|
56
|
+
}
|
57
|
+
|
58
|
+
/*
|
59
|
+
public void join() {
|
60
|
+
try {
|
61
|
+
_server.join();
|
62
|
+
} catch (Exception e) {
|
63
|
+
e.printStackTrace();
|
64
|
+
}
|
65
|
+
}
|
66
|
+
*/
|
67
|
+
|
68
|
+
private class BuildrHandler extends AbstractHandler {
|
69
|
+
|
70
|
+
private HashMap _apps = new HashMap();
|
71
|
+
|
72
|
+
public void handle(String string, HttpServletRequest request,
|
73
|
+
HttpServletResponse response, int i) throws IOException, ServletException {
|
74
|
+
response.setContentType("text/html");
|
75
|
+
if (request.getPathInfo().equals("/")) {
|
76
|
+
response.getWriter().println("Alive");
|
77
|
+
((Request)request).setHandled(true);
|
78
|
+
return;
|
79
|
+
} else if (request.getPathInfo().equals("/deploy")) {
|
80
|
+
try {
|
81
|
+
String webapp = request.getParameter("webapp");
|
82
|
+
String path = request.getParameter("path");
|
83
|
+
System.out.println("Deploying " + webapp + " in " + path);
|
84
|
+
WebAppContext context;
|
85
|
+
|
86
|
+
context = (WebAppContext) _apps.get(path);
|
87
|
+
if (context != null) {
|
88
|
+
context.stop();
|
89
|
+
_handlerColl.removeHandler(context);
|
90
|
+
_apps.remove(path);
|
91
|
+
}
|
92
|
+
|
93
|
+
context = new WebAppContext(webapp, path);
|
94
|
+
context.setConfigurationClasses(new String[] {
|
95
|
+
"org.mortbay.jetty.webapp.WebInfConfiguration",
|
96
|
+
"org.mortbay.jetty.webapp.WebXmlConfiguration"});
|
97
|
+
context.setClassLoader(new WebAppClassLoader(context));
|
98
|
+
|
99
|
+
_handlerColl.addHandler(context);
|
100
|
+
context.start();
|
101
|
+
_apps.put(path, context);
|
102
|
+
response.getWriter().println("Deployed");
|
103
|
+
response.getWriter().println(context.getTempDirectory());
|
104
|
+
((Request)request).setHandled(true);
|
105
|
+
} catch (Throwable e) {
|
106
|
+
e.printStackTrace();
|
107
|
+
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
108
|
+
((Request)request).setHandled(true);
|
109
|
+
return;
|
110
|
+
}
|
111
|
+
} else if (request.getPathInfo().equals("/undeploy")) {
|
112
|
+
try {
|
113
|
+
String path = request.getParameter("path");
|
114
|
+
WebAppContext context = (WebAppContext) _apps.get(path);
|
115
|
+
if (context != null) {
|
116
|
+
System.out.println("Undeploying app at " + path);
|
117
|
+
context.stop();
|
118
|
+
_handlerColl.removeHandler(context);
|
119
|
+
_apps.remove(path);
|
120
|
+
}
|
121
|
+
response.getWriter().println("Undeployed");
|
122
|
+
((Request)request).setHandled(true);
|
123
|
+
} catch (Throwable e) {
|
124
|
+
e.printStackTrace();
|
125
|
+
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
126
|
+
((Request)request).setHandled(true);
|
127
|
+
return;
|
128
|
+
}
|
129
|
+
} else if (request.getPathInfo().equals("/stop")) {
|
130
|
+
try {
|
131
|
+
_server.stop();
|
132
|
+
_server.destroy();
|
133
|
+
// Brute force
|
134
|
+
System.exit(0);
|
135
|
+
} catch (Exception e) {
|
136
|
+
e.printStackTrace();
|
137
|
+
}
|
138
|
+
}
|
139
|
+
response.getWriter().println("OK " + request.getPathInfo());
|
140
|
+
((Request)request).setHandled(true);
|
141
|
+
}
|
142
|
+
|
143
|
+
}
|
144
|
+
}
|
Binary file
|
Binary file
|
@@ -17,14 +17,14 @@
|
|
17
17
|
|
18
18
|
package org.apache.buildr;
|
19
19
|
|
20
|
-
import org.
|
21
|
-
import org.
|
22
|
-
import org.
|
23
|
-
import org.
|
24
|
-
import org.
|
25
|
-
import org.
|
26
|
-
import org.
|
27
|
-
import org.
|
20
|
+
import org.eclipse.jetty.server.Server;
|
21
|
+
import org.eclipse.jetty.server.Request;
|
22
|
+
import org.eclipse.jetty.server.Handler;
|
23
|
+
import org.eclipse.jetty.server.handler.AbstractHandler;
|
24
|
+
import org.eclipse.jetty.server.handler.ContextHandler;
|
25
|
+
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
|
26
|
+
import org.eclipse.jetty.webapp.WebAppContext;
|
27
|
+
import org.eclipse.jetty.webapp.WebAppClassLoader;
|
28
28
|
|
29
29
|
import javax.servlet.http.HttpServletRequest;
|
30
30
|
import javax.servlet.http.HttpServletResponse;
|
@@ -51,7 +51,7 @@ public class JettyWrapper {
|
|
51
51
|
_handlerColl = new ContextHandlerCollection();
|
52
52
|
_handlerColl.setHandlers(new Handler[] {context});
|
53
53
|
|
54
|
-
_server.
|
54
|
+
_server.setHandler(_handlerColl);
|
55
55
|
_server.start();
|
56
56
|
}
|
57
57
|
|
@@ -69,8 +69,8 @@ public class JettyWrapper {
|
|
69
69
|
|
70
70
|
private HashMap _apps = new HashMap();
|
71
71
|
|
72
|
-
public void handle(String string, HttpServletRequest request,
|
73
|
-
HttpServletResponse response
|
72
|
+
public void handle(String string, Request req, HttpServletRequest request,
|
73
|
+
HttpServletResponse response) throws IOException, ServletException {
|
74
74
|
response.setContentType("text/html");
|
75
75
|
if (request.getPathInfo().equals("/")) {
|
76
76
|
response.getWriter().println("Alive");
|
@@ -92,8 +92,8 @@ public class JettyWrapper {
|
|
92
92
|
|
93
93
|
context = new WebAppContext(webapp, path);
|
94
94
|
context.setConfigurationClasses(new String[] {
|
95
|
-
"org.
|
96
|
-
"org.
|
95
|
+
"org.eclipse.jetty.webapp.WebInfConfiguration",
|
96
|
+
"org.eclipse.jetty.webapp.WebXmlConfiguration"});
|
97
97
|
context.setClassLoader(new WebAppClassLoader(context));
|
98
98
|
|
99
99
|
_handlerColl.addHandler(context);
|
data/buildr.buildfile
CHANGED
@@ -15,8 +15,10 @@
|
|
15
15
|
|
16
16
|
$LOADED_FEATURES << 'jruby' unless RUBY_PLATFORM =~ /java/ # Pretend to have JRuby, keeps Nailgun happy.
|
17
17
|
require 'buildr/jetty'
|
18
|
+
require 'buildr/jetty6'
|
18
19
|
require 'buildr/nailgun'
|
19
20
|
require 'buildr/scala'
|
21
|
+
require 'buildr/kotlin'
|
20
22
|
repositories.remote << 'http://repo1.maven.org/maven2'
|
21
23
|
|
22
24
|
repositories.remote << 'https://oss.sonatype.org/content/groups/scala-tools'
|
@@ -31,10 +33,14 @@ define 'buildr' do
|
|
31
33
|
define 'scala' do
|
32
34
|
compile.using(:javac).from(FileList['lib/buildr/scala/**/*.java']).into('lib/buildr/scala')
|
33
35
|
end
|
36
|
+
|
37
|
+
define 'kotlin' do
|
38
|
+
compile.using(:javac).from(FileList['lib/buildr/kotlin/**/*.java']).into('lib/buildr/kotlin').with(Buildr::Kotlin::Kotlinc.dependencies)
|
39
|
+
end
|
34
40
|
|
35
41
|
desc 'Buildr extra packages (Antlr, Cobertura, Hibernate, Javacc, JDepend, Jetty, OpenJPA, XmlBeans)'
|
36
42
|
define 'extra', :version=>'1.0' do
|
37
|
-
compile.using(:javac).from(FileList['addon/buildr/**/*.java']).into('addon/buildr').with(Buildr::Jetty::REQUIRES, Buildr::Nailgun::ARTIFACT_SPEC)
|
43
|
+
compile.using(:javac).from(FileList['addon/buildr/**/*.java']).into('addon/buildr').with(Buildr::Jetty::REQUIRES, Buildr::Jetty6::REQUIRES, Buildr::Nailgun::ARTIFACT_SPEC)
|
38
44
|
# Legals included in source code and show in RDoc.
|
39
45
|
legal = 'LICENSE', 'NOTICE'
|
40
46
|
package(:gem).include(legal).path('lib').include('addon/buildr')
|
data/doc/contributing.textile
CHANGED
@@ -99,25 +99,6 @@ The _install_ task creates a Gem in your working directory (_pkg/_) and install
|
|
99
99
|
|
100
100
|
Both _setup_ and _install_ tasks use the @sudo@ command on platforms that require it (i.e. not Windows), so there's no need to run @sudo rake@ when working with the Buildr source code.
|
101
101
|
|
102
|
-
|
103
|
-
h3. Using development build
|
104
|
-
|
105
|
-
Occasionally we'll make development builds from the current code in trunk/head. We appreciate if you can take the time to test those out and report any bugs. To install development builds, use the Gem repository at @people.apache.org/~assaf/buildr/snapshot@:
|
106
|
-
|
107
|
-
{% highlight sh %}
|
108
|
-
gem source --add http://people.apache.org/~assaf/buildr/snapshot/
|
109
|
-
{% endhighlight %}
|
110
|
-
|
111
|
-
Since Ruby Gems uses version numbers to detect new releases, if you installed Buildr from a snapshot and want to upgrade to a newer snapshot or the latest official release, you need to use @gem install buildr@ rather than @gem upgrade@.
|
112
|
-
|
113
|
-
If you want to go back to using the RubyForge releases:
|
114
|
-
|
115
|
-
{% highlight sh %}
|
116
|
-
gem source --remove http://people.apache.org/~assaf/buildr/snapshot/
|
117
|
-
gem install buildr
|
118
|
-
{% endhighlight %}
|
119
|
-
|
120
|
-
|
121
102
|
h2(#testing). Tested and Documented
|
122
103
|
|
123
104
|
Two things we definitely encourage!
|
data/doc/download.textile
CHANGED
@@ -18,16 +18,28 @@ The source code is included in both source and binary distribution, the Gem dist
|
|
18
18
|
|
19
19
|
h2(#dist). Binaries and Source Code
|
20
20
|
|
21
|
+
h3. buildr 1.5.3 (2017-05-17)
|
22
|
+
|
23
|
+
|_. Package |_. MD5 Checksum |_. PGP |
|
24
|
+
| "buildr-1.5.3-java.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.5.3/buildr-1.5.3-java.gem | "873c2bfe3060f4d074dc7464c68af837":http://www.apache.org/dist/buildr/1.5.3/buildr-1.5.3-java.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.3/buildr-1.5.3-java.gem.asc |
|
25
|
+
| "buildr-1.5.3-x86-mswin32.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.5.3/buildr-1.5.3-x86-mswin32.gem | "5b1bb8a17b55743910c34e5f20a75b7a":http://www.apache.org/dist/buildr/1.5.3/buildr-1.5.3-x86-mswin32.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.3/buildr-1.5.3-x86-mswin32.gem.asc |
|
26
|
+
| "buildr-1.5.3.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.5.3/buildr-1.5.3.gem | "84c063a3e5f96cd4ea614fe60fb28eac":http://www.apache.org/dist/buildr/1.5.3/buildr-1.5.3.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.3/buildr-1.5.3.gem.asc |
|
27
|
+
| "buildr-1.5.3.tgz":http://www.apache.org/dyn/closer.cgi/buildr/1.5.3/buildr-1.5.3.tgz | "1bb3198d0f8396c02539f6620dedc098":http://www.apache.org/dist/buildr/1.5.3/buildr-1.5.3.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.3/buildr-1.5.3.tgz.asc |
|
28
|
+
| "buildr-1.5.3.zip":http://www.apache.org/dyn/closer.cgi/buildr/1.5.3/buildr-1.5.3.zip | "f8a54f02bac10e714f6f38daca00d7e1":http://www.apache.org/dist/buildr/1.5.3/buildr-1.5.3.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.3/buildr-1.5.3.zip.asc |
|
29
|
+
|
30
|
+
p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.5.3/KEYS)
|
31
|
+
|
32
|
+
|
21
33
|
h3. buildr 1.5.2 (2017-04-03)
|
22
34
|
|
23
35
|
|_. Package |_. MD5 Checksum |_. PGP |
|
24
|
-
| "buildr-1.5.2-java.gem":http://
|
25
|
-
| "buildr-1.5.2-x86-mswin32.gem":http://
|
26
|
-
| "buildr-1.5.2.gem":http://
|
27
|
-
| "buildr-1.5.2.tgz":http://
|
28
|
-
| "buildr-1.5.2.zip":http://
|
36
|
+
| "buildr-1.5.2-java.gem":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2-java.gem | "72ac9122e057112f5699b39ba237432f":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2-java.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2-java.gem.asc |
|
37
|
+
| "buildr-1.5.2-x86-mswin32.gem":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2-x86-mswin32.gem | "0b34fd2fc14236bcecc877901d58080d":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2-x86-mswin32.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2-x86-mswin32.gem.asc |
|
38
|
+
| "buildr-1.5.2.gem":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2.gem | "6645bfa5380490233affa9adb9e388a1":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2.gem.asc |
|
39
|
+
| "buildr-1.5.2.tgz":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2.tgz | "77e4ef6ce1b408943d98c848f86feb10":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2.tgz.md5 | "Sig":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2.tgz.asc |
|
40
|
+
| "buildr-1.5.2.zip":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2.zip | "793d86899fd3c3eb326a0ea920b1275a":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2.zip.md5 | "Sig":http://archive.apache.org/dist/buildr/1.5.2/buildr-1.5.2.zip.asc |
|
29
41
|
|
30
|
-
p>. ("Release signing keys":http://
|
42
|
+
p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.5.2/KEYS)
|
31
43
|
|
32
44
|
|
33
45
|
h3. buildr 1.5.1 (2017-03-11)
|
data/doc/index.textile
CHANGED
@@ -46,23 +46,31 @@ So let's get started. You can "read the documentation online":quick_start.html,
|
|
46
46
|
|
47
47
|
h2(#news). What's New
|
48
48
|
|
49
|
+
Highlights from Buildr 1.5.4 (2017-11-29)
|
50
|
+
* Added: Findbugs Addon: Upgrade to version 3.0.1 of findbugs.
|
51
|
+
* Added: GPG Addon: Add boolean configuration setting `project.gpg` that can be set to false via
|
52
|
+
`project.gpg = false` to avoid signing and uploading packages. This is useful when some
|
53
|
+
projects are not intended for publishing.
|
54
|
+
* Fixed: JaCoCo Addon: Projects that have jacoco disabled will no longer appear in the JaCoCo reports.
|
55
|
+
* Change: JaCoCo Addon: Update JaCoCo version to 0.7.9.
|
56
|
+
* Fixed: BUILDR-733 - Escape classpath entries in the pathing jar manifest. Submitted by Glenn Croes.
|
57
|
+
* Fixed: Ensure that the pom is attached to the jar artifact with empty classifier rather than the last
|
58
|
+
artifact of a type defined. Otherwise a project that defines multiple artifacts of the same type
|
59
|
+
(i.e. `package(:jar)` and `package(:jar, :classifier => :gwt)`) could have the pom named after
|
60
|
+
the package with the classifier rather than the package without a classifer. (i.e. the pom could
|
61
|
+
be incorrectly defined as `mypackage-1.0.0-gwt.pom` rather than `mypackage-1.0.0.pom`).
|
62
|
+
* Added: GWT Addon: Add support for GWT 2.8.2 release and make it the default version unless otherwise specified.
|
63
|
+
* Added: BUILDR-732 - Support bnd version 2.1.0 or more. Submitted By Eric Bruneton.
|
64
|
+
* Added: Support to compiling Kotlin
|
65
|
+
* Added: New way to concatenate file contents when merging several archives together.
|
66
|
+
* Added: New way to transform file contents when merging several archives together.
|
67
|
+
* Added: Support both Jetty 6 and Jetty 9 as addons. Added integration tests to cover their use.
|
68
|
+
|
49
69
|
Highlights from Buildr 1.5.3 (2017-05-17)
|
50
70
|
* Change: Add support for gwt 2.8.1 to gwt addon.
|
51
71
|
* Fixed: Avoid error "undefined local variable or method `pom'" when invoking the `JarTask` without it being
|
52
72
|
registered through the `package` helper`. Reported by Dieter Vrancken.
|
53
73
|
|
54
|
-
Highlights from Buildr 1.5.2 (2017-04-03)
|
55
|
-
* Change: Update TestNG version to 6.11.
|
56
|
-
* Change: BUILDR-731 - Enhance Sonar addon to support configuration of the project version. Submitted by Ross Mahony.
|
57
|
-
* Fixed: Fix pom generation to eliminate invalid `classifier` element from being added to POM.
|
58
|
-
|
59
|
-
Highlights from Buildr 1.5.1 (2017-03-11)
|
60
|
-
* Change: Add css2gss task to gwt addon to support conveting from deprecated css syntax to modern gss syntax.
|
61
|
-
* Change: Add support for gwt 2.8.0 to gwt addon.
|
62
|
-
* Change: Update jruby-openssl to 0.9.17
|
63
|
-
* Change: BUILDR-719 Change User-Agent when uploading artifacts
|
64
|
-
* Change: BUILDR-709 Integrate `buildr/custom_pom` into core and just make it the default pom generated.
|
65
|
-
|
66
74
|
This is a partial list -- see the "CHANGELOG":CHANGELOG for full details.
|
67
75
|
|
68
76
|
h2(#notices). Credits & Notices
|
data/doc/languages.textile
CHANGED
@@ -490,6 +490,29 @@ end
|
|
490
490
|
|
491
491
|
The @doc@ task is *not* joint-compilation aware. Thus, it will only generate ScalaDoc for mixed-source projects, it will not attempt to generate both JavaDoc and ScalaDoc.
|
492
492
|
|
493
|
+
h2(#kotlin). Kotlin
|
494
|
+
|
495
|
+
h3. Compiling Kotlin
|
496
|
+
|
497
|
+
To start using Kotlin, you must first require it on your Buildfile:
|
498
|
+
|
499
|
+
{% highlight ruby %}
|
500
|
+
require 'buildr/kotlin'
|
501
|
+
{% endhighlight %}
|
502
|
+
|
503
|
+
Any project with a .kt file under the @src/main/kotlin@ directory (by default), compiling them into @target/classes@.
|
504
|
+
|
505
|
+
If the project has any java files, they will be compiled using javac.
|
506
|
+
|
507
|
+
|_. Option |_. Usage |
|
508
|
+
| @verbose@ | Asks the compiler for verbose output, true when running in verbose mode. |
|
509
|
+
| @fork@ | Whether to execute groovyc using a spawned instance of the JVM. Defaults to no. |
|
510
|
+
| @warnings@ | Issue warnings when compiling. True when running in verbose mode. |
|
511
|
+
| @debug@ | Generates bytecode with debugging information. Set from the debug environment variable/global option. |
|
512
|
+
| @optimize@ | Generates faster bytecode by applying optimisations to the program. |
|
513
|
+
| @noStdlib@ | Include the Kotlin runtime libraries from KOTLIN_HOME in the classpath of the compiler. |
|
514
|
+
| @target@ | Bytecode compatibility. |
|
515
|
+
| @javac@ | Hash of options passed to the ant javac task. |
|
493
516
|
|
494
517
|
h2(#groovy). Groovy
|
495
518
|
|
@@ -527,7 +550,6 @@ The Groovy compiler supports the following options:
|
|
527
550
|
| @target@ | Bytecode compatibility. |
|
528
551
|
| @javac@ | Hash of options passed to the ant javac task. |
|
529
552
|
|
530
|
-
|
531
553
|
h3. Testing with Groovy
|
532
554
|
|
533
555
|
h4. EasyB
|
data/doc/packaging.textile
CHANGED
@@ -142,6 +142,8 @@ For example, when you use @package :jar@, under the hood it specifies to include
|
|
142
142
|
|
143
143
|
If you need to get rid of all the included files, call the @clean@ method. Some packaging types default to adding various files and directories, for example, JAR packaging will include all the compiled classes and resources.
|
144
144
|
|
145
|
+
h2(#merging). Merging archives
|
146
|
+
|
145
147
|
You can also merge two ZIP files together, expanding the content of one ZIP into the other. For example:
|
146
148
|
|
147
149
|
{% highlight ruby %}
|
@@ -155,6 +157,25 @@ If you need to be more selective, you can apply the include/exclude pattern to t
|
|
155
157
|
package(:zip).merge(_('bigbad.war')).exclude('libs/**/*')
|
156
158
|
{% endhighlight %}
|
157
159
|
|
160
|
+
h3(#transforming). Transforming files while merging them
|
161
|
+
|
162
|
+
You may need to have special treatment for files that you are merging from multiple locations.
|
163
|
+
|
164
|
+
If you wish to concatenate the file contents, you can perform the following:
|
165
|
+
|
166
|
+
{% highlight ruby %}
|
167
|
+
package(:zip).merge(_('part1.zip'), _('part2.zip')).concatenate('META-INF/services/spring.providers')
|
168
|
+
{% endhighlight %}
|
169
|
+
|
170
|
+
If you need to transform the file contents to assemble the final output, you can work with the @transform@ method.
|
171
|
+
The transform method takes a block to process the contents of all the matching paths, as the zip file is assembled.
|
172
|
+
|
173
|
+
{% highlight ruby %}
|
174
|
+
package(:zip).merge(_('part1.zip'), _('part2.zip')).transform('plugin.xml') do |plugin_xml_files|
|
175
|
+
return "<plugin>#{plugin_xml_files.map {|xml| xml.match('<plugin>(.*)</plugin>')[1]}}</plugin>"
|
176
|
+
end
|
177
|
+
{% endhighlight %}
|
178
|
+
|
158
179
|
|
159
180
|
h2(#jar). Packaging JARs
|
160
181
|
|
data/lib/buildr/ide/idea.rb
CHANGED
@@ -997,11 +997,13 @@ module Buildr #:nodoc:
|
|
997
997
|
xml.option(:name => 'RUN_PAGE', :value => launch_page) if launch_page
|
998
998
|
xml.option(:name => 'GWT_MODULE', :value => gwt_module) if gwt_module
|
999
999
|
|
1000
|
+
# noinspection RubySimplifyBooleanInspection
|
1001
|
+
xml.option(:name => 'OPEN_IN_BROWSER', :value => false) if options[:open_in_browser] == false
|
1000
1002
|
xml.option(:name => 'START_JAVASCRIPT_DEBUGGER', :value => start_javascript_debugger)
|
1001
1003
|
xml.option(:name => 'USE_SUPER_DEV_MODE', :value => super_dev)
|
1002
1004
|
xml.option(:name => 'SHELL_PARAMETERS', :value => shell_parameters) if shell_parameters
|
1003
1005
|
|
1004
|
-
xml.RunnerSettings(:RunnerId => 'Debug') do
|
1006
|
+
xml.RunnerSettings(:RunnerId => 'Debug') do
|
1005
1007
|
xml.option(:name => 'DEBUG_PORT', :value => '')
|
1006
1008
|
xml.option(:name => 'TRANSPORT', :value => 0)
|
1007
1009
|
xml.option(:name => 'LOCAL', :value => true)
|
@@ -1010,7 +1012,7 @@ module Buildr #:nodoc:
|
|
1010
1012
|
xml.RunnerSettings(:RunnerId => 'Run')
|
1011
1013
|
xml.ConfigurationWrapper(:RunnerId => 'Run')
|
1012
1014
|
xml.ConfigurationWrapper(:RunnerId => 'Debug')
|
1013
|
-
xml.method
|
1015
|
+
xml.method
|
1014
1016
|
end
|
1015
1017
|
end
|
1016
1018
|
|
data/lib/buildr/java/commands.rb
CHANGED
@@ -73,7 +73,7 @@ module Java
|
|
73
73
|
path = File.directory?(c) && !c.end_with?('/') ? "#{c}/" : c.to_s
|
74
74
|
Buildr::Util.win_os? ? "/#{path}" : path
|
75
75
|
end
|
76
|
-
manifest = Buildr::Packaging::Java::Manifest.new([{'Class-Path' => paths.join(" ")}])
|
76
|
+
manifest = Buildr::Packaging::Java::Manifest.new([{'Class-Path' => paths.map{|p| URI.encode(p)}.join(" ")}])
|
77
77
|
tjar = Tempfile.new(['javacmd', '.jar'])
|
78
78
|
Zip::OutputStream.open(tjar.path) do |zos|
|
79
79
|
zos.put_next_entry('META-INF/MANIFEST.MF')
|