tetra 0.52.0 → 0.53.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -24,7 +24,7 @@ Install `tetra` via RubyGems:
24
24
  Building a package with `tetra` is quite unusual — this is a deliberate choice, so don't worry. Basic steps are:
25
25
 
26
26
  * `tetra init` a new project;
27
- * add sources to `src/<package name>` and anything else needed for the build in `kit/` in binary form (Ant and Maven are already included);
27
+ * add sources to `src/<package name>` and anything else needed for the build in `kit/` in binary form (Ant and Maven are already pre-bundled);
28
28
  * execute `tetra dry-run`, which will open a bash subshell. In there, build your project, and when you are done conclude quitting it with `Ctrl+D`;
29
29
  * execute `tetra generate-all`: tetra will scaffold spec files and tarballs.
30
30
 
@@ -60,11 +60,11 @@ Third, you need to show `tetra` how to build your package. Run `tetra dry-run` a
60
60
  tetra dry-run
61
61
 
62
62
  cd commons-collections-3.2.1-src/
63
- tetra mvn package
63
+ mvn package
64
64
 
65
65
  ^D
66
66
 
67
- Note that we used `tetra mvn package` instead of `mvn package`: this will use a preloaded Maven bundled in `kit/` by default and the repository in `kit/m2`.
67
+ Note that you don't even need to install Maven - `tetra` bundles a copy in `kit/` and uses it by default!
68
68
  Also note that this being a dry-run build, sources will be brought back to their original state after it finishes to ensure repeatability.
69
69
 
70
70
  Finally, generate build scripts, spec files and tarballs in the `packages/` directory:
@@ -27,7 +27,7 @@ In case you want to swap sources completely and throw away all previous patches
27
27
 
28
28
  ## Ant builds
29
29
 
30
- `tetra` works best with Maven but supports Ant as well. `tetra ant` works like `tetra mvn`, and a copy of ant is also bundled in `kit/` by default.
30
+ Ant is supported as well as Maven. You have a prebundled copy in `kit`, and using `ant` from a dry-run will use that by default.
31
31
 
32
32
  Sometimes you will have jar files distributed along with the source archive that will end up in `src/`: you don't want that! Run:
33
33
 
@@ -39,6 +39,12 @@ When generating spec files, it helps to have a `pom.xml` in your package directo
39
39
 
40
40
  You can also ask `tetra` to find one via `tetra get-pom <filename>.jar`.
41
41
 
42
+ ## Use different Ant or Maven versions
43
+
44
+ In case the bundled Ant or Maven versions are not usable in your project for whatever reason and you want to bundle a different one, just remove their directories from `kit` and replace them with your own. `tetra` will look for binaries named `ant` or `mvn` in kit and use them wherever they are found.
45
+
46
+ You can also use system-provided Ant and Maven by simply deleting their directories from `kit/`. Note that this is not recommended because a different version might be used at build time (for example in OBS), potentially resulting in non-reproducible builds.
47
+
42
48
  ## Other build tools
43
49
 
44
50
  Other build tools are currently unsupported but will be added in the future. You can nevertheless use them just make sure all of their files, included automatically downloaded ones, are stored in `kit`.
@@ -54,7 +60,7 @@ Note that the kit packages is only needed at build time by OBS, no end user shou
54
60
  ## Gotchas
55
61
 
56
62
  * `tetra` internally uses `git` to keep track of files, any tetra project is actually also a `git` repo. Feel free to use it as any ordinary git repo, including pushing to a remote repo, rebasing, merging or using GitHub's pull requests. Just make sure any `tetra: ` comments are preserved;
