Class: Maven::Tasks

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/maven/ruby/tasks.rb

Instance Method Summary collapse

Instance Method Details

#installObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/maven/ruby/tasks.rb', line 10

def install

  desc "Setup Maven instance."
  task :maven do
  end

  desc "Clean up the build directory."
  task :clean => :maven do
    maven.clean
  end

  desc "Run the java unit tests from src/test/java directory."
  task :junit => :maven do
    maven.exec( 'compile', 'resources:testResources', 'compiler:testCompile', 'surefire:test' )
  end

  desc "Build gem into the pkg directory."
  task :build => :maven do
    maven.package( '-Dmaven.test.skip' )
  end

  desc "Compile any java source configured - default java files are in src/main/java."
  task :compile => :maven do
    maven.compile
  end

  desc "Package jar-file with the compiled classes - default jar-file lib/{name}.jar"
  task :jar => :maven do
    maven.prepare_package( '-Dmaven.test.skip' )
  end

  desc "Push gem to rubygems.org"
  task :push => :maven do
    maven.deploy( '-Dmaven.test.skip' )
  end
end