-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildfile
executable file
·91 lines (73 loc) · 2.77 KB
/
buildfile
1
2
3
4
5
6
7
8
9
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Generated by Buildr 1.3.3, change to your liking
# Version number for this release
VERSION_NUMBER = "1.0.0"
# Group identifier for your projects
GROUP = "PDMAFWeb"
COPYRIGHT = "PDMAF Inc (C) 2009"
GWT_HOME = 'C:/Program Files/gwt/'
require 'fileutils'
require 'buildr/groovy'
require 'buildr/scala'
include Antwrap
# Specify Maven 2.0 remote repositories here, like this:
repositories.remote << "http://www.agical.com/maven2/"
repositories.remote << "http://www.ibiblio.org/maven2/"
repositories.remote << "http://repo1.maven.org/maven2/"
repositories.remote << "http://scala-tools.org/repo-releases"
class Project_Layout < Layout
def initialize
super
self[:source, :main, :java] = 'src'
self[:source, :main, :scala] = 'src'
self[:source, :main, :groovy] = 'src'
self[:source, :main, :aspectj] = 'src'
self[:source, :test, :java] = 'test/unit/'
self[:source, :test, :scala] = 'test/unit/'
self[:source, :test, :groovy] = 'test/unit/'
self[:source, :test, :aspectj] = 'test/unit/'
self[:source, :main, :lib] = 'lib'
self[:source, :main, :gwt] = 'gwt'
self[:target, :main, :classes] = 'web-app/WEB-INF/classes'
self[:target, :test, :classes] = 'web-app/WEB-INF/test'
end
end
desc "The PDMAFWeb Project"
define "PDMAFWeb", :layout=>Project_Layout do
project.version = VERSION_NUMBER
project.group = GROUP
manifest['Copyright'] = 'PDMAF Inc (C) 2009'
compile.options.target = '1.5'
clean do
Dir.chdir(path_to('target','main','classes'))
FileUtils.rm Dir.glob("*.*")
end
jars = Dir["lib/*.jar"].map { |f|
artifact("local:#{File.basename(f)}:jar:unknown").from(f)
}
compile.with jars
javac :compile do |task|
task.build_path << path_to('source','main','java')
end
ant('aspectj') do |ant|
ant.taskdef :resource=>'org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties' do
ant.classpath do
ant.pathelement :path => path_to('source','main','lib') + '/aspectjtools.jar'
ant.pathelement :path => path_to('source','main','lib') + '/aspectjweaver.jar'
end
end
ant.iajc :srcdir=>path_to('source','main','aspectj'), :destdir=>path_to('target', 'main', 'classes'),
:source=>'1.5', :target=>'1.5', :compliance=>'1.5' do
ant.classpath do
ant.fileset :dir=>path_to('source','main','lib'), :includes=>'*.jar'
end
end
end
resources.include 'web-app/WEB-INF/*.xml'
##since one test framework can be active at a time
##we have to switch back and forth from here
test.using(:scalatest)
#test.using(:easyb)
#test.using(:testng)
#test.using(:junit)
#test.compile.from "test/unit"
end