5 find_filenames /([^\\^\/]*\.jar)/i, :name_from_match => 1
12 # Java Application Servers
14 define_platform 'glassfish' do
16 gestalt(:platform, 'java')
18 find_filenames /\b(sun\-web|sun\-ejb\-jar|sun\-application(\-client))\.xml\b/
19 maven_dependency /^org.glassfish\b/
24 define_platform 'jboss' do
26 gestalt(:platform, 'java')
28 find_filenames /\bjboss(\-app|cmp\-jdbc|\-web|\-build|\-client)\.xml\b/
29 maven_dependency /^org.jboss\b/
34 define_platform 'weblogic' do
36 gestalt(:platform, 'java')
38 find_filenames /\bweblogic(\-ejb\-jar|\-ra|\-application|\-cmp\-rdbms\jar)\.xml\b/
39 maven_plugin /^org\.codehaus\.mojo\b/, /^weblogic\-maven\-plugin\b/
44 define_platform 'jonas' do
46 gestalt(:platform, 'java')
47 find_filenames /\bjonas\-ejb\-jar\.xml\b/
51 define_platform 'websphere' do
53 gestalt(:platform, 'java')
54 find_filenames /\bibm\-(application|web|webservices|webservicesclient)\-.+\.xmi$/
58 define_platform 'tomcat' do
60 gestalt(:platform, 'java')
62 java_import /^org\.apache\.tomcat\b/
63 maven_dependency /^org\.apache\.tomcat\b/
68 define_platform 'appserver' do
70 gestalt(:platform, 'glassfish')
71 gestalt(:platform, 'jboss')
72 gestalt(:platform, 'weblogic')
73 gestalt(:platform, 'tomcat')
74 gestalt(:platform, 'jonas')
75 gestalt(:platform, 'websphere')
79 define_platform 'ejb2' do
81 gestalt(:platform, 'java')
83 find_filenames /(.+\-)ejb\-jar\.xml\b/
84 java_keywords 'EJBHome', 'EJBRemote', 'SessionBean'
89 # Caution! The EJB platform definitions are senstive to their order -- do not reorder!
90 # The gestalt engine iterates over definitions in the order they are defined.
92 # First, look for the subset of new features that definitely indicate EJB 3.1
93 define_platform 'ejb3.1' do
95 gestalt(:platform, 'java')
97 java_keywords '@Schedule', '@Singleton', '@Asynchronous'
98 java_keywords /@EJB\(.*\bmappedName\s*=\s*"java:(global|app|module)\/.+".*\)/
99 java_keywords /\blookup\(\s*"java:(global|app|module)\/.+"\s*\)/
103 # Next, look for the basic attributes that can mean either EJB 3.0 or 3.1
104 define_platform 'ejb3+' do
106 gestalt(:platform, 'java')
108 gestalt(:platform, 'ejb3.1')
109 java_keywords '@EJB', '@Stateless', '@Statefull', '@Entity', '@Remote', '@Local', '@BusinessMethod'
110 java_import /^javax\.persistence\b/
114 # Finally, if we found EJB3+ and not EJB 3.1, then you must be using EJB 3.0 only.
115 define_platform 'ejb3.0' do
117 gestalt(:platform, 'ejb3+')
118 _not { gestalt(:platform, 'ejb3.1') }
122 define_platform 'servlet' do
124 gestalt(:platform, 'java')
126 java_import /^javax\.servlet\b/
127 maven_dependency /^javax\.servlet\b/
132 define_platform 'struts' do
134 gestalt(:platform, 'java')
136 filenames('\bstruts(\-config)?\.xml$', '\bstruts\.jar$')
137 java_import /^org\.apache\.struts\b/
138 maven_dependency /^org\.apache\.struts\b/
143 define_platform 'springframework' do
145 gestalt(:platform,'java')
147 filenames('spring\.jar$')
148 java_import /^org\.springframework\b/
149 maven_dependency /^org\.springframework\b/
154 define_platform 'jsf' do
156 gestalt(:platform, 'java')
158 java_import /^javax\.faces\b/
159 maven_dependency /^javax\.faces\b/
164 define_platform 'googlewebtoolkit' do
166 gestalt(:platform, 'java')
167 java_import /^com\.google\.gwt\b/
171 # Java Persistence Frameworks
173 define_platform 'hibernate' do
175 gestalt(:platform, 'java')
177 filenames '\bhibernate\d\.jar$'
178 java_import /^org\.hibernate\b/
179 maven_dependency 'org.hibernate'
184 define_platform 'jpa' do
186 gestalt(:platform, 'java')
187 java_import /^javax\.persistence\b/
191 define_platform 'toplink' do
193 gestalt(:platform, 'java')
194 java_import /^oracle\.toplink\b/
198 define_platform 'castor' do
200 gestalt(:platform, 'java')
201 java_import /^org\.exolab\.castor\b/
205 define_platform 'db4o' do
207 gestalt(:platform, 'java')
208 java_import /^com\.db4o\b/
212 # Java Enterprise Service Buses
214 define_platform 'openesb' do
216 gestalt(:platform, 'java')
217 java_import /^org\.openesb\b/
221 define_platform 'muleesb' do
223 gestalt(:platform, 'java')
224 java_import /^org\.mule\b/
228 define_platform 'servicemix' do
230 gestalt(:platform, 'java')
232 java_import /^org\.apache\.servicemix\b/
233 maven_dependency /^org.apache.servicemix\b/
238 define_platform 'jbossesb' do
240 gestalt(:platform, 'java')
241 java_import /^org\.jboss\.soa\.esb\b/
245 define_platform 'openesb' do
247 gestalt(:platform, 'java')
248 java_import /^org\.openesb\b/
252 # Other Java Technologies
254 define_platform 'opensso' do
256 gestalt(:platform, 'java')
258 filenames '\bopensso\.war$'
259 java_import /^com\.sun\.identity\.(authentication|agents)\b/
264 define_platform 'maven' do
266 gestalt(:platform, 'java')
267 find_filenames /\bpom\.xml$/