tetra 0.46.0 → 0.48.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rubocop.yml +6 -0
- data/README.md +5 -12
- data/SPECIAL_CASES.md +3 -74
- data/integration-tests/build-commons.sh +5 -8
- data/lib/template/kit/CONTENTS +4 -3
- data/lib/template/kit/apache-ant-1.9.4/INSTALL +2 -0
- data/lib/template/kit/apache-ant-1.9.4/KEYS +1497 -0
- data/lib/template/kit/apache-ant-1.9.4/LICENSE +272 -0
- data/lib/template/kit/apache-ant-1.9.4/NOTICE +9 -0
- data/lib/template/kit/apache-ant-1.9.4/README +97 -0
- data/lib/template/kit/apache-ant-1.9.4/WHATSNEW +6108 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/ant +336 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/ant.bat +218 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/ant.cmd +93 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antRun +24 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antRun.bat +50 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antRun.pl +66 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antenv.cmd +98 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/complete-ant-cmd.pl +114 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/envset.cmd +131 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/lcp.bat +31 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/runant.pl +153 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/runant.py +102 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/runrc.cmd +60 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/ant-bootstrap.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/changelog.xsl +148 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-frames.xsl +299 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-text.xsl +34 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-xdoc.xsl +130 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/coverage-frames.xsl +489 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/jdepend-frames.xsl +487 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/jdepend.xsl +276 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/junit-frames-xalan1.xsl +745 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/junit-frames.xsl +955 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/junit-noframes.xsl +496 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/log.xsl +203 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/maudit-frames.xsl +503 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/mmetrics-frames.xsl +1026 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/tagdiff.xsl +179 -0
- data/lib/template/kit/apache-ant-1.9.4/fetch.xml +335 -0
- data/lib/template/kit/apache-ant-1.9.4/get-m2.xml +121 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/README +3 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-antlr.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-antlr.pom +75 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bcel.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bcel.pom +71 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bsf.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bsf.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-log4j.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-log4j.pom +69 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-oro.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-oro.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-regexp.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-regexp.pom +70 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-resolver.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-resolver.pom +69 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-xalan2.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-xalan2.pom +94 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-logging.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-logging.pom +70 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-net.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-net.pom +75 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jai.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jai.pom +85 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-javamail.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-javamail.pom +78 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jdepend.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jdepend.pom +72 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jmf.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jmf.pom +65 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jsch.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jsch.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit.pom +101 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit4.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit4.pom +71 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-launcher.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-launcher.pom +57 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-netrexx.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-netrexx.pom +98 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-parent.pom +151 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-swing.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-swing.pom +66 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-testutil.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-testutil.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant.pom +225 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/libraries.properties +65 -0
- data/lib/template/kit/apache-maven-3.2.5/LICENSE +302 -0
- data/lib/template/kit/apache-maven-3.2.5/NOTICE +8 -0
- data/lib/template/kit/apache-maven-3.2.5/README.txt +77 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/m2.conf +8 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvn +202 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvn.bat +197 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvnDebug +200 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvnDebug.bat +200 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvnyjp +207 -0
- data/lib/template/kit/apache-maven-3.2.5/boot/plexus-classworlds-2.5.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/conf/logging/simplelogger.properties +25 -0
- data/lib/template/kit/apache-maven-3.2.5/conf/settings.xml +257 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-api-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-api.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-connector-basic-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-connector-basic.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-impl-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-impl.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-spi-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-spi.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-transport-wagon-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-transport-wagon.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-util-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-util.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aopalliance-1.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/cdi-api-1.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/cdi-api.license +445 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/commons-cli-1.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/commons-io-2.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/commons-lang-2.6.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/ext/README.txt +2 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/guava-18.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/javax.inject-1.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsoup-1.7.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsoup.license +66 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsr250-api-1.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsr250-api.license +406 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-aether-provider-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-aether-provider.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-artifact-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-artifact.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-compat-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-compat.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-core-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-core.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-embedder-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-embedder.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-builder-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-builder.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-plugin-api-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-plugin-api.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-repository-metadata-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-repository-metadata.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-builder-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-builder.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.inject-0.3.0.M1.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.inject.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.plexus-0.3.0.M1.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.plexus.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-cipher-1.7.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-cipher.license +445 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-component-annotations-1.5.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-interpolation-1.21.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-sec-dispatcher-1.3.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-sec-dispatcher.license +445 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-utils-3.0.20.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/sisu-guice-3.2.3-no_aop.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-api-1.7.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-api.license +190 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-simple-1.7.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-simple.license +190 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-file-2.8.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-file.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-2.8-shaded.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-shared-2.8.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-shared.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-provider-api-2.8.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-provider-api.license +202 -0
- data/lib/tetra.rb +30 -29
- data/lib/tetra/facades/ant.rb +27 -0
- data/lib/tetra/{git.rb → facades/git.rb} +29 -24
- data/lib/tetra/facades/mvn.rb +44 -0
- data/lib/tetra/facades/process_runner.rb +65 -0
- data/lib/tetra/facades/tar.rb +20 -0
- data/lib/tetra/{kit_runner.rb → kit.rb} +3 -10
- data/lib/tetra/main.rb +12 -36
- data/lib/tetra/maven_website.rb +1 -1
- data/lib/tetra/packages/archivable.rb +3 -11
- data/lib/tetra/packages/{kit.rb → kit_package.rb} +1 -1
- data/lib/tetra/packages/{built_package.rb → package.rb} +2 -2
- data/lib/tetra/packages/scriptable.rb +27 -15
- data/lib/tetra/project.rb +18 -14
- data/lib/tetra/{commands/ant.rb → ui/ant_subcommand.rb} +5 -5
- data/lib/tetra/ui/dry_run_subcommand.rb +44 -0
- data/lib/tetra/{commands/generate_all.rb → ui/generate_all_subcommand.rb} +5 -5
- data/lib/tetra/{commands/generate_archive.rb → ui/generate_archive_subcommand.rb} +2 -2
- data/lib/tetra/{commands/generate_kit.rb → ui/generate_kit_subcommand.rb} +2 -2
- data/lib/tetra/{commands/generate_script.rb → ui/generate_script_subcommand.rb} +2 -2
- data/lib/tetra/{commands/generate_spec.rb → ui/generate_spec_subcommand.rb} +2 -2
- data/lib/tetra/{commands/get_pom.rb → ui/get_pom_subcommand.rb} +1 -1
- data/lib/tetra/{commands/init.rb → ui/init_subcommand.rb} +1 -1
- data/lib/tetra/{commands/move_jars_to_kit.rb → ui/move_jars_to_kit_subcommand.rb} +1 -1
- data/lib/tetra/{commands/mvn.rb → ui/mvn_subcommand.rb} +5 -5
- data/lib/tetra/{commands/base.rb → ui/subcommand.rb} +19 -6
- data/lib/tetra/version.rb +1 -1
- data/spec/lib/ant_spec.rb +36 -0
- data/spec/lib/archivable_spec.rb +1 -1
- data/spec/lib/built_package_spec.rb +6 -6
- data/spec/lib/kit_package_spec.rb +47 -0
- data/spec/lib/kit_spec.rb +8 -28
- data/spec/lib/mvn_spec.rb +47 -0
- data/spec/lib/project_spec.rb +11 -11
- data/spec/lib/scriptable_spec.rb +8 -16
- data/spec/spec_helper.rb +13 -4
- data/tetra.gemspec +1 -0
- metadata +207 -31
- data/lib/tetra/ant_runner.rb +0 -27
- data/lib/tetra/commands/download_maven_source_jars.rb +0 -29
- data/lib/tetra/commands/dry_run.rb +0 -17
- data/lib/tetra/commands/finish.rb +0 -22
- data/lib/tetra/commands/get_source.rb +0 -30
- data/lib/tetra/commands/list_kit_missing_sources.rb +0 -21
- data/lib/tetra/kit_checker.rb +0 -104
- data/lib/tetra/maven_runner.rb +0 -43
- data/lib/tetra/source_getter.rb +0 -41
- data/spec/lib/ant_runner_spec.rb +0 -45
- data/spec/lib/kit_checker_spec.rb +0 -119
- data/spec/lib/maven_runner_spec.rb +0 -68
- data/spec/lib/source_getter_spec.rb +0 -36
- data/spec/support/kit_runner_examples.rb +0 -15
@@ -0,0 +1,131 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
5
|
+
this work for additional information regarding copyright ownership.
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
8
|
+
the License. You may obtain a copy of the License at
|
9
|
+
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
See the License for the specific language governing permissions and
|
16
|
+
limitations under the License.
|
17
|
+
|
18
|
+
SET environment variables
|
19
|
+
First optional parameter:
|
20
|
+
; parameters are considered parts of a path variable, semicolons are
|
21
|
+
appended to each element if not already present
|
22
|
+
-D parameters are properties for Java or Makefile etc., -D will be
|
23
|
+
prepended and the parameters will be separated by a space
|
24
|
+
=D the same as above but equal sign is not required
|
25
|
+
, parameters should be comma separated in the environment variable
|
26
|
+
- parameters should be separated by the next parameter
|
27
|
+
Other values mean that the first parameter is missing and the environment
|
28
|
+
variable will be set to the space separated parameters
|
29
|
+
|
30
|
+
Second parameter: name of the environment variable
|
31
|
+
|
32
|
+
Next parameters: values
|
33
|
+
; implies that the equal sign is considered a part of the parameter and is
|
34
|
+
not interpreted
|
35
|
+
|
36
|
+
-D requires parameters in the form name=value. If the equal sign is not found,
|
37
|
+
the parameters are changed to name=expanded_name
|
38
|
+
|
39
|
+
Other options have optional equal sign. If it is found, only the part after
|
40
|
+
the equal sign will be oprionally expanded.
|
41
|
+
|
42
|
+
If the parameter is the minus sign, the next parameter will not be expanded.
|
43
|
+
If the parameter is a single dot, it will be replaced with the value of the
|
44
|
+
environment variable as it existed before envset was invoked.
|
45
|
+
|
46
|
+
For other parameters the batch looks for the environment variable with the
|
47
|
+
same name (in uppercase). If it is found, it forms the expanded_name. If
|
48
|
+
the environment variable with such a name does not exist, the expanded_name
|
49
|
+
will hold the parameter name without case conversion.
|
50
|
+
*/
|
51
|
+
|
52
|
+
parse arg mode envar args
|
53
|
+
|
54
|
+
equal = 0
|
55
|
+
sep = ' '
|
56
|
+
|
57
|
+
/* Parse command line parameters */
|
58
|
+
select
|
59
|
+
when mode='-' then do
|
60
|
+
sep = envar
|
61
|
+
parse var args envar args
|
62
|
+
end
|
63
|
+
when mode=';' then do
|
64
|
+
sep = ''
|
65
|
+
equal = -1
|
66
|
+
end
|
67
|
+
when mode='-D' then equal = 1
|
68
|
+
when mode='=D' then mode = '-D'
|
69
|
+
when mode=',' then sep = ','
|
70
|
+
otherwise
|
71
|
+
args = envar args
|
72
|
+
envar = mode
|
73
|
+
mode = ''
|
74
|
+
end
|
75
|
+
|
76
|
+
env = 'OS2ENVIRONMENT'
|
77
|
+
envar = translate(envar)
|
78
|
+
orig = value(envar,,env)
|
79
|
+
newval = ''
|
80
|
+
expand = 1
|
81
|
+
|
82
|
+
/* for each parameter... */
|
83
|
+
do i = 1 to words(args)
|
84
|
+
if expand > 0 & word(args, i) = '-' then expand = 0
|
85
|
+
else call addval word(args, i)
|
86
|
+
end
|
87
|
+
|
88
|
+
/* Optionally enclose path variable by quotes */
|
89
|
+
if mode = ';' & pos(' ', newval) > 0 then newval = '"' || newval || '"'
|
90
|
+
|
91
|
+
/* Set the new value, 'SET' cannot be used since it does not allow '=' */
|
92
|
+
x = value(envar, newval, env)
|
93
|
+
exit 0
|
94
|
+
|
95
|
+
addval: procedure expose sep equal orig expand newval mode env
|
96
|
+
parse arg var
|
97
|
+
|
98
|
+
if var = '.' then expvar = orig
|
99
|
+
else do
|
100
|
+
if equal >= 0 then do
|
101
|
+
parse var var name '=' val
|
102
|
+
if val = '' then var = name
|
103
|
+
else var = val
|
104
|
+
end
|
105
|
+
if expand = 0 then expvar = var
|
106
|
+
else expvar = value(translate(var),,env)
|
107
|
+
if expvar = '' then expvar = var
|
108
|
+
if equal >= 0 then do
|
109
|
+
if val = '' then do
|
110
|
+
parse var expvar key '=' val
|
111
|
+
if val <> '' then name = key
|
112
|
+
else do
|
113
|
+
if equal > 0 then val = key
|
114
|
+
else name = key
|
115
|
+
end
|
116
|
+
end
|
117
|
+
else val = expvar
|
118
|
+
if pos(' ', val) > 0 | pos('=', val) > 0 then val = '"' || val || '"'
|
119
|
+
if val = '' then expvar = name
|
120
|
+
else expvar = name || '=' || val
|
121
|
+
end
|
122
|
+
if mode = '-D' then expvar = '-D' || expvar
|
123
|
+
if mode = ';' then do
|
124
|
+
if right(expvar, 1) <> ';' then expvar = expvar || ';'
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
if newval = '' then newval = expvar
|
129
|
+
else newval = newval || sep || expvar
|
130
|
+
expand = 1
|
131
|
+
return
|
@@ -0,0 +1,31 @@
|
|
1
|
+
REM
|
2
|
+
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
3
|
+
REM contributor license agreements. See the NOTICE file distributed with
|
4
|
+
REM this work for additional information regarding copyright ownership.
|
5
|
+
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
6
|
+
REM (the "License"); you may not use this file except in compliance with
|
7
|
+
REM the License. You may obtain a copy of the License at
|
8
|
+
REM
|
9
|
+
REM http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
REM
|
11
|
+
REM Unless required by applicable law or agreed to in writing, software
|
12
|
+
REM distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
REM See the License for the specific language governing permissions and
|
15
|
+
REM limitations under the License.
|
16
|
+
REM
|
17
|
+
REM
|
18
|
+
|
19
|
+
set _CLASSPATHCOMPONENT=%1
|
20
|
+
if ""%1""=="""" goto gotAllArgs
|
21
|
+
shift
|
22
|
+
|
23
|
+
:argCheck
|
24
|
+
if ""%1""=="""" goto gotAllArgs
|
25
|
+
set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
|
26
|
+
shift
|
27
|
+
goto argCheck
|
28
|
+
|
29
|
+
:gotAllArgs
|
30
|
+
set LOCALCLASSPATH=%LOCALCLASSPATH%;%_CLASSPATHCOMPONENT%
|
31
|
+
|
@@ -0,0 +1,153 @@
|
|
1
|
+
#!/usr/bin/perl
|
2
|
+
#
|
3
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
# contributor license agreements. See the NOTICE file distributed with
|
5
|
+
# this work for additional information regarding copyright ownership.
|
6
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
# (the "License"); you may not use this file except in compliance with
|
8
|
+
# the License. You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
#######################################################################
|
19
|
+
#
|
20
|
+
# runant.pl
|
21
|
+
#
|
22
|
+
# wrapper script for invoking ant in a platform with Perl installed
|
23
|
+
# this may include cgi-bin invocation, which is considered somewhat daft.
|
24
|
+
# (slo: that should be a separate file which can be derived from this
|
25
|
+
# and returns the XML formatted output)
|
26
|
+
#
|
27
|
+
# the code is not totally portable due to classpath and directory splitting
|
28
|
+
# issues. oops. (NB, use File::Spec::Functions will help and the code is
|
29
|
+
# structured for the catfile() call, but because of perl version funnies
|
30
|
+
# the code is not included.
|
31
|
+
#
|
32
|
+
# created: 2000-8-24
|
33
|
+
# author: Steve Loughran steve_l@sourceforge.net
|
34
|
+
#######################################################################
|
35
|
+
#
|
36
|
+
# Assumptions:
|
37
|
+
#
|
38
|
+
# - the "java" executable/script is on the command path
|
39
|
+
# - ANT_HOME has been set
|
40
|
+
# - target platform uses ":" as classpath separator or perl indicates it is dos/win32
|
41
|
+
# - target platform uses "/" as directory separator.
|
42
|
+
|
43
|
+
#be fussy about variables
|
44
|
+
use strict;
|
45
|
+
|
46
|
+
#platform specifics (disabled)
|
47
|
+
#use File::Spec::Functions;
|
48
|
+
|
49
|
+
#turn warnings on during dev; generates a few spurious uninitialised var access warnings
|
50
|
+
#use warnings;
|
51
|
+
|
52
|
+
#and set $debug to 1 to turn on trace info
|
53
|
+
my $debug=1;
|
54
|
+
|
55
|
+
#######################################################################
|
56
|
+
#
|
57
|
+
# check to make sure environment is setup
|
58
|
+
#
|
59
|
+
|
60
|
+
my $HOME = $ENV{ANT_HOME};
|
61
|
+
if ($HOME eq "")
|
62
|
+
{
|
63
|
+
die "\n\nANT_HOME *MUST* be set!\n\n";
|
64
|
+
}
|
65
|
+
|
66
|
+
my $JAVACMD = $ENV{JAVACMD};
|
67
|
+
$JAVACMD = "java" if $JAVACMD eq "";
|
68
|
+
|
69
|
+
my $onnetware = 0;
|
70
|
+
if ($^O eq "NetWare")
|
71
|
+
{
|
72
|
+
$onnetware = 1;
|
73
|
+
}
|
74
|
+
|
75
|
+
my $oncygwin = ($^O eq "cygwin");
|
76
|
+
|
77
|
+
#ISSUE: what java wants to split up classpath varies from platform to platform
|
78
|
+
#and perl is not too hot at hinting which box it is on.
|
79
|
+
#here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed.
|
80
|
+
my $s=":";
|
81
|
+
if(($^O eq "MSWin32") || ($^O eq "dos") || ($^O eq "cygwin") ||
|
82
|
+
($onnetware == 1))
|
83
|
+
{
|
84
|
+
$s=";";
|
85
|
+
}
|
86
|
+
|
87
|
+
#build up standard classpath
|
88
|
+
my $localpath = "$HOME/lib/ant-launcher.jar";
|
89
|
+
#set JVM options and Ant arguments, if any
|
90
|
+
my @ANT_OPTS=split(" ", $ENV{ANT_OPTS});
|
91
|
+
my @ANT_ARGS=split(" ", $ENV{ANT_ARGS});
|
92
|
+
|
93
|
+
#jikes
|
94
|
+
if($ENV{JIKESPATH} ne "")
|
95
|
+
{
|
96
|
+
push @ANT_OPTS, "-Djikes.class.path=$ENV{JIKESPATH}";
|
97
|
+
}
|
98
|
+
|
99
|
+
#construct arguments to java
|
100
|
+
my @ARGS;
|
101
|
+
push @ARGS, @ANT_OPTS;
|
102
|
+
|
103
|
+
my $CYGHOME = "";
|
104
|
+
|
105
|
+
my $classpath=$ENV{CLASSPATH};
|
106
|
+
if ($oncygwin == 1) {
|
107
|
+
$localpath = `cygpath --path --windows $localpath`;
|
108
|
+
chomp ($localpath);
|
109
|
+
if (! $classpath eq "")
|
110
|
+
{
|
111
|
+
$classpath = `cygpath --path --windows "$classpath"`;
|
112
|
+
chomp ($classpath);
|
113
|
+
}
|
114
|
+
$HOME = `cygpath --path --windows $HOME`;
|
115
|
+
chomp ($HOME);
|
116
|
+
$CYGHOME = `cygpath --path --windows $ENV{HOME}`;
|
117
|
+
chomp ($CYGHOME);
|
118
|
+
}
|
119
|
+
push @ARGS, "-classpath", "$localpath";
|
120
|
+
push @ARGS, "-Dant.home=$HOME";
|
121
|
+
if ( ! $CYGHOME eq "" )
|
122
|
+
{
|
123
|
+
push @ARGS, "-Dcygwin.user.home=\"$CYGHOME\""
|
124
|
+
}
|
125
|
+
push @ARGS, "org.apache.tools.ant.launch.Launcher", @ANT_ARGS;
|
126
|
+
push @ARGS, @ARGV;
|
127
|
+
if (! $classpath eq "")
|
128
|
+
{
|
129
|
+
if ($onnetware == 1)
|
130
|
+
{
|
131
|
+
# make classpath literally $CLASSPATH
|
132
|
+
# this is to avoid pushing us over the 512 character limit
|
133
|
+
# even skip the ; - that is already in $localpath
|
134
|
+
push @ARGS, "-lib", "\$CLASSPATH";
|
135
|
+
}
|
136
|
+
else
|
137
|
+
{
|
138
|
+
push @ARGS, "-lib", "$classpath";
|
139
|
+
}
|
140
|
+
}
|
141
|
+
print "\n $JAVACMD @ARGS\n\n" if ($debug);
|
142
|
+
|
143
|
+
my $returnValue = system $JAVACMD, @ARGS;
|
144
|
+
if ($returnValue eq 0)
|
145
|
+
{
|
146
|
+
exit 0;
|
147
|
+
}
|
148
|
+
else
|
149
|
+
{
|
150
|
+
# only 0 and 1 are widely recognized as exit values
|
151
|
+
# so change the exit value to 1
|
152
|
+
exit 1;
|
153
|
+
}
|
@@ -0,0 +1,102 @@
|
|
1
|
+
#!/usr/bin/python
|
2
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
3
|
+
# contributor license agreements. See the NOTICE file distributed with
|
4
|
+
# this work for additional information regarding copyright ownership.
|
5
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
6
|
+
# (the "License"); you may not use this file except in compliance with
|
7
|
+
# the License. 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,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
#
|
17
|
+
|
18
|
+
"""
|
19
|
+
|
20
|
+
runant.py
|
21
|
+
|
22
|
+
This script is a translation of the runant.pl written by Steve Loughran.
|
23
|
+
It runs ant with/out arguments, it should be quite portable (thanks to
|
24
|
+
the python os library)
|
25
|
+
This script has been tested with Python2.0/Win2K
|
26
|
+
|
27
|
+
created: 2001-04-11
|
28
|
+
author: Pierre Dittgen pierre.dittgen@criltelecom.com
|
29
|
+
|
30
|
+
Assumptions:
|
31
|
+
|
32
|
+
- the "java" executable/script is on the command path
|
33
|
+
"""
|
34
|
+
import os, os.path, string, sys
|
35
|
+
|
36
|
+
# Change it to 1 to get extra debug information
|
37
|
+
debug = 0
|
38
|
+
|
39
|
+
#######################################################################
|
40
|
+
|
41
|
+
# If ANT_HOME is not set default to script's parent directory
|
42
|
+
if os.environ.has_key('ANT_HOME'):
|
43
|
+
ANT_HOME = os.environ['ANT_HOME']
|
44
|
+
else:
|
45
|
+
ANT_HOME = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
|
46
|
+
|
47
|
+
# set ANT_LIB location
|
48
|
+
ANT_LIB = os.path.join(ANT_HOME, 'lib')
|
49
|
+
|
50
|
+
# set JAVACMD (check variables JAVACMD and JAVA_HOME)
|
51
|
+
JAVACMD = None
|
52
|
+
if not os.environ.has_key('JAVACMD'):
|
53
|
+
if os.environ.has_key('JAVA_HOME'):
|
54
|
+
if not os.path.exists(os.environ['JAVA_HOME']):
|
55
|
+
print "Warning: JAVA_HOME is not defined correctly."
|
56
|
+
else:
|
57
|
+
JAVACMD = os.path.join(os.environ['JAVA_HOME'], 'bin', 'java')
|
58
|
+
else:
|
59
|
+
print "Warning: JAVA_HOME not set."
|
60
|
+
else:
|
61
|
+
JAVACMD = os.environ['JAVACMD']
|
62
|
+
if not JAVACMD:
|
63
|
+
JAVACMD = 'java'
|
64
|
+
|
65
|
+
launcher_jar = os.path.join(ANT_LIB, 'ant-launcher.jar')
|
66
|
+
if not os.path.exists(launcher_jar):
|
67
|
+
print 'Warning: Unable to locate ant-launcher.jar. Expected to find it in %s' % \
|
68
|
+
ANT_LIB
|
69
|
+
|
70
|
+
# Build up standard classpath (LOCALCLASSPATH)
|
71
|
+
LOCALCLASSPATH = launcher_jar
|
72
|
+
if os.environ.has_key('LOCALCLASSPATH'):
|
73
|
+
LOCALCLASSPATH += os.pathsep + os.environ['LOCALCLASSPATH']
|
74
|
+
|
75
|
+
ANT_OPTS = ""
|
76
|
+
if os.environ.has_key('ANT_OPTS'):
|
77
|
+
ANT_OPTS = os.environ['ANT_OPTS']
|
78
|
+
|
79
|
+
OPTS = ""
|
80
|
+
if os.environ.has_key('JIKESPATH'):
|
81
|
+
OPTS = '-Djikes.class.path=\"%s\"' % os.environ['JIKESPATH']
|
82
|
+
|
83
|
+
ANT_ARGS = ""
|
84
|
+
if os.environ.has_key('ANT_ARGS'):
|
85
|
+
ANT_ARGS = os.environ['ANT_ARGS']
|
86
|
+
|
87
|
+
CLASSPATH = ""
|
88
|
+
if os.environ.has_key('CLASSPATH'):
|
89
|
+
CLASSPATH = "-lib " + os.environ['CLASSPATH']
|
90
|
+
|
91
|
+
# Builds the commandline
|
92
|
+
cmdline = ('%s %s -classpath %s -Dant.home=%s %s ' + \
|
93
|
+
'org.apache.tools.ant.launch.Launcher %s %s %s') \
|
94
|
+
% (JAVACMD, ANT_OPTS, LOCALCLASSPATH, ANT_HOME, OPTS, ANT_ARGS, \
|
95
|
+
CLASSPATH, string.join(sys.argv[1:], ' '))
|
96
|
+
|
97
|
+
if debug:
|
98
|
+
print '\n%s\n\n' % (cmdline)
|
99
|
+
sys.stdout.flush()
|
100
|
+
|
101
|
+
# Run the biniou!
|
102
|
+
os.system(cmdline)
|
@@ -0,0 +1,60 @@
|
|
1
|
+
/*
|
2
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
3
|
+
contributor license agreements. See the NOTICE file distributed with
|
4
|
+
this work for additional information regarding copyright ownership.
|
5
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
6
|
+
(the "License"); you may not use this file except in compliance with
|
7
|
+
the License. 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,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
|
17
|
+
Run RC file, name is in the first arg, second arg is either PATH
|
18
|
+
ENV or -r or nothing
|
19
|
+
*/
|
20
|
+
|
21
|
+
parse arg name path rest
|
22
|
+
|
23
|
+
if name = '' then do
|
24
|
+
say 'RC file name is missing'
|
25
|
+
exit 1
|
26
|
+
end
|
27
|
+
|
28
|
+
if rest \= '' then do
|
29
|
+
say 'Too many parameters'
|
30
|
+
exit 1
|
31
|
+
end
|
32
|
+
|
33
|
+
call runit name path
|
34
|
+
exit 0
|
35
|
+
|
36
|
+
runit: procedure
|
37
|
+
parse arg name path dir
|
38
|
+
|
39
|
+
if path \= '' & path \= '-r' then do
|
40
|
+
dir = value(translate(path),,'OS2ENVIRONMENT')
|
41
|
+
if dir = '' then return
|
42
|
+
dir = translate(dir, '\', '/') /* change UNIX-like path to OS/2 */
|
43
|
+
end
|
44
|
+
|
45
|
+
if dir = '' then dir = directory()
|
46
|
+
|
47
|
+
if path = '-r' then do /* recursive call */
|
48
|
+
subdir = filespec('path', dir)
|
49
|
+
if subdir \= '\' then do
|
50
|
+
subdir = left(subdir, length(subdir)-1)
|
51
|
+
call runit name path filespec('drive', dir) || subdir
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
/* Look for the file and run it */
|
56
|
+
if right(dir, 1) \= '\' then dir = dir || '\'
|
57
|
+
rcfile = stream(dir || name, 'c', 'query exists')
|
58
|
+
if rcfile \= '' then interpret 'call "' || rcfile || '"'
|
59
|
+
|
60
|
+
return
|