tetra 0.40.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +27 -0
- data/.rubocop.yml +14 -0
- data/Gemfile +4 -0
- data/LICENSE +28 -0
- data/MOTIVATION.md +27 -0
- data/README.md +106 -0
- data/Rakefile +9 -0
- data/SPECIAL_CASES.md +130 -0
- data/bin/tetra +29 -0
- data/integration-tests/commons.sh +55 -0
- data/lib/template/gitignore +2 -0
- data/lib/template/kit.spec +64 -0
- data/lib/template/kit/CONTENTS +8 -0
- data/lib/template/kit/jars/CONTENTS +1 -0
- data/lib/template/kit/m2/settings.xml +10 -0
- data/lib/template/output/CONTENTS +3 -0
- data/lib/template/package.spec +65 -0
- data/lib/template/src/CONTENTS +6 -0
- data/lib/tetra.rb +63 -0
- data/lib/tetra/ant_runner.rb +27 -0
- data/lib/tetra/archiver.rb +95 -0
- data/lib/tetra/commands/ant.rb +23 -0
- data/lib/tetra/commands/base.rb +89 -0
- data/lib/tetra/commands/download_maven_source_jars.rb +29 -0
- data/lib/tetra/commands/dry_run.rb +17 -0
- data/lib/tetra/commands/finish.rb +22 -0
- data/lib/tetra/commands/generate_all.rb +38 -0
- data/lib/tetra/commands/generate_kit_archive.rb +18 -0
- data/lib/tetra/commands/generate_kit_spec.rb +16 -0
- data/lib/tetra/commands/generate_package_archive.rb +19 -0
- data/lib/tetra/commands/generate_package_script.rb +21 -0
- data/lib/tetra/commands/generate_package_spec.rb +22 -0
- data/lib/tetra/commands/get_pom.rb +33 -0
- data/lib/tetra/commands/get_source.rb +30 -0
- data/lib/tetra/commands/init.rb +15 -0
- data/lib/tetra/commands/list_kit_missing_sources.rb +21 -0
- data/lib/tetra/commands/move_jars_to_kit.rb +18 -0
- data/lib/tetra/commands/mvn.rb +23 -0
- data/lib/tetra/git.rb +140 -0
- data/lib/tetra/kit_checker.rb +104 -0
- data/lib/tetra/kit_runner.rb +43 -0
- data/lib/tetra/kit_spec_adapter.rb +28 -0
- data/lib/tetra/logger.rb +28 -0
- data/lib/tetra/main.rb +102 -0
- data/lib/tetra/maven_runner.rb +47 -0
- data/lib/tetra/maven_website.rb +59 -0
- data/lib/tetra/package_spec_adapter.rb +59 -0
- data/lib/tetra/pom.rb +55 -0
- data/lib/tetra/pom_getter.rb +104 -0
- data/lib/tetra/project.rb +245 -0
- data/lib/tetra/script_generator.rb +57 -0
- data/lib/tetra/source_getter.rb +41 -0
- data/lib/tetra/spec_generator.rb +60 -0
- data/lib/tetra/template_manager.rb +33 -0
- data/lib/tetra/version.rb +6 -0
- data/lib/tetra/version_matcher.rb +90 -0
- data/spec/data/ant-super-simple-code/build.xml +133 -0
- data/spec/data/ant-super-simple-code/build/HW.class +0 -0
- data/spec/data/ant-super-simple-code/build/mypackage/HW.class +0 -0
- data/spec/data/ant-super-simple-code/dist/antsimple-20130618.jar +0 -0
- data/spec/data/ant-super-simple-code/lib/junit-4.11.jar +0 -0
- data/spec/data/ant-super-simple-code/lib/log4j-1.2.13.jar +0 -0
- data/spec/data/ant-super-simple-code/src/mypackage/HW.java +15 -0
- data/spec/data/antlr/antlr-2.7.2.jar +0 -0
- data/spec/data/antlr/pom.xml +6 -0
- data/spec/data/commons-logging/commons-logging-1.1.1.jar +0 -0
- data/spec/data/commons-logging/parent_pom.xml +420 -0
- data/spec/data/commons-logging/pom.xml +504 -0
- data/spec/data/nailgun/nailgun-0.7.1.jar +0 -0
- data/spec/data/nailgun/pom.xml +153 -0
- data/spec/data/struts-apps/pom.xml +228 -0
- data/spec/data/tomcat/pom.xml +33 -0
- data/spec/lib/ant_runner_spec.rb +45 -0
- data/spec/lib/archiver_spec.rb +106 -0
- data/spec/lib/git_spec.rb +105 -0
- data/spec/lib/kit_checker_spec.rb +119 -0
- data/spec/lib/maven_runner_spec.rb +68 -0
- data/spec/lib/maven_website_spec.rb +56 -0
- data/spec/lib/pom_getter_spec.rb +36 -0
- data/spec/lib/pom_spec.rb +69 -0
- data/spec/lib/project_spec.rb +254 -0
- data/spec/lib/script_generator_spec.rb +67 -0
- data/spec/lib/source_getter_spec.rb +36 -0
- data/spec/lib/spec_generator_spec.rb +130 -0
- data/spec/lib/template_manager_spec.rb +54 -0
- data/spec/lib/version_matcher_spec.rb +64 -0
- data/spec/spec_helper.rb +37 -0
- data/spec/support/kit_runner_examples.rb +15 -0
- data/tetra.gemspec +31 -0
- data/utils/delete_nonet_user.sh +8 -0
- data/utils/setup_nonet_user.sh +8 -0
- metadata +267 -0
Binary file
|
@@ -0,0 +1,153 @@
|
|
1
|
+
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
3
|
+
<modelVersion>4.0.0</modelVersion>
|
4
|
+
|
5
|
+
<parent>
|
6
|
+
<groupId>org.sonatype.oss</groupId>
|
7
|
+
<artifactId>oss-parent</artifactId>
|
8
|
+
<version>7</version>
|
9
|
+
</parent>
|
10
|
+
|
11
|
+
<groupId>com.martiansoftware</groupId>
|
12
|
+
<artifactId>nailgun-all</artifactId>
|
13
|
+
<version>0.9.1</version>
|
14
|
+
<packaging>pom</packaging>
|
15
|
+
|
16
|
+
<properties>
|
17
|
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
18
|
+
</properties>
|
19
|
+
|
20
|
+
<name>nailgun-all</name>
|
21
|
+
<description>
|
22
|
+
Nailgun is a client, protocol, and server for running Java programs
|
23
|
+
from the command line without incurring the JVM startup overhead.
|
24
|
+
Programs run in the server (which is implemented in Java), and are
|
25
|
+
triggered by the client (written in C), which handles all I/O.
|
26
|
+
|
27
|
+
This project contains the server and examples.
|
28
|
+
</description>
|
29
|
+
<url>http://martiansoftware.com/nailgun</url>
|
30
|
+
|
31
|
+
<licenses>
|
32
|
+
<license>
|
33
|
+
<name>The Apache Software License, Version 2.0</name>
|
34
|
+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
35
|
+
<distribution>repo</distribution>
|
36
|
+
</license>
|
37
|
+
</licenses>
|
38
|
+
|
39
|
+
<scm>
|
40
|
+
<url>scm:git:git@github.com:martylamb/nailgun.git</url>
|
41
|
+
<connection>scm:git:git@github.com:martylamb/nailgun.git</connection>
|
42
|
+
<developerConnection>scm:git:git@github.com:martylamb/nailgun.git</developerConnection>
|
43
|
+
<tag>nailgun-all-0.9.1</tag>
|
44
|
+
</scm>
|
45
|
+
|
46
|
+
<developers>
|
47
|
+
<developer>
|
48
|
+
<email>mlamb@martiansoftware.com</email>
|
49
|
+
<name>Marty Lamb</name>
|
50
|
+
<url>http://martiansoftware.com</url>
|
51
|
+
</developer>
|
52
|
+
</developers>
|
53
|
+
|
54
|
+
<modules>
|
55
|
+
<module>nailgun-server</module>
|
56
|
+
<module>nailgun-examples</module>
|
57
|
+
</modules>
|
58
|
+
|
59
|
+
<build>
|
60
|
+
<plugins>
|
61
|
+
<plugin>
|
62
|
+
<groupId>org.apache.maven.plugins</groupId>
|
63
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
64
|
+
<version>3.0</version>
|
65
|
+
<configuration>
|
66
|
+
<source>1.4</source>
|
67
|
+
<target>1.4</target>
|
68
|
+
</configuration>
|
69
|
+
</plugin>
|
70
|
+
<plugin>
|
71
|
+
<groupId>org.apache.maven.plugins</groupId>
|
72
|
+
<artifactId>maven-source-plugin</artifactId>
|
73
|
+
<version>2.2.1</version>
|
74
|
+
<executions>
|
75
|
+
<execution>
|
76
|
+
<id>attach-sources</id>
|
77
|
+
<goals>
|
78
|
+
<goal>jar</goal>
|
79
|
+
</goals>
|
80
|
+
</execution>
|
81
|
+
</executions>
|
82
|
+
</plugin>
|
83
|
+
<plugin>
|
84
|
+
<groupId>org.apache.maven.plugins</groupId>
|
85
|
+
<artifactId>maven-javadoc-plugin</artifactId>
|
86
|
+
<version>2.9</version>
|
87
|
+
<executions>
|
88
|
+
<execution>
|
89
|
+
<id>attach-javadocs</id>
|
90
|
+
<goals>
|
91
|
+
<goal>jar</goal>
|
92
|
+
</goals>
|
93
|
+
</execution>
|
94
|
+
</executions>
|
95
|
+
</plugin>
|
96
|
+
<plugin>
|
97
|
+
<groupId>org.apache.maven.plugins</groupId>
|
98
|
+
<artifactId>maven-release-plugin</artifactId>
|
99
|
+
<version>2.3.2</version>
|
100
|
+
<configuration>
|
101
|
+
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
|
102
|
+
</configuration>
|
103
|
+
</plugin>
|
104
|
+
</plugins>
|
105
|
+
</build>
|
106
|
+
|
107
|
+
<distributionManagement>
|
108
|
+
<snapshotRepository>
|
109
|
+
<id>sonatype-nexus-snapshots</id>
|
110
|
+
<name>Sonatype Nexus snapshot repository</name>
|
111
|
+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
112
|
+
</snapshotRepository>
|
113
|
+
<repository>
|
114
|
+
<id>sonatype-nexus-staging</id>
|
115
|
+
<name>Sonatype Nexus release repository</name>
|
116
|
+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
117
|
+
</repository>
|
118
|
+
</distributionManagement>
|
119
|
+
|
120
|
+
<profiles>
|
121
|
+
<profile>
|
122
|
+
<id>release-sign-artifacts</id>
|
123
|
+
<activation>
|
124
|
+
<property>
|
125
|
+
<name>performRelease</name>
|
126
|
+
<value>true</value>
|
127
|
+
</property>
|
128
|
+
</activation>
|
129
|
+
<build>
|
130
|
+
<plugins>
|
131
|
+
<plugin>
|
132
|
+
<groupId>org.apache.maven.plugins</groupId>
|
133
|
+
<artifactId>maven-gpg-plugin</artifactId>
|
134
|
+
<version>1.4</version>
|
135
|
+
<configuration>
|
136
|
+
<passphrase>${gpg.passphrase}</passphrase>
|
137
|
+
</configuration>
|
138
|
+
<executions>
|
139
|
+
<execution>
|
140
|
+
<id>sign-artifacts</id>
|
141
|
+
<phase>verify</phase>
|
142
|
+
<goals>
|
143
|
+
<goal>sign</goal>
|
144
|
+
</goals>
|
145
|
+
</execution>
|
146
|
+
</executions>
|
147
|
+
</plugin>
|
148
|
+
</plugins>
|
149
|
+
</build>
|
150
|
+
</profile>
|
151
|
+
</profiles>
|
152
|
+
|
153
|
+
</project>
|
@@ -0,0 +1,228 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
/*
|
4
|
+
* $Id: pom.xml 1462297 2013-03-28 20:51:02Z lukaszlenart $
|
5
|
+
*
|
6
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
7
|
+
* or more contributor license agreements. See the NOTICE file
|
8
|
+
* distributed with this work for additional information
|
9
|
+
* regarding copyright ownership. The ASF licenses this file
|
10
|
+
* to you under the Apache License, Version 2.0 (the
|
11
|
+
* "License"); you may not use this file except in compliance
|
12
|
+
* with the License. You may obtain a copy of the License at
|
13
|
+
*
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
*
|
16
|
+
* Unless required by applicable law or agreed to in writing,
|
17
|
+
* software distributed under the License is distributed on an
|
18
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
19
|
+
* KIND, either express or implied. See the License for the
|
20
|
+
* specific language governing permissions and limitations
|
21
|
+
* under the License.
|
22
|
+
*/
|
23
|
+
-->
|
24
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
25
|
+
<modelVersion>4.0.0</modelVersion>
|
26
|
+
<parent>
|
27
|
+
<groupId>org.apache.struts</groupId>
|
28
|
+
<artifactId>struts2-parent</artifactId>
|
29
|
+
<version>2.3.14</version>
|
30
|
+
</parent>
|
31
|
+
<groupId>org.apache.struts</groupId>
|
32
|
+
<artifactId>struts2-apps</artifactId>
|
33
|
+
<packaging>pom</packaging>
|
34
|
+
<name>Webapps</name>
|
35
|
+
<modules>
|
36
|
+
<module>blank</module>
|
37
|
+
<module>jboss-blank</module>
|
38
|
+
<module>mailreader</module>
|
39
|
+
<module>portlet</module>
|
40
|
+
<module>showcase</module>
|
41
|
+
<module>rest-showcase</module>
|
42
|
+
</modules>
|
43
|
+
|
44
|
+
<scm>
|
45
|
+
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps</connection>
|
46
|
+
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_14/apps</developerConnection>
|
47
|
+
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_14/apps</url>
|
48
|
+
</scm>
|
49
|
+
|
50
|
+
<profiles>
|
51
|
+
<profile>
|
52
|
+
<id>hostedqa</id>
|
53
|
+
<dependencies>
|
54
|
+
<dependency>
|
55
|
+
<groupId>com.hostedqa</groupId>
|
56
|
+
<artifactId>hostedqa-remote-ant</artifactId>
|
57
|
+
<version>1.7</version>
|
58
|
+
<scope>test</scope>
|
59
|
+
</dependency>
|
60
|
+
</dependencies>
|
61
|
+
<repositories>
|
62
|
+
<repository>
|
63
|
+
<id>codehaus</id>
|
64
|
+
<name>codehaus</name>
|
65
|
+
<url>http://repository.codehaus.org</url>
|
66
|
+
</repository>
|
67
|
+
<repository>
|
68
|
+
<id>maven-hostedqa</id>
|
69
|
+
<name>maven-hostedqa</name>
|
70
|
+
<snapshots>
|
71
|
+
<enabled>true</enabled>
|
72
|
+
<updatePolicy>always</updatePolicy>
|
73
|
+
<checksumPolicy>ignore</checksumPolicy>
|
74
|
+
</snapshots>
|
75
|
+
<releases>
|
76
|
+
<enabled>true</enabled>
|
77
|
+
</releases>
|
78
|
+
<url>http://maven.hostedqa.com</url>
|
79
|
+
</repository>
|
80
|
+
</repositories>
|
81
|
+
<build>
|
82
|
+
<resources>
|
83
|
+
<!-- Include resources under src/main/java in WEB-INF/classes -->
|
84
|
+
<resource>
|
85
|
+
<directory>src/main/java</directory>
|
86
|
+
<includes>
|
87
|
+
<include>**/*.properties</include>
|
88
|
+
<include>**/*.xml</include>
|
89
|
+
</includes>
|
90
|
+
</resource>
|
91
|
+
</resources>
|
92
|
+
<plugins>
|
93
|
+
<plugin>
|
94
|
+
<artifactId>maven-antrun-plugin</artifactId>
|
95
|
+
<groupId>org.apache.maven.plugins</groupId>
|
96
|
+
<executions>
|
97
|
+
<execution>
|
98
|
+
<phase>package</phase>
|
99
|
+
<goals>
|
100
|
+
<goal>run</goal>
|
101
|
+
</goals>
|
102
|
+
<configuration>
|
103
|
+
<tasks>
|
104
|
+
<taskdef resource="hostedqatasks" classpathref="maven.plugin.classpath" />
|
105
|
+
<upload file="${project.build.directory}/${project.build.finalName}.war" account="struts" email="${email}" password="${password}" resourceId="${resourceId}" />
|
106
|
+
|
107
|
+
<playsuite suiteId="${suiteId}" clientConfigs="${clientConfigs}" appConfigs="${appConfigs}" account="struts" email="${email}" password="${password}" />
|
108
|
+
</tasks>
|
109
|
+
</configuration>
|
110
|
+
</execution>
|
111
|
+
</executions>
|
112
|
+
<dependencies>
|
113
|
+
<dependency>
|
114
|
+
<groupId>com.hostedqa</groupId>
|
115
|
+
<artifactId>hostedqa-remote-ant</artifactId>
|
116
|
+
<version>1.7</version>
|
117
|
+
</dependency>
|
118
|
+
</dependencies>
|
119
|
+
</plugin>
|
120
|
+
</plugins>
|
121
|
+
</build>
|
122
|
+
</profile>
|
123
|
+
<profile>
|
124
|
+
<id>release</id>
|
125
|
+
<activation>
|
126
|
+
<property>
|
127
|
+
<name>release</name>
|
128
|
+
</property>
|
129
|
+
</activation>
|
130
|
+
<build>
|
131
|
+
<plugins>
|
132
|
+
<plugin>
|
133
|
+
<inherited>true</inherited>
|
134
|
+
<groupId>org.codehaus.mojo</groupId>
|
135
|
+
<artifactId>rat-maven-plugin</artifactId>
|
136
|
+
<executions>
|
137
|
+
<execution>
|
138
|
+
<phase>verify</phase>
|
139
|
+
<goals>
|
140
|
+
<goal>check</goal>
|
141
|
+
</goals>
|
142
|
+
<configuration>
|
143
|
+
<addDefaultLicenseMatchers>false</addDefaultLicenseMatchers>
|
144
|
+
<licenseMatchers>
|
145
|
+
<classNames>
|
146
|
+
<className>rat.analysis.license.ApacheSoftwareLicense20</className>
|
147
|
+
</classNames>
|
148
|
+
</licenseMatchers>
|
149
|
+
<includes>
|
150
|
+
<include>pom.xml</include>
|
151
|
+
</includes>
|
152
|
+
<excludes>
|
153
|
+
<exclude>src/**</exclude>
|
154
|
+
</excludes>
|
155
|
+
</configuration>
|
156
|
+
</execution>
|
157
|
+
</executions>
|
158
|
+
</plugin>
|
159
|
+
</plugins>
|
160
|
+
</build>
|
161
|
+
</profile>
|
162
|
+
</profiles>
|
163
|
+
|
164
|
+
<build>
|
165
|
+
<plugins>
|
166
|
+
<!-- Include source code under WEB-INF/src/java -->
|
167
|
+
<plugin>
|
168
|
+
<artifactId>maven-antrun-plugin</artifactId>
|
169
|
+
<executions>
|
170
|
+
<execution>
|
171
|
+
<id>copy-sources</id>
|
172
|
+
<phase>process-sources</phase>
|
173
|
+
<configuration>
|
174
|
+
<tasks>
|
175
|
+
<copy todir="${project.build.directory}/${project.artifactId}/WEB-INF/src/java" failonerror="false">
|
176
|
+
<fileset dir="${basedir}/src/main/java" />
|
177
|
+
</copy>
|
178
|
+
<copy todir="${project.build.directory}/${project.artifactId}/WEB-INF/src/java" failonerror="false">
|
179
|
+
<fileset dir="${basedir}/src/main/resources" />
|
180
|
+
</copy>
|
181
|
+
</tasks>
|
182
|
+
</configuration>
|
183
|
+
<goals>
|
184
|
+
<goal>run</goal>
|
185
|
+
</goals>
|
186
|
+
</execution>
|
187
|
+
</executions>
|
188
|
+
</plugin>
|
189
|
+
<plugin>
|
190
|
+
<groupId>org.apache.maven.plugins</groupId>
|
191
|
+
<artifactId>maven-war-plugin</artifactId>
|
192
|
+
<configuration>
|
193
|
+
<webResources>
|
194
|
+
<resource>
|
195
|
+
<directory>${basedir}/src/main/resources</directory>
|
196
|
+
<targetPath>META-INF</targetPath>
|
197
|
+
<includes>
|
198
|
+
<include>LICENSE.txt</include>
|
199
|
+
<include>NOTICE.txt</include>
|
200
|
+
</includes>
|
201
|
+
</resource>
|
202
|
+
</webResources>
|
203
|
+
<warSourceExcludes>WEB-INF/classes/LICENSE.txt,WEB-INF/classes/NOTICE.txt</warSourceExcludes>
|
204
|
+
</configuration>
|
205
|
+
</plugin>
|
206
|
+
</plugins>
|
207
|
+
|
208
|
+
<finalName>${project.artifactId}</finalName>
|
209
|
+
|
210
|
+
</build>
|
211
|
+
|
212
|
+
<dependencies>
|
213
|
+
|
214
|
+
<dependency>
|
215
|
+
<groupId>org.apache.struts</groupId>
|
216
|
+
<artifactId>struts2-core</artifactId>
|
217
|
+
<version>${project.version}</version>
|
218
|
+
</dependency>
|
219
|
+
|
220
|
+
<dependency>
|
221
|
+
<groupId>org.springframework</groupId>
|
222
|
+
<artifactId>spring-test</artifactId>
|
223
|
+
<version>${struts2.springPlatformVersion}</version>
|
224
|
+
<scope>test</scope>
|
225
|
+
</dependency>
|
226
|
+
</dependencies>
|
227
|
+
|
228
|
+
</project>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
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
|
+
<project>
|
19
|
+
<modelVersion>4.0.0</modelVersion>
|
20
|
+
<groupId>org.apache.tomcat</groupId>
|
21
|
+
<artifactId>tomcat</artifactId>
|
22
|
+
<version>7.0.40</version>
|
23
|
+
<description>Binary distribution of Apache Tomcat</description>
|
24
|
+
<url>http://tomcat.apache.org/</url>
|
25
|
+
<packaging>pom</packaging>
|
26
|
+
<licenses>
|
27
|
+
<license>
|
28
|
+
<name>Apache License, Version 2.0</name>
|
29
|
+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
30
|
+
<distribution>repo</distribution>
|
31
|
+
</license>
|
32
|
+
</licenses>
|
33
|
+
</project>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
require "spec_helper"
|
4
|
+
|
5
|
+
describe Tetra::AntRunner do
|
6
|
+
it_behaves_like Tetra::KitRunner
|
7
|
+
include Tetra::Mockers
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
create_mock_project
|
11
|
+
@kit_runner = Tetra::AntRunner.new(@project)
|
12
|
+
end
|
13
|
+
|
14
|
+
after(:each) do
|
15
|
+
delete_mock_project
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "#get_ant_commandline" do
|
19
|
+
it "returns commandline options for running Ant" do
|
20
|
+
executable_path = create_mock_executable("ant")
|
21
|
+
@project.from_directory do
|
22
|
+
commandline = @kit_runner.get_ant_commandline(".")
|
23
|
+
expect(commandline).to eq "./#{executable_path}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
it "doesn't return commandline options if Ant is not available" do
|
27
|
+
expect { @kit_runner.get_ant_commandline(".") }.to raise_error(Tetra::ExecutableNotFoundError)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "#ant" do
|
32
|
+
it "runs Ant" do
|
33
|
+
create_mock_executable("ant")
|
34
|
+
@project.from_directory do
|
35
|
+
@kit_runner.ant(["extra-option"])
|
36
|
+
expect(File.read("test_out").strip).to match(/extra-option$/)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
it "doesn't run Ant if it is not available" do
|
40
|
+
@project.from_directory do
|
41
|
+
expect { @kit_runner.ant([]) }.to raise_error(Tetra::ExecutableNotFoundError)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|