buildr 1.3.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +780 -0
- data/DISCLAIMER +7 -0
- data/KEYS +151 -0
- data/LICENSE +176 -0
- data/NOTICE +31 -0
- data/README +173 -0
- data/Rakefile +63 -0
- data/addon/buildr/antlr.rb +65 -0
- data/addon/buildr/cobertura.rb +232 -0
- data/addon/buildr/hibernate.rb +142 -0
- data/addon/buildr/javacc.rb +85 -0
- data/addon/buildr/jdepend.rb +60 -0
- data/addon/buildr/jetty.rb +248 -0
- data/addon/buildr/nailgun.rb +892 -0
- data/addon/buildr/openjpa.rb +90 -0
- data/addon/buildr/org/apache/buildr/JettyWrapper$1.class +0 -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 +144 -0
- data/addon/buildr/xmlbeans.rb +93 -0
- data/bin/buildr +21 -0
- data/buildr.gemspec +50 -0
- data/doc/css/default.css +225 -0
- data/doc/css/print.css +95 -0
- data/doc/css/syntax.css +43 -0
- data/doc/images/apache-incubator-logo.png +0 -0
- data/doc/images/buildr-hires.png +0 -0
- data/doc/images/buildr.png +0 -0
- data/doc/images/note.png +0 -0
- data/doc/images/tip.png +0 -0
- data/doc/images/zbuildr.tif +0 -0
- data/doc/pages/artifacts.textile +317 -0
- data/doc/pages/building.textile +501 -0
- data/doc/pages/contributing.textile +178 -0
- data/doc/pages/download.textile +25 -0
- data/doc/pages/extending.textile +229 -0
- data/doc/pages/getting_started.textile +337 -0
- data/doc/pages/index.textile +63 -0
- data/doc/pages/mailing_lists.textile +17 -0
- data/doc/pages/more_stuff.textile +367 -0
- data/doc/pages/packaging.textile +592 -0
- data/doc/pages/projects.textile +449 -0
- data/doc/pages/recipes.textile +127 -0
- data/doc/pages/settings_profiles.textile +339 -0
- data/doc/pages/testing.textile +475 -0
- data/doc/pages/troubleshooting.textile +121 -0
- data/doc/pages/whats_new.textile +389 -0
- data/doc/print.haml +52 -0
- data/doc/print.toc.yaml +28 -0
- data/doc/scripts/buildr-git.rb +411 -0
- data/doc/scripts/install-jruby.sh +44 -0
- data/doc/scripts/install-linux.sh +64 -0
- data/doc/scripts/install-osx.sh +52 -0
- data/doc/site.haml +55 -0
- data/doc/site.toc.yaml +44 -0
- data/lib/buildr.rb +47 -0
- data/lib/buildr/core.rb +27 -0
- data/lib/buildr/core/application.rb +373 -0
- data/lib/buildr/core/application_cli.rb +134 -0
- data/lib/buildr/core/build.rb +262 -0
- data/lib/buildr/core/checks.rb +382 -0
- data/lib/buildr/core/common.rb +155 -0
- data/lib/buildr/core/compile.rb +594 -0
- data/lib/buildr/core/environment.rb +120 -0
- data/lib/buildr/core/filter.rb +258 -0
- data/lib/buildr/core/generate.rb +195 -0
- data/lib/buildr/core/help.rb +118 -0
- data/lib/buildr/core/progressbar.rb +156 -0
- data/lib/buildr/core/project.rb +890 -0
- data/lib/buildr/core/test.rb +690 -0
- data/lib/buildr/core/transports.rb +486 -0
- data/lib/buildr/core/util.rb +235 -0
- data/lib/buildr/ide.rb +19 -0
- data/lib/buildr/ide/eclipse.rb +181 -0
- data/lib/buildr/ide/idea.ipr.template +300 -0
- data/lib/buildr/ide/idea.rb +194 -0
- data/lib/buildr/ide/idea7x.ipr.template +290 -0
- data/lib/buildr/ide/idea7x.rb +210 -0
- data/lib/buildr/java.rb +26 -0
- data/lib/buildr/java/ant.rb +71 -0
- data/lib/buildr/java/bdd_frameworks.rb +267 -0
- data/lib/buildr/java/commands.rb +210 -0
- data/lib/buildr/java/compilers.rb +432 -0
- data/lib/buildr/java/deprecated.rb +141 -0
- data/lib/buildr/java/groovyc.rb +137 -0
- data/lib/buildr/java/jruby.rb +99 -0
- data/lib/buildr/java/org/apache/buildr/BuildrNail$Main.class +0 -0
- data/lib/buildr/java/org/apache/buildr/BuildrNail.class +0 -0
- data/lib/buildr/java/org/apache/buildr/BuildrNail.java +41 -0
- data/lib/buildr/java/org/apache/buildr/JavaTestFilter.class +0 -0
- data/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +116 -0
- data/lib/buildr/java/packaging.rb +706 -0
- data/lib/buildr/java/pom.rb +178 -0
- data/lib/buildr/java/rjb.rb +142 -0
- data/lib/buildr/java/test_frameworks.rb +290 -0
- data/lib/buildr/java/version_requirement.rb +172 -0
- data/lib/buildr/packaging.rb +21 -0
- data/lib/buildr/packaging/artifact.rb +729 -0
- data/lib/buildr/packaging/artifact_namespace.rb +957 -0
- data/lib/buildr/packaging/artifact_search.rb +140 -0
- data/lib/buildr/packaging/gems.rb +102 -0
- data/lib/buildr/packaging/package.rb +233 -0
- data/lib/buildr/packaging/tar.rb +104 -0
- data/lib/buildr/packaging/zip.rb +719 -0
- data/rakelib/apache.rake +126 -0
- data/rakelib/changelog.rake +56 -0
- data/rakelib/doc.rake +103 -0
- data/rakelib/package.rake +44 -0
- data/rakelib/release.rake +53 -0
- data/rakelib/rspec.rake +81 -0
- data/rakelib/rubyforge.rake +45 -0
- data/rakelib/scm.rake +49 -0
- data/rakelib/setup.rake +59 -0
- data/rakelib/stage.rake +45 -0
- data/spec/application_spec.rb +316 -0
- data/spec/archive_spec.rb +494 -0
- data/spec/artifact_namespace_spec.rb +635 -0
- data/spec/artifact_spec.rb +738 -0
- data/spec/build_spec.rb +193 -0
- data/spec/checks_spec.rb +537 -0
- data/spec/common_spec.rb +579 -0
- data/spec/compile_spec.rb +561 -0
- data/spec/groovy_compilers_spec.rb +239 -0
- data/spec/java_bdd_frameworks_spec.rb +238 -0
- data/spec/java_compilers_spec.rb +446 -0
- data/spec/java_packaging_spec.rb +1042 -0
- data/spec/java_test_frameworks_spec.rb +414 -0
- data/spec/packaging_helper.rb +63 -0
- data/spec/packaging_spec.rb +589 -0
- data/spec/project_spec.rb +739 -0
- data/spec/sandbox.rb +116 -0
- data/spec/scala_compilers_spec.rb +239 -0
- data/spec/spec.opts +6 -0
- data/spec/spec_helpers.rb +283 -0
- data/spec/test_spec.rb +871 -0
- data/spec/transport_spec.rb +300 -0
- data/spec/version_requirement_spec.rb +115 -0
- metadata +324 -0
|
@@ -0,0 +1,90 @@
|
|
|
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 under
|
|
14
|
+
# the License.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
require 'buildr/java'
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
module Buildr
|
|
21
|
+
|
|
22
|
+
# Provides OpenJPA bytecode enhancement and Mapping tool task. Require explicitly using <code>require "buildr/openjpa"</code>.
|
|
23
|
+
module OpenJPA
|
|
24
|
+
|
|
25
|
+
VERSION = "1.0.1"
|
|
26
|
+
|
|
27
|
+
REQUIRES = [ "org.apache.openjpa:openjpa:jar:#{VERSION}",
|
|
28
|
+
"commons-collections:commons-collections:jar:3.1",
|
|
29
|
+
"commons-dbcp:commons-dbcp:jar:1.2.1",
|
|
30
|
+
"commons-lang:commons-lang:jar:2.1",
|
|
31
|
+
"commons-pool:commons-pool:jar:1.2",
|
|
32
|
+
"javax.persistence:persistence-api:jar:1.0",
|
|
33
|
+
"org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.0",
|
|
34
|
+
"org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0",
|
|
35
|
+
"net.sourceforge.serp:serp:jar:1.11.0" ]
|
|
36
|
+
|
|
37
|
+
Java.classpath << REQUIRES
|
|
38
|
+
|
|
39
|
+
class << self
|
|
40
|
+
|
|
41
|
+
def enhance(options)
|
|
42
|
+
rake_check_options options, :classpath, :properties, :output
|
|
43
|
+
artifacts = Buildr.artifacts(options[:classpath]).each { |a| a.invoke }.map(&:to_s) + [options[:output].to_s]
|
|
44
|
+
properties = file(options[:properties]).tap { |task| task.invoke }.to_s
|
|
45
|
+
|
|
46
|
+
Buildr.ant "openjpa" do |ant|
|
|
47
|
+
ant.taskdef :name=>"enhancer", :classname=>"org.apache.openjpa.ant.PCEnhancerTask",
|
|
48
|
+
:classpath=>requires.join(File::PATH_SEPARATOR)
|
|
49
|
+
ant.enhancer :directory=>options[:output].to_s do
|
|
50
|
+
ant.config :propertiesFile=>properties
|
|
51
|
+
ant.classpath :path=>artifacts.join(File::PATH_SEPARATOR)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def mapping_tool(options)
|
|
57
|
+
rake_check_options options, :classpath, :properties, :sql, :action
|
|
58
|
+
artifacts = Buildr.artifacts(options[:classpath]).each{ |a| a.invoke }.map(&:to_s)
|
|
59
|
+
properties = file(options[:properties].to_s).tap { |task| task.invoke }.to_s
|
|
60
|
+
|
|
61
|
+
Buildr.ant("openjpa") do |ant|
|
|
62
|
+
ant.taskdef :name=>"mapping", :classname=>"org.apache.openjpa.jdbc.ant.MappingToolTask",
|
|
63
|
+
:classpath=>requires.join(File::PATH_SEPARATOR)
|
|
64
|
+
ant.mapping :schemaAction=>options[:action], :sqlFile=>options[:sql].to_s, :ignoreErrors=>"true" do
|
|
65
|
+
ant.config :propertiesFile=>properties
|
|
66
|
+
ant.classpath :path=>artifacts.join(File::PATH_SEPARATOR)
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
private
|
|
72
|
+
|
|
73
|
+
def requires()
|
|
74
|
+
@requires ||= Buildr.artifacts(REQUIRES).each { |artifact| artifact.invoke }.map(&:to_s)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def open_jpa_enhance(options = nil)
|
|
80
|
+
jpa_options = { :output=>compile.target, :classpath=>compile.dependencies,
|
|
81
|
+
:properties=>path_to(:source, :main, :resources, 'META-INF/persistence.xml') }
|
|
82
|
+
OpenJPA.enhance jpa_options.merge(options || {})
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
class Project
|
|
88
|
+
include OpenJPA
|
|
89
|
+
end
|
|
90
|
+
end
|
|
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 JettyWrapper {
|
|
39
|
+
|
|
40
|
+
private Server _server;
|
|
41
|
+
private ContextHandlerCollection _handlerColl;
|
|
42
|
+
|
|
43
|
+
public JettyWrapper(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
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
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 under
|
|
14
|
+
# the License.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
require 'buildr/java'
|
|
18
|
+
require 'buildr/java/ant'
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
module Buildr
|
|
22
|
+
|
|
23
|
+
# Provides XMLBeans schema compiler. Require explicitly using <code>require "buildr/xmlbeans"</code>.
|
|
24
|
+
#
|
|
25
|
+
# require 'buildr/xmlbeans'
|
|
26
|
+
# define 'some_proj' do
|
|
27
|
+
# compile_xml_beans _(:source, :main, :xsd) # the directory with *.xsd
|
|
28
|
+
# end
|
|
29
|
+
module XMLBeans
|
|
30
|
+
|
|
31
|
+
# You can use ArtifactNamespace to customize the versions of
|
|
32
|
+
# <code>:xmlbeans</code> or <code>:stax</code> used by this module:
|
|
33
|
+
#
|
|
34
|
+
# require 'buildr/xmlbeans'
|
|
35
|
+
# Buildr::XMLBeans::REQUIRES.xmlbeans = '2.2.0'
|
|
36
|
+
REQUIRES = ArtifactNamespace.for(self) do |ns|
|
|
37
|
+
ns.xmlbeans! 'org.apache.xmlbeans:xmlbeans:jar:2.3.0', '>2'
|
|
38
|
+
ns.stax_api! 'stax:stax-api:jar:>=1.0.1'
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class << self
|
|
42
|
+
|
|
43
|
+
def compile(*args)
|
|
44
|
+
options = Hash === args.last ? args.pop : {}
|
|
45
|
+
options[:verbose] ||= Rake.application.options.trace || false
|
|
46
|
+
rake_check_options options, :verbose, :noop, :javasource, :jar, :compile, :output, :xsb
|
|
47
|
+
puts "Running XMLBeans schema compiler" if verbose
|
|
48
|
+
Buildr.ant "xmlbeans" do |ant|
|
|
49
|
+
ant.taskdef :name=>"xmlbeans", :classname=>"org.apache.xmlbeans.impl.tool.XMLBean",
|
|
50
|
+
:classpath=>requires.join(File::PATH_SEPARATOR)
|
|
51
|
+
ant.xmlbeans :srconly=>"true", :srcgendir=>options[:output].to_s, :classgendir=>options[:output].to_s,
|
|
52
|
+
:javasource=>options[:javasource] do
|
|
53
|
+
args.flatten.each { |file| ant.fileset File.directory?(file) ? { :dir=>file } : { :file=>file } }
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
# Touch paths to let other tasks know there's an update.
|
|
57
|
+
touch options[:output].to_s, :verbose=>false
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def requires()
|
|
61
|
+
@requires ||= REQUIRES.artifacts.each(&:invoke).map(&:to_s)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def compile_xml_beans(*args)
|
|
66
|
+
# Run whenever XSD file changes, but typically we're given an directory of XSD files, or even file patterns
|
|
67
|
+
# (the last FileList is there to deal with things like *.xsdconfig).
|
|
68
|
+
files = args.flatten.map { |file| File.directory?(file) ? FileList["#{file}/*.xsd"] : FileList[file] }.flatten
|
|
69
|
+
# Generate sources and add them to the compile task.
|
|
70
|
+
generated = file(path_to(:target, :generated, :xmlbeans)=>files) do |task|
|
|
71
|
+
XMLBeans.compile args.flatten, :output=>task.name,
|
|
72
|
+
:javasource=>compile.options.source, :xsb=>compile.target
|
|
73
|
+
end
|
|
74
|
+
compile.using(:javac).from(generated).with(*XMLBeans.requires)
|
|
75
|
+
# Once compiled, we need to copy the generated XSB/XSD and one (magical?) class file
|
|
76
|
+
# into the target directory, or the rest is useless.
|
|
77
|
+
compile do |task|
|
|
78
|
+
verbose(false) do
|
|
79
|
+
base = generated.to_s
|
|
80
|
+
FileList["#{base}/**/*.{class,xsb,xsd}"].each do |file|
|
|
81
|
+
target = File.join(compile.target.to_s, Util.relative_path(base, file))
|
|
82
|
+
mkpath File.dirname(target) ; cp file, target
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
class Project
|
|
91
|
+
include XMLBeans
|
|
92
|
+
end
|
|
93
|
+
end
|
data/bin/buildr
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
# contributor license agreements. See the NOTICE file distributed with this
|
|
4
|
+
# work for additional information regarding copyright ownership. The ASF
|
|
5
|
+
# licenses this file to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
13
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
14
|
+
# License for the specific language governing permissions and limitations under
|
|
15
|
+
# the License.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
require 'rubygems'
|
|
19
|
+
require 'buildr'
|
|
20
|
+
|
|
21
|
+
Buildr.application.run
|
data/buildr.gemspec
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
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 under
|
|
14
|
+
# the License.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Gem::Specification.new do |spec|
|
|
18
|
+
spec.name = 'buildr'
|
|
19
|
+
spec.version = '1.3.0'
|
|
20
|
+
spec.author = 'Apache Buildr'
|
|
21
|
+
spec.email = "#{spec.name}-user@incubator.apache.org"
|
|
22
|
+
spec.homepage = "http://incubator.apache.org/#{spec.name}/"
|
|
23
|
+
spec.summary = 'A build system that doesn\'t suck'
|
|
24
|
+
|
|
25
|
+
spec.files = FileList['lib/**/*', 'addon/**/*', 'README', 'CHANGELOG', 'LICENSE', 'NOTICE', 'DISCLAIMER', 'KEYS',
|
|
26
|
+
'*.gemspec', 'Rakefile', 'rakelib/**/*', 'spec/**/*', 'doc/**/*'].to_ary
|
|
27
|
+
spec.require_paths = ['lib', 'addon']
|
|
28
|
+
spec.bindir = 'bin' # Use these for applications.
|
|
29
|
+
spec.executable = 'buildr'
|
|
30
|
+
|
|
31
|
+
spec.has_rdoc = true
|
|
32
|
+
spec.extra_rdoc_files = ['README', 'CHANGELOG', 'LICENSE', 'NOTICE', 'DISCLAIMER']
|
|
33
|
+
spec.rdoc_options << '--title' << "Buildr -- #{spec.summary}" <<
|
|
34
|
+
'--main' << 'README' << '--line-numbers' << '--inline-source' << '-p' <<
|
|
35
|
+
'--webcvs' << 'http://svn.apache.org/repos/asf/incubator/#{spec.name}/trunk/'
|
|
36
|
+
spec.rubyforge_project = 'buildr'
|
|
37
|
+
|
|
38
|
+
# Tested against these dependencies.
|
|
39
|
+
spec.add_dependency 'rake', '~> 0.8'
|
|
40
|
+
spec.add_dependency 'builder', '~> 2.1'
|
|
41
|
+
spec.add_dependency 'net-ssh', '~> 1.1'
|
|
42
|
+
spec.add_dependency 'net-sftp', '~> 1.1'
|
|
43
|
+
spec.add_dependency 'rubyzip', '~> 0.9'
|
|
44
|
+
spec.add_dependency 'highline', '~> 1.4'
|
|
45
|
+
spec.add_dependency 'Antwrap', '~> 0.7'
|
|
46
|
+
spec.add_dependency 'rspec', '~> 1.1'
|
|
47
|
+
spec.add_dependency 'xml-simple', '~> 1.0'
|
|
48
|
+
spec.add_dependency 'archive-tar-minitar', '~> 0.5'
|
|
49
|
+
spec.add_dependency 'rubyforge', '~> 0.4'
|
|
50
|
+
end
|
data/doc/css/default.css
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
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
|
+
body {
|
|
19
|
+
background-color: #fff;
|
|
20
|
+
color: #000;
|
|
21
|
+
font-family: "DejaVu Sans", Verdana, Helvetica;
|
|
22
|
+
text-align: center;
|
|
23
|
+
line-height: 1.5em;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
a:link, a:visited{
|
|
27
|
+
color: #0044b3;
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
a:hover{
|
|
32
|
+
text-decoration: underline;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
img {
|
|
36
|
+
border: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
pre, code { font-family: "DejaVu Sans Mono", "Courier New", "Courier"; }
|
|
40
|
+
pre { padding: 1em; }
|
|
41
|
+
pre.wrapped {
|
|
42
|
+
white-space: pre-wrap; /* css-3 */
|
|
43
|
+
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
h1, h2, h3 {
|
|
47
|
+
padding: 0.3em;
|
|
48
|
+
margin: 2.5em 0 0.5em -0.3em;
|
|
49
|
+
line-height: 1.25em;
|
|
50
|
+
letter-spacing: 0.03em;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
h1 {
|
|
54
|
+
border-bottom: 1px solid #808080;
|
|
55
|
+
font-size: 2em;
|
|
56
|
+
margin-top: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
h2 {
|
|
60
|
+
border-bottom: 1px solid #a0a0a0;
|
|
61
|
+
font-size: 1.3em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
h3 {
|
|
65
|
+
border-bottom: 1px solid #c0c0c0;
|
|
66
|
+
font-size: 1.1em;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
blockquote {
|
|
70
|
+
padding-left: 2em;
|
|
71
|
+
padding-right: 2em;
|
|
72
|
+
margin-left: 0.3em;
|
|
73
|
+
margin-right: 0;
|
|
74
|
+
border-left: 1px solid #3c78b5;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
ul {
|
|
78
|
+
list-style-type: disc;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
ul ul {
|
|
82
|
+
list-style-type: disc;
|
|
83
|
+
padding-left: 1em;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
table {
|
|
87
|
+
border-spacing: 0.2em 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
th, td {
|
|
91
|
+
padding: 0.3em 0.5em 0.3em 0.5em;
|
|
92
|
+
border-bottom: 1px solid #D8D8D8;
|
|
93
|
+
vertical-align: top;
|
|
94
|
+
background-color: #FFFFFF;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
th {
|
|
98
|
+
border-bottom: none;
|
|
99
|
+
background-color: #E5E5E5;
|
|
100
|
+
text-align: left;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
#wrap{
|
|
105
|
+
margin: 1em auto 2em auto;
|
|
106
|
+
text-align: left;
|
|
107
|
+
width: 60em;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
#header {
|
|
112
|
+
margin: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
#header img {
|
|
116
|
+
margin: 0 0 1em 0em;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
#header .tagline {
|
|
120
|
+
float: right;
|
|
121
|
+
font-size: 1.5em;
|
|
122
|
+
font-weight: bold;
|
|
123
|
+
position: relative;
|
|
124
|
+
bottom: 4.5em;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
#pages { /* Parent Wrapper for inside boxes */
|
|
129
|
+
/* display: inline; */ /* IE Hack */
|
|
130
|
+
width: 12em;
|
|
131
|
+
float: left;
|
|
132
|
+
text-align: left;
|
|
133
|
+
margin-right: 2em;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
#pages ol {
|
|
137
|
+
list-style: none;
|
|
138
|
+
font-weight: bold;
|
|
139
|
+
padding: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
#pages ol li {
|
|
143
|
+
border-top: 1px solid #E9E9E9;
|
|
144
|
+
padding: 0.3em 0 0.5em 0.5em;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
#pages ol li a:link, #pages ol li a:visited {
|
|
148
|
+
color: #606060;
|
|
149
|
+
text-decoration: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
#pages ol li a:hover {
|
|
153
|
+
color: #222;
|
|
154
|
+
text-decoration: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
#pages form {
|
|
158
|
+
margin-top: 2em;
|
|
159
|
+
padding: 0.3em 0 0.5em 0.5em;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
#content { /* Parent Wrapper for inside boxes */
|
|
164
|
+
/* display: inline; *//* IE Hack */
|
|
165
|
+
float: right;
|
|
166
|
+
width: 44em;
|
|
167
|
+
margin-left: 0.3em;
|
|
168
|
+
margin-bottom: 5em;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
ol.toc {
|
|
172
|
+
list-style: none;
|
|
173
|
+
padding: 0;
|
|
174
|
+
margin-bottom: 2em !important;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
ol.toc li {
|
|
178
|
+
padding: 0.3em 0 0.3em 0 !important;
|
|
179
|
+
margin: 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
ol.toc ol.toc {
|
|
183
|
+
list-style: none;
|
|
184
|
+
margin: 0.3em 0 0 0 !important;
|
|
185
|
+
padding: 0;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
ol.toc ol.toc li {
|
|
189
|
+
padding-left: 0.5em !important;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
#content p.tip, #content p.note {
|
|
194
|
+
margin: 0.9em 0 0 0;
|
|
195
|
+
padding: 0 0 2em 4em;
|
|
196
|
+
}
|
|
197
|
+
#content p.tip { background: url("../images/tip.png") 0 0 no-repeat; }
|
|
198
|
+
#content p.note { background: url("../images/note.png") 0 0 no-repeat; }
|
|
199
|
+
|
|
200
|
+
#content .footnote {
|
|
201
|
+
margin-top: 2.5em;
|
|
202
|
+
}
|
|
203
|
+
#content .footnote {
|
|
204
|
+
padding-top: 1.5em;
|
|
205
|
+
border-top: 1px solid #ccc;
|
|
206
|
+
}
|
|
207
|
+
#content .footnote + .footnote {
|
|
208
|
+
margin-top: 0.5em;
|
|
209
|
+
padding-top: 0;
|
|
210
|
+
border: none;
|
|
211
|
+
}
|
|
212
|
+
#content .footnote sup { font-weight: bold; }
|
|
213
|
+
|
|
214
|
+
#content .footnote-links dt { font-weight: bold; }
|
|
215
|
+
#content .footnote-links dt:after { content: ": " }
|
|
216
|
+
#content .footnote-links dd { }
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
#footer {
|
|
220
|
+
border-top: 1px solid #444;
|
|
221
|
+
font-size: 0.9em;
|
|
222
|
+
padding: 0.3em;
|
|
223
|
+
margin: 2em 0 3em 0em;
|
|
224
|
+
clear: both;
|
|
225
|
+
}
|