novoda-buildr 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. data/CHANGELOG +1050 -0
  2. data/LICENSE +176 -0
  3. data/NOTICE +26 -0
  4. data/README.rdoc +134 -0
  5. data/Rakefile +45 -0
  6. data/_buildr +29 -0
  7. data/_jbuildr +29 -0
  8. data/addon/buildr/antlr.rb +65 -0
  9. data/addon/buildr/cobertura.rb +22 -0
  10. data/addon/buildr/drb.rb +281 -0
  11. data/addon/buildr/emma.rb +22 -0
  12. data/addon/buildr/hibernate.rb +142 -0
  13. data/addon/buildr/javacc.rb +85 -0
  14. data/addon/buildr/jdepend.rb +60 -0
  15. data/addon/buildr/jetty.rb +248 -0
  16. data/addon/buildr/jibx.rb +86 -0
  17. data/addon/buildr/nailgun.rb +221 -0
  18. data/addon/buildr/openjpa.rb +90 -0
  19. data/addon/buildr/org/apache/buildr/BuildrNail$Main.class +0 -0
  20. data/addon/buildr/org/apache/buildr/BuildrNail.class +0 -0
  21. data/addon/buildr/org/apache/buildr/BuildrNail.java +41 -0
  22. data/addon/buildr/org/apache/buildr/JettyWrapper$1.class +0 -0
  23. data/addon/buildr/org/apache/buildr/JettyWrapper$BuildrHandler.class +0 -0
  24. data/addon/buildr/org/apache/buildr/JettyWrapper.class +0 -0
  25. data/addon/buildr/org/apache/buildr/JettyWrapper.java +144 -0
  26. data/addon/buildr/xmlbeans.rb +93 -0
  27. data/bin/buildr +19 -0
  28. data/buildr.buildfile +58 -0
  29. data/buildr.gemspec +65 -0
  30. data/doc/_config.yml +1 -0
  31. data/doc/_layouts/default.html +88 -0
  32. data/doc/_layouts/preface.html +22 -0
  33. data/doc/artifacts.textile +211 -0
  34. data/doc/building.textile +245 -0
  35. data/doc/contributing.textile +252 -0
  36. data/doc/css/default.css +236 -0
  37. data/doc/css/print.css +101 -0
  38. data/doc/css/syntax.css +23 -0
  39. data/doc/download.textile +90 -0
  40. data/doc/extending.textile +205 -0
  41. data/doc/images/1442160941-frontcover.jpg +0 -0
  42. data/doc/images/asf-logo.gif +0 -0
  43. data/doc/images/asf-logo.png +0 -0
  44. data/doc/images/buildr-hires.png +0 -0
  45. data/doc/images/buildr.png +0 -0
  46. data/doc/images/favicon.png +0 -0
  47. data/doc/images/growl-icon.tiff +0 -0
  48. data/doc/images/note.png +0 -0
  49. data/doc/images/project-structure.png +0 -0
  50. data/doc/images/tip.png +0 -0
  51. data/doc/images/zbuildr.png +0 -0
  52. data/doc/images/zbuildr.tif +0 -0
  53. data/doc/index.textile +69 -0
  54. data/doc/installing.textile +265 -0
  55. data/doc/languages.textile +459 -0
  56. data/doc/mailing_lists.textile +25 -0
  57. data/doc/more_stuff.textile +457 -0
  58. data/doc/packaging.textile +429 -0
  59. data/doc/preface.textile +54 -0
  60. data/doc/projects.textile +276 -0
  61. data/doc/quick_start.textile +210 -0
  62. data/doc/scripts/buildr-git.rb +512 -0
  63. data/doc/scripts/gitflow.rb +296 -0
  64. data/doc/scripts/install-jruby.sh +44 -0
  65. data/doc/scripts/install-linux.sh +72 -0
  66. data/doc/scripts/install-osx.sh +52 -0
  67. data/doc/settings_profiles.textile +287 -0
  68. data/doc/testing.textile +233 -0
  69. data/etc/KEYS +151 -0
  70. data/lib/buildr.rb +36 -0
  71. data/lib/buildr/core.rb +35 -0
  72. data/lib/buildr/core/application.rb +662 -0
  73. data/lib/buildr/core/build.rb +463 -0
  74. data/lib/buildr/core/checks.rb +254 -0
  75. data/lib/buildr/core/common.rb +150 -0
  76. data/lib/buildr/core/compile.rb +608 -0
  77. data/lib/buildr/core/environment.rb +129 -0
  78. data/lib/buildr/core/filter.rb +363 -0
  79. data/lib/buildr/core/generate.rb +195 -0
  80. data/lib/buildr/core/help.rb +119 -0
  81. data/lib/buildr/core/osx.rb +46 -0
  82. data/lib/buildr/core/progressbar.rb +156 -0
  83. data/lib/buildr/core/project.rb +971 -0
  84. data/lib/buildr/core/shell.rb +198 -0
  85. data/lib/buildr/core/test.rb +774 -0
  86. data/lib/buildr/core/transports.rb +559 -0
  87. data/lib/buildr/core/util.rb +449 -0
  88. data/lib/buildr/groovy.rb +19 -0
  89. data/lib/buildr/groovy/bdd.rb +106 -0
  90. data/lib/buildr/groovy/compiler.rb +138 -0
  91. data/lib/buildr/groovy/shell.rb +48 -0
  92. data/lib/buildr/ide.rb +19 -0
  93. data/lib/buildr/ide/eclipse.rb +424 -0
  94. data/lib/buildr/ide/eclipse.rb~ +424 -0
  95. data/lib/buildr/ide/eclipse/java.rb +53 -0
  96. data/lib/buildr/ide/eclipse/plugin.rb +71 -0
  97. data/lib/buildr/ide/eclipse/scala.rb +68 -0
  98. data/lib/buildr/ide/idea.ipr.template +300 -0
  99. data/lib/buildr/ide/idea.rb +190 -0
  100. data/lib/buildr/ide/idea7x.ipr.template +290 -0
  101. data/lib/buildr/ide/idea7x.rb +212 -0
  102. data/lib/buildr/java.rb +23 -0
  103. data/lib/buildr/java/ant.rb +94 -0
  104. data/lib/buildr/java/bdd.rb +464 -0
  105. data/lib/buildr/java/cobertura.rb +274 -0
  106. data/lib/buildr/java/commands.rb +217 -0
  107. data/lib/buildr/java/compiler.rb +349 -0
  108. data/lib/buildr/java/deprecated.rb +141 -0
  109. data/lib/buildr/java/emma.rb +244 -0
  110. data/lib/buildr/java/jruby.rb +117 -0
  111. data/lib/buildr/java/jtestr_runner.rb.erb +118 -0
  112. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.class +0 -0
  113. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +142 -0
  114. data/lib/buildr/java/packaging.rb +717 -0
  115. data/lib/buildr/java/pom.rb +174 -0
  116. data/lib/buildr/java/rjb.rb +155 -0
  117. data/lib/buildr/java/test_result.rb +327 -0
  118. data/lib/buildr/java/tests.rb +341 -0
  119. data/lib/buildr/java/version_requirement.rb +172 -0
  120. data/lib/buildr/packaging.rb +24 -0
  121. data/lib/buildr/packaging/archive.rb +491 -0
  122. data/lib/buildr/packaging/artifact.rb +750 -0
  123. data/lib/buildr/packaging/artifact_namespace.rb +980 -0
  124. data/lib/buildr/packaging/artifact_search.rb +140 -0
  125. data/lib/buildr/packaging/gems.rb +106 -0
  126. data/lib/buildr/packaging/package.rb +241 -0
  127. data/lib/buildr/packaging/tar.rb +186 -0
  128. data/lib/buildr/packaging/version_requirement.rb +172 -0
  129. data/lib/buildr/packaging/zip.rb +73 -0
  130. data/lib/buildr/packaging/ziptask.rb +316 -0
  131. data/lib/buildr/resources/buildr.icns +0 -0
  132. data/lib/buildr/scala.rb +25 -0
  133. data/lib/buildr/scala/bdd.rb +114 -0
  134. data/lib/buildr/scala/compiler.rb +196 -0
  135. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner$.class +0 -0
  136. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.class +0 -0
  137. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala +35 -0
  138. data/lib/buildr/scala/shell.rb +60 -0
  139. data/lib/buildr/scala/tests.rb +157 -0
  140. data/lib/buildr/shell.rb +180 -0
  141. data/rakelib/all-in-one.rake +84 -0
  142. data/rakelib/checks.rake +57 -0
  143. data/rakelib/doc.rake +92 -0
  144. data/rakelib/jekylltask.rb +120 -0
  145. data/rakelib/package.rake +73 -0
  146. data/rakelib/release.rake +152 -0
  147. data/rakelib/rspec.rake +73 -0
  148. data/rakelib/setup.rake +54 -0
  149. data/rakelib/stage.rake +214 -0
  150. data/spec/addon/drb_spec.rb +328 -0
  151. data/spec/core/application_spec.rb +509 -0
  152. data/spec/core/build_spec.rb +678 -0
  153. data/spec/core/checks_spec.rb +519 -0
  154. data/spec/core/common_spec.rb +670 -0
  155. data/spec/core/compile_spec.rb +624 -0
  156. data/spec/core/extension_spec.rb +201 -0
  157. data/spec/core/generate_spec.rb +33 -0
  158. data/spec/core/project_spec.rb +762 -0
  159. data/spec/core/test_spec.rb +1175 -0
  160. data/spec/core/transport_spec.rb +537 -0
  161. data/spec/core/util_spec.rb +67 -0
  162. data/spec/groovy/bdd_spec.rb +80 -0
  163. data/spec/groovy/compiler_spec.rb +240 -0
  164. data/spec/ide/eclipse_spec.rb +650 -0
  165. data/spec/ide/idea7x_spec.rb +84 -0
  166. data/spec/java/ant_spec.rb +33 -0
  167. data/spec/java/bdd_spec.rb +379 -0
  168. data/spec/java/cobertura_spec.rb +85 -0
  169. data/spec/java/compiler_spec.rb +446 -0
  170. data/spec/java/emma_spec.rb +119 -0
  171. data/spec/java/java_spec.rb +124 -0
  172. data/spec/java/packaging_spec.rb +1140 -0
  173. data/spec/java/test_coverage_helper.rb +257 -0
  174. data/spec/java/tests_spec.rb +493 -0
  175. data/spec/packaging/archive_spec.rb +538 -0
  176. data/spec/packaging/artifact_namespace_spec.rb +697 -0
  177. data/spec/packaging/artifact_spec.rb +802 -0
  178. data/spec/packaging/packaging_helper.rb +63 -0
  179. data/spec/packaging/packaging_spec.rb +684 -0
  180. data/spec/sandbox.rb +148 -0
  181. data/spec/scala/bdd_spec.rb +119 -0
  182. data/spec/scala/compiler_spec.rb +284 -0
  183. data/spec/scala/scala.rb +38 -0
  184. data/spec/scala/tests_spec.rb +263 -0
  185. data/spec/spec_helpers.rb +340 -0
  186. data/spec/version_requirement_spec.rb +143 -0
  187. metadata +384 -0
