Class: Buildr::CustomPom

Inherits:
Object show all
Defined in:
lib/buildr/java/custom_pom.rb

Defined Under Namespace

Classes: Developer

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Retrieve the project description, defaulting to the name if not specified



32
33
34
# File 'lib/buildr/java/custom_pom.rb', line 32

def description
  @description || name
end

#issues_systemObject

Returns the value of attribute issues_system.



94
95
96
# File 'lib/buildr/java/custom_pom.rb', line 94

def issues_system
  @issues_system
end

#issues_urlObject

Returns the value of attribute issues_url.



93
94
95
# File 'lib/buildr/java/custom_pom.rb', line 93

def issues_url
  @issues_url
end

#nameObject

Retrieve the name of the project, defaulting to the project description or the name if not specified



24
25
26
# File 'lib/buildr/java/custom_pom.rb', line 24

def name
  @name || @buildr_project.comment || @buildr_project.name
end

#scm_connectionObject

Returns the value of attribute scm_connection.



90
91
92
# File 'lib/buildr/java/custom_pom.rb', line 90

def scm_connection
  @scm_connection
end

#scm_developer_connectionObject

Returns the value of attribute scm_developer_connection.



91
92
93
# File 'lib/buildr/java/custom_pom.rb', line 91

def scm_developer_connection
  @scm_developer_connection
end

#scm_urlObject

Returns the value of attribute scm_url.



89
90
91
# File 'lib/buildr/java/custom_pom.rb', line 89

def scm_url
  @scm_url
end

#urlObject

Property for the projects url



37
38
39
# File 'lib/buildr/java/custom_pom.rb', line 37

def url
  @url
end

Instance Method Details

#add_apache_v2_licenseObject

Add Apache2 to the list of licenses



45
46
47
# File 'lib/buildr/java/custom_pom.rb', line 45

def add_apache_v2_license
  self.licenses['The Apache Software License, Version 2.0'] = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
end

#add_bsd_2_licenseObject



49
50
51
# File 'lib/buildr/java/custom_pom.rb', line 49

def add_bsd_2_license
  self.licenses['The BSD 2-Clause License'] = 'http://opensource.org/licenses/BSD-2-Clause'
end

#add_bsd_3_licenseObject



53
54
55
# File 'lib/buildr/java/custom_pom.rb', line 53

def add_bsd_3_license
  self.licenses['The BSD 3-Clause License'] = 'http://opensource.org/licenses/BSD-3-Clause'
end

#add_cddl_v1_licenseObject



57
58
59
# File 'lib/buildr/java/custom_pom.rb', line 57

def add_cddl_v1_license
  self.licenses['Common Development and Distribution License (CDDL-1.0)'] = 'http://opensource.org/licenses/CDDL-1.0'
end

#add_developer(id, name = nil, email = nil, roles = nil) ⇒ Object



111
112
113
# File 'lib/buildr/java/custom_pom.rb', line 111

def add_developer(id, name = nil, email = nil, roles = nil)
  self.developers << Developer.new(id, name, email, roles)
end

#add_epl_v1_licenseObject



61
62
63
# File 'lib/buildr/java/custom_pom.rb', line 61

def add_epl_v1_license
  self.licenses['Eclipse Public License - v 1.0'] = 'http://www.eclipse.org/legal/epl-v10.html'
end

#add_github_project(project_spec) ⇒ Object

Add a project like add_github_project(‘realityforge/gwt-appcache’)



97
98
99
100
101
102
103
104
105
# File 'lib/buildr/java/custom_pom.rb', line 97

def add_github_project(project_spec)
  git_url = "[email protected]:#{project_spec}.git"
  self.scm_connection = self.scm_developer_connection = "scm:git:#{git_url}"
  self.scm_url = git_url
  web_url = "https://github.com/#{project_spec}"
  self.url = web_url
  self.issues_url = "#{web_url}/issues"
  self.issues_system = 'GitHub Issues'
end

#add_gpl_v1_licenseObject



65
66
67
# File 'lib/buildr/java/custom_pom.rb', line 65

def add_gpl_v1_license
  self.licenses['GNU General Public License (GPL) version 1.0'] = 'http://www.gnu.org/licenses/gpl-1.0.html'
end

#add_gpl_v2_licenseObject



69
70
71
# File 'lib/buildr/java/custom_pom.rb', line 69

def add_gpl_v2_license
  self.licenses['GNU General Public License (GPL) version 2.0'] = 'http://www.gnu.org/licenses/gpl-2.0.html'
end

#add_gpl_v3_licenseObject



73
74
75
# File 'lib/buildr/java/custom_pom.rb', line 73

def add_gpl_v3_license
  self.licenses['GNU General Public License (GPL) version 3.0'] = 'http://www.gnu.org/licenses/gpl-3.0.html'
end

#add_lgpl_v2_licenseObject



77
78
79
# File 'lib/buildr/java/custom_pom.rb', line 77

def add_lgpl_v2_license
  self.licenses['GNU General Lesser Public License (LGPL) version 2.1'] = 'http://www.gnu.org/licenses/lgpl-2.1.html'
end

#add_lgpl_v3_licenseObject



81
82
83
# File 'lib/buildr/java/custom_pom.rb', line 81

def add_lgpl_v3_license
  self.licenses['GNU General Lesser Public License (LGPL) version 3.0'] = 'http://www.gnu.org/licenses/lgpl-3.0.html'
end

#add_mit_licenseObject



85
86
87
# File 'lib/buildr/java/custom_pom.rb', line 85

def add_mit_license
  self.licenses['The MIT License'] = 'http://opensource.org/licenses/MIT'
end

#developersObject



107
108
109
# File 'lib/buildr/java/custom_pom.rb', line 107

def developers
  @developers ||= []
end

#licensesObject

Return the map of licenses for project



40
41
42
# File 'lib/buildr/java/custom_pom.rb', line 40

def licenses
  @licenses ||= {}
end

#optional_dependenciesObject



131
132
133
# File 'lib/buildr/java/custom_pom.rb', line 131

def optional_dependencies
  @optional_dependencies ||= []
end

#optional_dependencies=(optional_dependencies) ⇒ Object



135
136
137
# File 'lib/buildr/java/custom_pom.rb', line 135

def optional_dependencies=(optional_dependencies)
  @optional_dependencies = optional_dependencies
end

#provided_dependenciesObject



115
116
117
# File 'lib/buildr/java/custom_pom.rb', line 115

def provided_dependencies
  @provided_dependencies ||= []
end

#provided_dependencies=(provided_dependencies) ⇒ Object



119
120
121
# File 'lib/buildr/java/custom_pom.rb', line 119

def provided_dependencies=(provided_dependencies)
  @provided_dependencies = provided_dependencies
end

#runtime_dependenciesObject



123
124
125
# File 'lib/buildr/java/custom_pom.rb', line 123

def runtime_dependencies
  @runtime_dependencies ||= []
end

#runtime_dependencies=(runtime_dependencies) ⇒ Object



127
128
129
# File 'lib/buildr/java/custom_pom.rb', line 127

def runtime_dependencies=(runtime_dependencies)
  @runtime_dependencies = runtime_dependencies
end