57
- * some Maven plugins like the Eclipse Project ones ([Tycho](https://www.eclipse.org/tycho/)) will save data in `/tmp` downloaded from the Internet and will produce errors if this data is not there during offline builds. One way to work around that is to force Java to use a kit subdirectory as `/tmp`. Add the following option to `tetra mvn` during your build:
63
+ * some Maven plugins like the Eclipse Project ones ([Tycho](https://www.eclipse.org/tycho/)) will save data in `/tmp` downloaded from the Internet and will produce errors if this data is not there during offline builds. One way to work around that is to force Java to use a kit subdirectory as `/tmp`. Add the following option to `mvn` during your build:
58
64
 
59
65
  -Djava.io.tmpdir=<full path to project>/kit/tmp
60
66
 
@@ -63,7 +69,7 @@ Use the following option in `mvn` in your build.sh file to make it reproducible:
63
69
  -Djava.io.tmpdir=$PROJECT_PREFIX/kit/tmp
64
70
 
65
71
  * Tycho builds may also require NSS, so if you get NSS errors be sure to add `mozilla-nss` or an equivalent package in a BuildRequires: line;
66
- * some badly designed testsuites might not work in OBS. If you are using `tetra mvn` you can add the following option to disable them:
72
+ * some badly designed testsuites might not work in OBS. If you are using `mvn` you can add the following option to disable them:
67
73
 
68
74
  -DskipTests=true
69
75
 
data/bin/tetra CHANGED
@@ -1,18 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: UTF-8
3
3
  #
4
- # The (open)?SUSE ((Linux Enterprise) (Server|Desktop))?'s
5
- # packager Swiss Army Knife.
4
+ # tetra is a tool to help you build RPM packages for Java projects.
6
5
  #
7
- # Copyright 2013 Silvio Moioli <smoioli@suse.de>
8
- #
9
- # Inspired mainly by pom2spec by:
10
- # Pascal Bleser <pascal.bleser@opensuse.org>
11
- # Duncan Mac-Vicar Prett <dmacvicar@suse.de>
12
- #
13
- # This file is licensed under the
14
- # GNU Lesser General Public License version 2.1 or later:
15
- # http://www.gnu.org/licenses/lgpl-2.1.html
6
+ # Copyright 2015 Silvio Moioli <moio@suse.de>
16
7
  #
17
8
 
18
9
  if File.exist?(File.join(File.dirname(__FILE__), "..", ".git"))
@@ -0,0 +1,21 @@
1
+ # use a temporary file for history
2
+ HISTFILE=<%= history_file %>
3
+
4
+ # don't limit file size
5
+ HISTFILESIZE=-1
6
+
7
+ # don't limit history length
8
+ HISTSIZE=-1
9
+
10
+ # don't keep timestamps in history
11
+ unset HISTTIMEFORMAT
12
+
13
+ # don't skip any command
14
+ HISTCONTROL=""
15
+
16
+ # change prompt
17
+ PS1="\e[1;33mdry-running\e[m:\w\$ "
18
+
19
+ # add default commandline switches
20
+ alias ant='<%= ant_commandline %>'
21
+ alias mvn='<%= mvn_commandline %>'
@@ -22,6 +22,7 @@ require "open4"
22
22
 
23
23
  # base components
24
24
  require "tetra/logger"
25
+ require "tetra/generatable"
25
26
 
26
27
  # facades to other programs
27
28
  require "tetra/facades/process_runner"
@@ -47,7 +48,6 @@ require "tetra/packages/package"
47
48
 
48
49
  # UI
49
50
  require "tetra/ui/subcommand"
50
- require "tetra/ui/ant_subcommand"
51
51
  require "tetra/ui/dry_run_subcommand"
52
52
  require "tetra/ui/generate_all_subcommand"
53
53
  require "tetra/ui/generate_kit_subcommand"
@@ -57,7 +57,5 @@ require "tetra/ui/generate_spec_subcommand"
57
57
  require "tetra/ui/get_pom_subcommand"
58
58
  require "tetra/ui/init_subcommand"
59
59
  require "tetra/ui/move_jars_to_kit_subcommand"
60
- require "tetra/ui/mvn_subcommand"
61
60
  require "tetra/ui/patch_subcommand"
62
-
63
- require "tetra/main"
61
+ require "tetra/ui/main"
@@ -1,27 +1,15 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Tetra
4
- # runs Ant with tetra-specific options
4
+ # encapsulates tetra-specific Ant commandline options
5
5
  class Ant
6
- include Logging
7
- include ProcessRunner
8
-
9
- # project_path is relative to the current dir
10
- # ant_path is relative to project_path
11
- def initialize(project_path, ant_path)
12
- @project_path = project_path
13
- @ant_path = ant_path
14
- end
15
-
16
- # runs ant in a subprocess
17
- def ant(options)
18
- run(get_ant_commandline(options), true)
19
- end
20
-
21
6
  # returns a command line for running Ant
22
- def get_ant_commandline(options)
23
- full_path = File.join(@project_path, @ant_path)
24
- "#{full_path} #{options.join(' ')}"
7
+ def self.commandline(project_path, ant_path)
8
+ if ant_path
9
+ File.join(project_path, ant_path, "ant")
10
+ else
11
+ "ant" # use system-provided executable
12
+ end
25
13
  end
26
14
  end
27
15
  end
@@ -5,24 +5,49 @@ module Tetra
5
5
  class Bash
6
6
  include ProcessRunner
7
7
 
8
+ def initialize(project)
9
+ @project = project
10
+ end
11
+
8
12
  # runs bash in a subshell, returns list of
9
13
  # commands that were run in the session
10
14
  def bash
11
- Tempfile.open("tetra-history") do |temp_file|
12
- temp_path = temp_file.path
13
-
14
- env = {
15
- "HISTFILE" => temp_path, # use temporary file for history
16
- "HISTFILESIZE" => "-1", # don't limit file size
17
- "HISTSIZE" => "-1", # don't limit history size
18
- "HISTTIMEFORMAT" => nil, # don't keep timestamps
19
- "HISTCONTROL" => "", # don't skip any command
20
- "PS1" => "\e[1;33mdry-running\e[m:\\\w\$ " # change prompt
21
- }
22
-
23
- run_interactive("bash --norc", env)
24
- File.read(temp_path).split("\n").map(&:strip)
15
+ Tempfile.open("tetra-history") do |history_file|
16
+ Tempfile.open("tetra-bashrc") do |bashrc_file|
17
+ kit = Tetra::Kit.new(@project)
18
+ ant_path = kit.find_executable("ant")
19
+ ant_commandline = Tetra::Ant.commandline(@project.full_path, ant_path)
20
+
21
+ mvn_path = kit.find_executable("mvn")
22
+ mvn_commandline = Tetra::Mvn.commandline(@project.full_path, mvn_path)
23
+
24
+ bashrc = Bashrc.new(history_file.path, ant_commandline, mvn_commandline)
25
+ bashrc_file.write(bashrc.to_s)
26
+ bashrc_file.flush
27
+
28
+ run_interactive("bash --rcfile #{bashrc_file.path}")
29
+ File.read(history_file).split("\n").map(&:strip)
30
+ end
25
31
  end
26
32
  end
27
33
  end
34
+
35
+ # encapsulates variables in bashrc template
36
+ class Bashrc
37
+ include Tetra::Generatable
38
+
39
+ attr_reader :history_file
40
+ attr_reader :ant_commandline
41
+ attr_reader :mvn_commandline
42
+
43
+ def initialize(history_file, ant_commandline, mvn_commandline)
44
+ @history_file = history_file
45
+ @ant_commandline = ant_commandline
46
+ @mvn_commandline = mvn_commandline
47
+ end
48
+
49
+ def to_s
50
+ generate("bashrc", binding)
51
+ end
52
+ end
28
53
  end
@@ -1,44 +1,25 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Tetra
4
- # runs Maven with tetra-specific options
4
+ # encapsulates tetra-specific Maven commandline options
5
5
  class Mvn
6
- include Logging
7
- include ProcessRunner
8
-
9
- # project_path is relative to the current dir
10
- # mvn_path is relative to project_path
11
- def initialize(project_path, mvn_path)
12
- @project_path = project_path
13
- @mvn_path = mvn_path
14
- end
15
-
16
- # runs Maven in a subprocess
17
- def mvn(options)
18
- run(get_mvn_commandline(options), true)
19
- end
20
-
21
- # runs Maven to get the effective POM from an existing POM
22
- # returns effective pom path or nil if not found
23
- def get_effective_pom(pom_path)
24
- effective_pom_path = "#{pom_path}.effective"
25
- success = mvn(["help:effective-pom", "-f#{pom_path}", "-Doutput=#{File.split(effective_pom_path)[1]}"])
26
- effective_pom_path if success
27
- end
28
-
29
6
  # returns a command line for running Maven
30
- def get_mvn_commandline(options)
31
- full_path = File.join(@project_path, @mvn_path)
32
- repo_path = File.join(@project_path, "kit", "m2")
33
- config_path = File.join(@project_path, "kit", "m2", "settings.xml")
7
+ def self.commandline(project_path, mvn_path)
8
+ full_path = if mvn_path
9
+ File.join(project_path, mvn_path, "mvn")
10
+ else
11
+ "mvn" # use system-provided executable
12
+ end
13
+ repo_path = File.join(project_path, "kit", "m2")
14
+ config_path = File.join(project_path, "kit", "m2", "settings.xml")
34
15
 
35
- full_options = [
16
+ options = [
36
17
  "-Dmaven.repo.local=#{repo_path}",
37
18
  "--settings #{config_path}",
38
19
  "--strict-checksums"
39
- ] + options
20
+ ]
40
21
 
41
- "#{full_path} #{full_options.join(' ')}"
22
+ "#{full_path} #{options.join(' ')}"
42
23
  end
43
24
  end
44
25
  end
@@ -35,9 +35,8 @@ module Tetra
35
35
  end
36
36
 
37
37
  # runs an interactive executable in a subshell
38
- # changing environment variables
39
- def run_interactive(command, env)
40
- success = system(env, command)
38
+ def run_interactive(command)
39
+ success = system({}, command)
41
40
  fail ExecutionFailed.new(command, $CHILD_STATUS, nil, nil) unless success
42
41
  end
43
42
 
@@ -0,0 +1,17 @@
1
+ # encoding: UTF-8
2
+
3
+ module Tetra
4
+ # adds methods to generate text files from an ERB template
5
+ module Generatable
6
+ # returns the template path
7
+ def template_path
8
+ File.join(File.dirname(__FILE__), "..", "template")
9
+ end
10
+
11
+ # generates content from an ERB template and an object binding
12
+ def generate(template_name, object_binding)
13
+ erb = ERB.new(File.read(File.join(template_path, template_name)), nil, "<>")
14
+ erb.result(object_binding)
15
+ end
16
+ end
17
+ end
@@ -10,27 +10,19 @@ module Tetra
10
10
  end
11
11
 
12
12
  # finds an executable in a bin/ subdirectory of kit
13
+ # returns nil if executable cannot be found
13
14
  def find_executable(name)
14
15
  @project.from_directory do
15
16
  Find.find("kit") do |path|
16
- next unless path =~ /bin\/#{name}$/
17
+ next unless path =~ /(.*bin)\/#{name}$/
18
+ result = Regexp.last_match[1]
17
19
 
18
- log.debug("found #{name} executable: #{path}")
19
- return path
20
+ log.debug("found #{name} executable in #{result}")
21
+ return result
20
22
  end
21
23
  end
22
24
 
23
- log.debug("#{name} executable not found")
24
- fail ExecutableNotFoundError, name
25
- end
26
- end
27
-
28
- # an executable from the kit was not found
29
- class ExecutableNotFoundError < Exception
30
- attr_reader :executable
31
-
32
- def initialize(executable)
33
- @executable = executable
25
+ nil
34
26
  end
35
27
  end
36
28
  end
@@ -29,21 +29,19 @@ module Tetra
29
29
  # build script lines and adjusting mvn and ant's paths
30
30
  def script_body(project)
31
31
  lines = project.build_script_lines
32
- ant = if lines.any? { |e| e.match(/tetra +ant/) }
33
- path = Tetra::Kit.new(project).find_executable("ant")
34
- Tetra::Ant.new(project.full_path, path).ant(@options)
35
- end
36
32
 
37
- mvn = if lines.any? { |e| e.match(/tetra +mvn/) }
38
- mvn_path = Tetra::Kit.new(project).find_executable("mvn")
39
- mvn = Tetra::Mvn.new("$PROJECT_PREFIX", mvn_path)
40
- end
33
+ kit = Tetra::Kit.new(project)
34
+ ant_path = kit.find_executable("ant")
35
+ ant_commandline = Tetra::Ant.commandline("$PROJECT_PREFIX", ant_path)
36
+
37
+ mvn_path = kit.find_executable("mvn")
38
+ mvn_commandline = Tetra::Mvn.commandline("$PROJECT_PREFIX", mvn_path)
41
39
 
42
40
  lines.map do |line|
43
- if line =~ /tetra +mvn/
44
- line.gsub(/tetra +mvn/, "#{mvn.get_mvn_commandline(['-o'])}")
45
- elsif line =~ /tetra +ant/
46
- line.gsub(/tetra +ant/, "#{ant.get_ant_commandline([])}")
41
+ if line =~ /^ant( .*)?$/
42
+ line.gsub(/^ant/, ant_commandline)
43
+ elsif line =~ /^mvn( .*)?$/
44
+ line.gsub(/^mvn/, "#{mvn_commandline} -o")
47
45
  else
48
46
  line
49
47
  end
@@ -3,6 +3,8 @@
3
3
  module Tetra
4
4
  # adds methods to generate a spec file from a package object
5
5
  module Speccable
6
+ include Tetra::Generatable
7
+
6
8
  # saves a specfile for this object in correct directories
7
9
  # returns the spec path and the conflict count with the previously generated
8
10
  # version, if any
@@ -22,26 +24,5 @@ module Tetra
22
24
  [spec_path, conflict_count]
23
25
  end
24
26
  end
25
-
26
- # returns the spec template path, exposed for testing
27
- def template_path
28
- File.join(File.dirname(__FILE__), "..", "..", "template")
29
- end
30
-
31
- private
32
-
33
- # generates content from an ERB template and an object binding
34
- # if destination_path is given, write it to that file, otherwise just
35
- # return it
36
- def generate(template_name, object_binding, destination_path = nil)
37
- erb = ERB.new File.read(File.join(template_path, template_name)), nil, "<>"
38
- new_content = erb.result(object_binding)
39
-
40
- unless destination_path.nil?
41
- File.open(destination_path, "w") { |io| io.write new_content }
42
- end
43
-
44
- new_content
45
- end
46
27
  end
47
28
  end
@@ -19,7 +19,7 @@ module Tetra
19
19
  puts "if the build does not succeed use ^C^D to abort and undo any change"
20
20
 
21
21
  begin
22
- history = Bash.new.bash
22
+ history = Tetra::Bash.new(project).bash
23
23
  project.finish(history)
24
24
  puts "Dry-run finished"
25
25
  rescue ExecutionFailed
@@ -15,18 +15,6 @@ module Tetra
15
15
  Tetra::DryRunSubcommand
16
16
  )
17
17
 
18
- subcommand(
19
- "mvn",
20
- "Locates and runs Maven from any directory in kit/",
21
- Tetra::MvnSubcommand
22
- )
23
-
24
- subcommand(
25
- "ant",
26
- "Locates and runs Ant from any directory in kit/",
27
- Tetra::AntSubcommand
28
- )
29
-
30
18
  subcommand(
31
19
  "generate-kit",
32
20
  "Create or refresh the kit spec and archive files",
@@ -98,8 +98,6 @@ module Tetra
98
98
  $stderr.puts "#{e.directory} is not a tetra project directory, see tetra init"
99
99
  rescue GitAlreadyInitedError
100
100
  $stderr.puts "This directory is already a tetra project"
101
- rescue ExecutableNotFoundError => e
102
- $stderr.puts "Executable #{e.executable} not found in kit/ or any of its subdirectories"
103
101
  rescue ExecutionFailed => e
104
102
  $stderr.puts "Failed to run `#{e.commandline}` (exit status #{e.status})"
105
103
  rescue Interrupt
@@ -2,5 +2,5 @@
2
2
 
3
3
  # base module for tetra
4
4
  module Tetra
5
- VERSION = "0.52.0"
5
+ VERSION = "0.53.0"
6
6
  end
@@ -10,8 +10,6 @@ describe Tetra::Ant do
10
10
  @path = create_mock_executable("ant")
11
11
  end
12
12
 
13
- let(:instance) { Tetra::Ant.new(".", mock_executable_path("ant")) }
14
-
15
13
  after(:each) do
16
14
  delete_mock_project
17
15
  end
@@ -19,17 +17,8 @@ describe Tetra::Ant do
19
17
  describe "#get_ant_commandline" do
20
18
  it "returns commandline options for running Ant" do
21
19
  @project.from_directory do
22
- commandline = instance.get_ant_commandline([])
23
- expect(commandline).to eq "./#{@path} "
24
- end
25
- end
26
- end
27
-
28
- describe "#ant" do
29
- it "runs Ant" do
30
- @project.from_directory do
31
- instance.ant(["extra-option"])
32
- expect(File.read("test_out").strip).to match(/extra-option$/)
20
+ commandline = Tetra::Ant.commandline(".", mock_executable_dir("ant"))
21
+ expect(commandline).to eq "./#{@path}"
33
22
  end
34
23
  end
35
24
  end
@@ -17,11 +17,11 @@ describe Tetra::Kit do
17
17
 
18
18
  describe "#find_executable" do
19
19
  it "finds an executable in kit" do
20
- executable_path = create_mock_executable("any")
21
- expect(instance.find_executable("any")).to eq executable_path
20
+ create_mock_executable("any")
21
+ expect(instance.find_executable("any")).to eq mock_executable_dir("any")
22
22
  end
23
23
  it "doesn't find an executable in kit" do
24
- expect { instance.find_executable("any") }.to raise_error(Tetra::ExecutableNotFoundError)
24
+ expect(instance.find_executable("any")).to be_nil
25
25
  end
26
26
  end
27
27
  end
@@ -10,8 +10,6 @@ describe Tetra::Mvn do
10
10
  @path = create_mock_executable("mvn")
11
11
  end
12
12
 
13
- let(:instance) { Tetra::Mvn.new(".", mock_executable_path("mvn")) }
14
-
15
13
  after(:each) do
16
14
  delete_mock_project
17
15
  end
@@ -19,29 +17,11 @@ describe Tetra::Mvn do
19
17
  describe "#get_mvn_commandline" do
20
18
  it "returns commandline options for running maven" do
21
19
  @project.from_directory do
22
- commandline = instance.get_mvn_commandline(["--otheroption"])
23
- expected_commandline = "./#{@path} -Dmaven.repo.local=./kit/m2 --settings \
24
- ./kit/m2/settings.xml --strict-checksums --otheroption"
20
+ commandline = Tetra::Mvn.commandline(".", mock_executable_dir("mvn"))
21
+ expected_commandline = "./#{@path} -Dmaven.repo.local=./kit/m2 \
22
+ --settings ./kit/m2/settings.xml --strict-checksums"
25
23
  expect(commandline).to eq expected_commandline
26
24
  end
27
25
  end
28
26
  end
29
-
30
- describe "#mvn" do
31
- it "runs maven" do
32
- @project.from_directory do
33
- instance.mvn(["extra-option"])
34
- expect(File.read("test_out").strip).to match(/extra-option$/)
35
- end
36
- end
37
- end
38
-
39
- describe "#get_effective_pom" do
40
- it "runs maven to get an effective pom" do
41
- @project.from_directory do
42
- expect(instance.get_effective_pom("test.pom")).to eq "test.pom.effective"
43
- expect(File.read("test_out").strip).to match(/help:effective-pom -ftest.pom -Doutput=test.pom.effective$/)
44
- end
45
- end
46
- end
47
27
  end
@@ -14,7 +14,7 @@ describe Tetra::Scriptable do
14
14
 
15
15
  history = ["tetra dry-run start --unwanted-options",
16
16
  "cd somewhere significant",
17
- "tetra mvn --options",
17
+ "mvn --options",
18
18
  "tetra dry-run finish -a"
19
19
  ]
20
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tetra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.52.0
4
+ version: 0.53.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-06 00:00:00.000000000 Z
12
+ date: 2015-03-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -176,6 +176,7 @@ files:
176
176
  - bin/tetra
177
177
  - integration-tests/build-commons.sh
178
178
  - integration-tests/commons-collections-3.2.1-src.zip
179
+ - lib/template/bashrc
179
180
  - lib/template/bundled/apache-ant-1.9.4/INSTALL
180
181
  - lib/template/bundled/apache-ant-1.9.4/KEYS
181
182
  - lib/template/bundled/apache-ant-1.9.4/LICENSE
@@ -356,9 +357,9 @@ files:
356
357
  - lib/tetra/facades/git.rb
357
358
  - lib/tetra/facades/mvn.rb
358
359
  - lib/tetra/facades/process_runner.rb
360
+ - lib/tetra/generatable.rb
359
361
  - lib/tetra/kit.rb
360
362
  - lib/tetra/logger.rb
361
- - lib/tetra/main.rb
362
363
  - lib/tetra/maven_website.rb
363
364
  - lib/tetra/packages/kit_package.rb
364
365
  - lib/tetra/packages/package.rb
@@ -367,7 +368,6 @@ files:
367
368
  - lib/tetra/pom.rb
368
369
  - lib/tetra/pom_getter.rb
369
370
  - lib/tetra/project.rb
370
- - lib/tetra/ui/ant_subcommand.rb
371
371
  - lib/tetra/ui/dry_run_subcommand.rb
372
372
  - lib/tetra/ui/generate_all_subcommand.rb
373
373
  - lib/tetra/ui/generate_archive_subcommand.rb
@@ -376,8 +376,8 @@ files:
376
376
  - lib/tetra/ui/generate_spec_subcommand.rb
377
377
  - lib/tetra/ui/get_pom_subcommand.rb
378
378
  - lib/tetra/ui/init_subcommand.rb
379
+ - lib/tetra/ui/main.rb
379
380
  - lib/tetra/ui/move_jars_to_kit_subcommand.rb
380
- - lib/tetra/ui/mvn_subcommand.rb
381
381
  - lib/tetra/ui/patch_subcommand.rb
382
382
  - lib/tetra/ui/subcommand.rb
383
383
  - lib/tetra/version.rb
@@ -1,23 +0,0 @@
1
- # encoding: UTF-8
2
-
3
- module Tetra
4
- # tetra ant
5
- class AntSubcommand < Tetra::Subcommand
6
- parameter "[ANT OPTIONS] ...", "ant options", attribute_name: "dummy"
7
-
8
- # options will be parsed by ant
9
- def parse(args)
10
- bypass_parsing(args)
11
- end
12
-
13
- def execute
14
- checking_exceptions do
15
- project = Tetra::Project.new(".")
16
- ensure_dry_running(:is_in_progress, project) do
17
- path = Tetra::Kit.new(project).find_executable("ant")
18
- Tetra::Ant.new(project.full_path, path).ant(@options)
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,23 +0,0 @@
1
- # encoding: UTF-8
2
-
3
- module Tetra
4
- # tetra mvn
5
- class MvnSubcommand < Tetra::Subcommand
6
- parameter "[MAVEN OPTIONS] ...", "mvn options", attribute_name: "dummy"
7
-
8
- # options will be parsed by mvn
9
- def parse(args)
10
- bypass_parsing(args)
11
- end
12
-
13
- def execute
14
- checking_exceptions do
15
- project = Tetra::Project.new(".")
16
- ensure_dry_running(:is_in_progress, project) do
17
- path = Tetra::Kit.new(project).find_executable("mvn")
18
- Tetra::Mvn.new(project.full_path, path).mvn(@options)
19
- end
20
- end
21
- end
22
- end
23
- end