@@ -0,0 +1,71 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with this
3
+ # work for additional information regarding copyright ownership. The ASF
4
+ # licenses this file to you under the Apache License, Version 2.0 (the
5
+ # "License"); you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ # License for the specific language governing permissions and limitations under
14
+ # the License.
15
+
16
+
17
+ require 'buildr/core/project'
18
+ require 'buildr/core/common'
19
+
20
+ module Buildr
21
+ module Eclipse
22
+ module Plugin
23
+ include Extension
24
+
25
+ NATURE = 'org.eclipse.pde.PluginNature'
26
+ CONTAINER = 'org.eclipse.pde.core.requiredPlugins'
27
+ BUILDERS = ['org.eclipse.pde.ManifestBuilder', 'org.eclipse.pde.SchemaBuilder']
28
+
29
+ after_define do |project|
30
+ eclipse = project.eclipse
31
+
32
+ # smart defaults
33
+ if eclipse.natures.empty? && (
34
+ (File.exists? project.path_to("plugin.xml")) ||
35
+ (File.exists? project.path_to("OSGI-INF")) ||
36
+ (File.exists?(project.path_to("META-INF/MANIFEST.MF")) && File.read(project.path_to("META-INF/MANIFEST.MF")).match(/^Bundle-SymbolicName:/)))
37
+ eclipse.natures = [NATURE, Buildr::Eclipse::Java::NATURE]
38
+ eclipse.classpath_containers = [CONTAINER, Buildr::Eclipse::Java::CONTAINER] if eclipse.classpath_containers.empty?
39
+ eclipse.builders = BUILDERS + [Buildr::Eclipse::Java::BUILDER] if eclipse.builders.empty?
40
+ end
41
+
42
+ # :plugin nature explicitly set
43
+ if eclipse.natures.include? :plugin
44
+ unless eclipse.natures.include? NATURE
45
+ # plugin nature must be before java nature
46
+ eclipse.natures += [Buildr::Eclipse::Java::NATURE] unless eclipse.natures.include? Buildr::Eclipse::Java::NATURE
47
+ index = eclipse.natures.index(Buildr::Eclipse::Java::NATURE) || -1
48
+ eclipse.natures = eclipse.natures.insert(index, NATURE)
49
+ end
50
+ unless eclipse.classpath_containers.include? CONTAINER
51
+ # plugin container must be before java container
52
+ index = eclipse.classpath_containers.index(Buildr::Eclipse::Java::CONTAINER) || -1
53
+ eclipse.classpath_containers = eclipse.classpath_containers.insert(index, CONTAINER)
54
+ end
55
+ unless (eclipse.builders.include?(BUILDERS[0]) && eclipse.builders.include?(BUILDERS[1]))
56
+ # plugin builder must be before java builder
57
+ index = eclipse.classpath_containers.index(Buildr::Eclipse::Java::BUILDER) || -1
58
+ eclipse.builders = eclipse.builders.insert(index, BUILDERS[1]) unless eclipse.builders.include? BUILDERS[1]
59
+ index = eclipse.classpath_containers.index(BUILDERS[1]) || -1
60
+ eclipse.builders = eclipse.builders.insert(index, BUILDERS[0]) unless eclipse.builders.include? BUILDERS[0]
61
+ end
62
+ end
63
+ end
64
+
65
+ end
66
+ end
67
+ end
68
+
69
+ class Buildr::Project
70
+ include Buildr::Eclipse::Plugin
71
+ end
@@ -0,0 +1,68 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with this
3
+ # work for additional information regarding copyright ownership. The ASF
4
+ # licenses this file to you under the Apache License, Version 2.0 (the
5
+ # "License"); you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ # License for the specific language governing permissions and limitations under
14
+ # the License.
15
+
16
+
17
+ require 'buildr/core/project'
18
+ require 'buildr/core/common'
19
+
20
+ module Buildr
21
+ module Eclipse
22
+ module Scala
23
+ include Extension
24
+
25
+ NATURE = 'ch.epfl.lamp.sdt.core.scalanature'
26
+ CONTAINER = 'ch.epfl.lamp.sdt.launching.SCALA_CONTAINER'
27
+ BUILDER = 'ch.epfl.lamp.sdt.core.scalabuilder'
28
+
29
+ after_define :eclipse => :eclipse_scala
30
+ after_define :eclipse_scala do |project|
31
+ eclipse = project.eclipse
32
+ # smart defaults
33
+ if eclipse.natures.empty? && (project.compile.language == :scala || project.test.compile.language == :scala)
34
+ eclipse.natures = [NATURE, Buildr::Eclipse::Java::NATURE]
35
+ eclipse.classpath_containers = [CONTAINER, Buildr::Eclipse::Java::CONTAINER] if eclipse.classpath_containers.empty?
36
+ eclipse.builders = BUILDER if eclipse.builders.empty?
37
+ eclipse.exclude_libs += Buildr::Scala::Scalac.dependencies
38
+ end
39
+
40
+ # :scala nature explicitly set
41
+ if eclipse.natures.include? :scala
42
+ unless eclipse.natures.include? NATURE
43
+ # scala nature must be before java nature
44
+ eclipse.natures += [Buildr::Eclipse::Java::NATURE] unless eclipse.natures.include? Buildr::Eclipse::Java::NATURE
45
+ index = eclipse.natures.index(Buildr::Eclipse::Java::NATURE) || -1
46
+ eclipse.natures = eclipse.natures.insert(index, NATURE)
47
+ end
48
+ unless eclipse.classpath_containers.include? CONTAINER
49
+ # scala container must be before java container
50
+ index = eclipse.classpath_containers.index(Buildr::Eclipse::Java::CONTAINER) || -1
51
+ eclipse.classpath_containers = eclipse.classpath_containers.insert(index, CONTAINER)
52
+ end
53
+ unless eclipse.builders.include? BUILDER
54
+ # scala builder overrides java builder
55
+ eclipse.builders -= [Buildr::Eclipse::Java::BUILDER]
56
+ eclipse.builders += [BUILDER]
57
+ end
58
+ eclipse.exclude_libs += Buildr::Scala::Scalac.dependencies
59
+ end
60
+ end
61
+
62
+ end
63
+ end
64
+ end
65
+
66
+ class Buildr::Project
67
+ include Buildr::Eclipse::Scala
68
+ end
@@ -0,0 +1,300 @@
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 this
5
+ work for additional information regarding copyright ownership. The ASF
6
+ licenses this file to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance with the License.
8
+ 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, WITHOUT
14
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
+ License for the specific language governing permissions and limitations under
16
+ the License.
17
+ -->
18
+ <project version="4" relativePaths="false">
19
+ <component name="AntConfiguration">
20
+ <defaultAnt bundledAnt="true" />
21
+ </component>
22
+ <component name="BuildJarProjectSettings">
23
+ <option name="BUILD_JARS_ON_MAKE" value="false" />
24
+ </component>
25
+ <component name="CodeStyleManager">
26
+ <option name="USE_DEFAULT_CODE_STYLE_SCHEME" value="true" />
27
+ <option name="CODE_STYLE_SCHEME" value="" />
28
+ </component>
29
+ <component name="CodeStyleProjectProfileManger">
30
+ <option name="PROJECT_PROFILE" />
31
+ <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
32
+ </component>
33
+ <component name="CodeStyleSettingsManager">
34
+ <option name="PER_PROJECT_SETTINGS" />
35
+ <option name="USE_PER_PROJECT_SETTINGS" value="false" />
36
+ </component>
37
+ <component name="CompilerConfiguration">
38
+ <option name="DEFAULT_COMPILER" value="Javac" />
39
+ <option name="DEPLOY_AFTER_MAKE" value="0" />
40
+ <resourceExtensions />
41
+ <wildcardResourcePatterns>
42
+ <entry name="!?*.java" />
43
+ </wildcardResourcePatterns>
44
+ </component>
45
+ <component name="DataSourceManager" />
46
+ <component name="DataSourceManagerImpl" />
47
+ <component name="DependenciesAnalyzeManager">
48
+ <option name="myForwardDirection" value="false" />
49
+ </component>
50
+ <component name="DependencyValidationManager" />
51
+ <component name="EclipseCompilerSettings">
52
+ <option name="DEBUGGING_INFO" value="true" />
53
+ <option name="GENERATE_NO_WARNINGS" value="true" />
54
+ <option name="DEPRECATION" value="false" />
55
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
56
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
57
+ </component>
58
+ <component name="EclipseEmbeddedCompilerSettings">
59
+ <option name="DEBUGGING_INFO" value="true" />
60
+ <option name="GENERATE_NO_WARNINGS" value="true" />
61
+ <option name="DEPRECATION" value="false" />
62
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
63
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
64
+ </component>
65
+ <component name="EntryPointsManager">
66
+ <entry_points />
67
+ </component>
68
+ <component name="ExportToHTMLSettings">
69
+ <option name="PRINT_LINE_NUMBERS" value="false" />
70
+ <option name="OPEN_IN_BROWSER" value="false" />
71
+ <option name="OUTPUT_DIRECTORY" />
72
+ </component>
73
+ <component name="GUI Designer component loader factory" />
74
+ <component name="IdProvider" IDEtalkID="0246D33576B8D4BC3331F9A5BB848389" />
75
+ <component name="ImportConfiguration">
76
+ <option name="VENDOR" />
77
+ <option name="RELEASE_TAG" />
78
+ <option name="LOG_MESSAGE" />
79
+ <option name="CHECKOUT_AFTER_IMPORT" value="true" />
80
+ </component>
81
+ <component name="InspectionProjectProfileManager">
82
+ <option name="PROJECT_PROFILE" value="Project Default" />
83
+ <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
84
+ <scopes />
85
+ <profiles>
86
+ <profile version="1.0" is_locked="false">
87
+ <option name="myName" value="Project Default" />
88
+ <option name="myLocal" value="false" />
89
+ <used_levels>
90
+ <error>
91
+ <option name="myName" value="ERROR" />
92
+ <option name="myVal" value="400" />
93
+ </error>
94
+ <warning>
95
+ <option name="myName" value="WARNING" />
96
+ <option name="myVal" value="300" />
97
+ </warning>
98
+ <information>
99
+ <option name="myName" value="INFO" />
100
+ <option name="myVal" value="200" />
101
+ </information>
102
+ <server>
103
+ <option name="myName" value="SERVER PROBLEM" />
104
+ <option name="myVal" value="100" />
105
+ </server>
106
+ </used_levels>
107
+ </profile>
108
+ </profiles>
109
+ </component>
110
+ <component name="JUnitProjectSettings">
111
+ <option name="TEST_RUNNER" value="UI" />
112
+ </component>
113
+ <component name="JavacSettings">
114
+ <option name="DEBUGGING_INFO" value="true" />
115
+ <option name="GENERATE_NO_WARNINGS" value="false" />
116
+ <option name="DEPRECATION" value="true" />
117
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
118
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
119
+ </component>
120
+ <component name="JavadocGenerationManager">
121
+ <option name="OUTPUT_DIRECTORY" />
122
+ <option name="OPTION_SCOPE" value="protected" />
123
+ <option name="OPTION_HIERARCHY" value="false" />
124
+ <option name="OPTION_NAVIGATOR" value="false" />
125
+ <option name="OPTION_INDEX" value="false" />
126
+ <option name="OPTION_SEPARATE_INDEX" value="false" />
127
+ <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
128
+ <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
129
+ <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
130
+ <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="false" />
131
+ <option name="OPTION_DEPRECATED_LIST" value="false" />
132
+ <option name="OTHER_OPTIONS" />
133
+ <option name="HEAP_SIZE" />
134
+ <option name="LOCALE" />
135
+ <option name="OPEN_IN_BROWSER" value="false" />
136
+ </component>
137
+ <component name="JikesSettings">
138
+ <option name="JIKES_PATH" value="" />
139
+ <option name="DEBUGGING_INFO" value="true" />
140
+ <option name="DEPRECATION" value="true" />
141
+ <option name="GENERATE_NO_WARNINGS" value="false" />
142
+ <option name="IS_EMACS_ERRORS_MODE" value="true" />
143
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
144
+ </component>
145
+ <component name="LogConsolePreferences">
146
+ <option name="FILTER_ERRORS" value="false" />
147
+ <option name="FILTER_WARNINGS" value="false" />
148
+ <option name="FILTER_INFO" value="true" />
149
+ <option name="CUSTOM_FILTER" />
150
+ </component>
151
+ <component name="Palette2">
152
+ <group name="Swing">
153
+ <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
154
+ <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
155
+ </item>
156
+ <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
157
+ <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
158
+ </item>
159
+ <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
160
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
161
+ </item>
162
+ <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
163
+ <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
164
+ </item>
165
+ <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
166
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
167
+ <initial-values>
168
+ <property name="text" value="Button" />
169
+ </initial-values>
170
+ </item>
171
+ <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
172
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
173
+ <initial-values>
174
+ <property name="text" value="RadioButton" />
175
+ </initial-values>
176
+ </item>
177
+ <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
178
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
179
+ <initial-values>
180
+ <property name="text" value="CheckBox" />
181
+ </initial-values>
182
+ </item>
183
+ <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
184
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
185
+ <initial-values>
186
+ <property name="text" value="Label" />
187
+ </initial-values>
188
+ </item>
189
+ <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
190
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
191
+ <preferred-size width="150" height="-1" />
192
+ </default-constraints>
193
+ </item>
194
+ <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
195
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
196
+ <preferred-size width="150" height="-1" />
197
+ </default-constraints>
198
+ </item>
199
+ <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
200
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
201
+ <preferred-size width="150" height="-1" />
202
+ </default-constraints>
203
+ </item>
204
+ <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
205
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
206
+ <preferred-size width="150" height="50" />
207
+ </default-constraints>
208
+ </item>
209
+ <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
210
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
211
+ <preferred-size width="150" height="50" />
212
+ </default-constraints>
213
+ </item>
214
+ <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
215
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
216
+ <preferred-size width="150" height="50" />
217
+ </default-constraints>
218
+ </item>
219
+ <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
220
+ <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
221
+ </item>
222
+ <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
223
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
224
+ <preferred-size width="150" height="50" />
225
+ </default-constraints>
226
+ </item>
227
+ <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
228
+ <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
229
+ <preferred-size width="150" height="50" />
230
+ </default-constraints>
231
+ </item>
232
+ <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
233
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
234
+ <preferred-size width="150" height="50" />
235
+ </default-constraints>
236
+ </item>
237
+ <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
238
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
239
+ <preferred-size width="200" height="200" />
240
+ </default-constraints>
241
+ </item>
242
+ <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
243
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
244
+ <preferred-size width="200" height="200" />
245
+ </default-constraints>
246
+ </item>
247
+ <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
248
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
249
+ </item>
250
+ <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
251
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
252
+ </item>
253
+ <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
254
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
255
+ </item>
256
+ <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
257
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
258
+ </item>
259
+ <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
260
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
261
+ <preferred-size width="-1" height="20" />
262
+ </default-constraints>
263
+ </item>
264
+ <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
265
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
266
+ </item>
267
+ <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
268
+ <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
269
+ </item>
270
+ </group>
271
+ </component>
272
+ <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" />
273
+ <component name="ProjectRunConfigurationManager" />
274
+ <component name="RmicSettings">
275
+ <option name="IS_EANABLED" value="false" />
276
+ <option name="DEBUGGING_INFO" value="true" />
277
+ <option name="GENERATE_NO_WARNINGS" value="false" />
278
+ <option name="GENERATE_IIOP_STUBS" value="false" />
279
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
280
+ </component>
281
+ <component name="StarteamVcsAdapter" />
282
+ <component name="VssVcs" />
283
+ <component name="com.intellij.jsf.UserDefinedFacesConfigs">
284
+ <option name="USER_DEFINED_CONFIGS">
285
+ <value>
286
+ <list size="0" />
287
+ </value>
288
+ </option>
289
+ </component>
290
+ <component name="uidesigner-configuration">
291
+ <option name="INSTRUMENT_CLASSES" value="true" />
292
+ <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" />
293
+ <option name="DEFAULT_LAYOUT_MANAGER" value="GridLayoutManager" />
294
+ </component>
295
+ <UsedPathMacros>
296
+ <macro name="M2_REPO" />
297
+ </UsedPathMacros>
298
+ </project>
299
+
300
+
@@ -0,0 +1,190 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with this
3
+ # work for additional information regarding copyright ownership. The ASF
4
+ # licenses this file to you under the Apache License, Version 2.0 (the
5
+ # "License"); you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ # License for the specific language governing permissions and limitations under
14
+ # the License.
15
+
16
+
17
+ require 'buildr/core/project'
18
+ require 'buildr/packaging'
19
+ require 'stringio'
20
+
21
+
22
+ module Buildr
23
+ module Idea #:nodoc:
24
+
25
+ include Extension
26
+
27
+ first_time do
28
+ # Global task "idea" generates artifacts for all projects.
29
+ desc "Generate Idea artifacts for all projects"
30
+ Project.local_task "idea"=>"artifacts"
31
+ end
32
+
33
+ before_define(:idea) do |project|
34
+ project.recursive_task("idea")
35
+ end
36
+
37
+ after_define(:idea => :package) do |project|
38
+ idea = project.task("idea")
39
+ # We need paths relative to the top project's base directory.
40
+ root_path = lambda { |p| f = lambda { |p| p.parent ? f[p.parent] : p.base_dir }; f[p] }[project]
41
+
42
+ # Find a path relative to the project's root directory.
43
+ relative = lambda { |path| Util.relative_path(path.to_s, project.path_to) }
44
+
45
+ m2repo = Buildr::Repositories.instance.local
46
+ excludes = [ '**/.svn/', '**/CVS/' ].join('|')
47
+
48
+ # Only for projects that are packageable.
49
+ task_name = project.path_to("#{project.name.gsub(':', '-')}.iml")
50
+ idea.enhance [ file(task_name) ]
51
+
52
+ # The only thing we need to look for is a change in the Buildfile.
53
+ file(task_name=>Buildr.application.buildfile) do |task|
54
+ info "Writing #{task.name}"
55
+
56
+ # Idea handles modules slightly differently if they're WARs
57
+ idea_types = Hash.new("JAVA_MODULE")
58
+ idea_types["war"] = "J2EE_WEB_MODULE"
59
+
60
+ # Note: Use the test classpath since Eclipse compiles both "main" and "test" classes using the same classpath
61
+ deps = project.test.compile.dependencies.map(&:to_s) - [ project.compile.target.to_s ]
62
+
63
+ # Convert classpath elements into applicable Project objects
64
+ deps.collect! { |path| Buildr.projects.detect { |prj| prj.packages.detect { |pkg| pkg.to_s == path } } || path }
65
+
66
+ # project_libs: artifacts created by other projects
67
+ project_libs, others = deps.partition { |path| path.is_a?(Project) }
68
+
69
+ # Separate artifacts from Maven2 repository
70
+ m2_libs, others = others.partition { |path| path.to_s.index(m2repo) == 0 }
71
+
72
+ # Generated: classpath elements in the project are assumed to be generated
73
+ generated, libs = others.partition { |path| path.to_s.index(project.path_to.to_s) == 0 }
74
+
75
+ # Project type is going to be the first package type
76
+ if package = project.packages.first
77
+ File.open(task.name, "w") do |file|
78
+ xml = Builder::XmlMarkup.new(:target=>file, :indent=>2)
79
+
80
+ xml.module(:version=>"4", :relativePaths=>"false", :type=>idea_types[package.type.to_s]) do
81
+ xml.component :name=>"ModuleRootManager"
82
+ xml.component "name"=>"NewModuleRootManager", "inherit-compiler-output"=>"false" do
83
+ has_compile_sources = project.compile.target.to_s.size > 0
84
+ xml.output :url=>"file://$MODULE_DIR$/#{relative[project.compile.target.to_s]}" if has_compile_sources
85
+ xml.tag! "exclude-output"
86
+
87
+ # TODO project.test.target isn't recognized, what's the proper way to get the test compile path?
88
+ xml.tag! "output-test", :url=>"file://$MODULE_DIR$/target/test-classes"
89
+
90
+ xml.content(:url=>"file://$MODULE_DIR$") do
91
+ if has_compile_sources
92
+ srcs = project.compile.sources.map { |src| relative[src.to_s] } + generated.map { |src| relative[src.to_s] }
93
+ srcs.sort.uniq.each do |path|
94
+ xml.sourceFolder :url=>"file://$MODULE_DIR$/#{path}", :isTestSource=>"false"
95
+ end
96
+
97
+ test_sources = project.test.compile.sources.map { |src| relative[src.to_s] }
98
+ test_sources.each do |paths|
99
+ paths.sort.uniq.each do |path|
100
+ xml.sourceFolder :url=>"file://$MODULE_DIR$/#{path}", :isTestSource=>"true"
101
+ end
102
+ end
103
+ end
104
+ [project.resources=>false, project.test.resources=>true].each do |resources, test|
105
+ resources.each do |path|
106
+ path[0].sources.each do |srcpath|
107
+ xml.sourceFolder :url=>"file://#{srcpath}", :isTestSource=>path[1].to_s
108
+ end
109
+ end
110
+ end
111
+ xml.excludeFolder :url=>"file://$MODULE_DIR$/#{relative[project.compile.target.to_s]}" if has_compile_sources
112
+ end
113
+
114
+ xml.orderEntry :type=>"sourceFolder", :forTests=>"false"
115
+ xml.orderEntry :type=>"inheritedJdk"
116
+
117
+ # Classpath elements from other projects
118
+ project_libs.map(&:id).sort.uniq.each do |project_id|
119
+ xml.orderEntry :type=>'module', "module-name"=>project_id
120
+ end
121
+
122
+ # Libraries
123
+ ext_libs = libs.map {|path| "$MODULE_DIR$/#{path.to_s}" } +
124
+ m2_libs.map { |path| path.to_s.sub(m2repo, "$M2_REPO$") }
125
+ ext_libs.each do |path|
126
+ xml.orderEntry :type=>"module-library" do
127
+ xml.library do
128
+ xml.CLASSES do
129
+ xml.root :url=>"jar://#{path}!/"
130
+ end
131
+ xml.JAVADOC
132
+ xml.SOURCES do
133
+ xml.root :url=>"jar://#{path.sub(/\.jar$/, "-sources.jar")}!/"
134
+ end
135
+ end
136
+ end
137
+ end
138
+
139
+ xml.orderEntryProperties
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
145
+
146
+ # Root project aggregates all the subprojects.
147
+ if project.parent == nil
148
+ task_name = project.path_to("#{project.name.gsub(':', '-')}.ipr")
149
+ idea.enhance [ file(task_name) ]
150
+
151
+ file(task_name=>Buildr.application.buildfile) do |task|
152
+ info "Writing #{task.name}"
153
+
154
+ # Generating just the little stanza that chanages from one project to another
155
+ partial = StringIO.new
156
+ xml = Builder::XmlMarkup.new(:target=>partial, :indent=>2)
157
+ xml.component(:name=>"ProjectModuleManager") do
158
+ xml.modules do
159
+ project.projects.each do |subp|
160
+ module_name = subp.name.gsub(":", "-")
161
+ module_path = subp.name.split(":"); module_path.shift
162
+ module_path = module_path.join("/")
163
+ path = "#{module_path}/#{module_name}.iml"
164
+ xml.module :fileurl=>"file://$PROJECT_DIR$/#{path}", :filepath=>"$PROJECT_DIR$/#{path}"
165
+ end
166
+ if package = project.packages.first
167
+ xml.module :fileurl=>"file://$PROJECT_DIR$/#{project.name}.iml", :filepath=>"$PROJECT_DIR$/#{project.name}.iml"
168
+ end
169
+ end
170
+ end
171
+
172
+ # Loading the whole fairly constant crap
173
+ template_xml = REXML::Document.new(File.open(File.dirname(__FILE__)+"/idea.ipr.template"))
174
+ include_xml = REXML::Document.new(partial.string)
175
+ template_xml.root.add_element(include_xml.root)
176
+ File.open task.name, 'w' do |file|
177
+ template_xml.write file
178
+ end
179
+ end
180
+ end
181
+
182
+ end #after define
183
+
184
+ end #module Idea
185
+ end # module Buildr
186
+
187
+
188
+ class Buildr::Project
189
+ include Buildr::Idea
190
+ end