Skip to content

Commit ff48599

Browse files
committed
RF-13253, RF-13267: Removed the richwidgets submodle, introduced a grunt project to build and copy richwidgets into the source tree
1 parent 5fe6902 commit ff48599

File tree

259 files changed

+65314
-80
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+65314
-80
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ test-output
99
MANIFEST.MF
1010
rebel.xml
1111
*faces-config.xml.jsfdia
12+
bower_components
13+
node_modules
1214

1315
.factorypath
1416

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "framework/src/main/widgets"]
2-
path = framework/src/main/widgets
3-
url = https://github.com/richfaces/richfaces-widgets.git

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ For more information on how to get started with the project, see [Project Docume
7676
Cloning the Project
7777
-------------------
7878

79-
$ git clone --recursive git@github.com:richfaces/richfaces.git
80-
81-
Don't forget to use `--recursive` clone strategy, otherwise the project will miss resource dependencies that are part of the [RichWidgets](https://github.com/richwidgets/richwidgets) project referenced as a submodule.
79+
$ git clone git@github.com:richfaces/richfaces.git
8280

8381
Building the Project
8482
--------------------

framework/pom.xml

Lines changed: 6 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
<description>
3737
The RichFaces Framework and Component Suite.
38-
38+
3939
Contains all project specific sources.
4040
</description>
4141

@@ -63,7 +63,7 @@
6363
</exclusion>
6464
</exclusions>
6565
</dependency>
66-
66+
6767
<!-- CDK -->
6868
<dependency>
6969
<groupId>org.richfaces.cdk</groupId>
@@ -110,7 +110,7 @@
110110
<artifactId>oscache</artifactId>
111111
<optional>true</optional>
112112
</dependency>
113-
113+
114114
<!-- For MyFaces specific resource loading (RF-11974) -->
115115
<dependency>
116116
<groupId>org.apache.myfaces.core</groupId>
@@ -186,7 +186,7 @@
186186
<artifactId>hibernate-validator</artifactId>
187187
<scope>test</scope>
188188
</dependency>
189-
189+
190190
<!-- Resource Optimizer -->
191191
<dependency>
192192
<groupId>org.reflections</groupId>
@@ -273,77 +273,16 @@
273273
</sources>
274274
</configuration>
275275
</execution>
276-
<execution>
277-
<id>add-resources</id>
278-
<phase>generate-resources</phase>
279-
<goals>
280-
<goal>add-resource</goal>
281-
</goals>
282-
<configuration>
283-
<resources>
284-
<!-- RichFaces -->
285-
<resource>
286-
<directory>${basedir}/src/main/widgets/dist/assets/richwidgets</directory>
287-
<targetPath>${project.build.directory}/classes/META-INF/resources/org.richfaces/widget/</targetPath>
288-
</resource>
289-
<!-- jQuery UI -->
290-
<resource>
291-
<directory>${basedir}/src/main/widgets/dist/assets/jquery-ui</directory>
292-
<targetPath>${project.build.directory}/classes/META-INF/resources/com.jqueryui/</targetPath>
293-
</resource>
294-
<!-- Bootstrap -->
295-
<resource>
296-
<directory>${basedir}/src/main/widgets/dist/assets/bootstrap</directory>
297-
<targetPath>${project.build.directory}/classes/META-INF/resources/bootstrap/</targetPath>
298-
</resource>
299-
<!-- Font-Awesome -->
300-
<resource>
301-
<directory>${basedir}/src/main/widgets/dist/assets/font-awesome</directory>
302-
<targetPath>${project.build.directory}/classes/META-INF/resources/font-awesome/</targetPath>
303-
</resource>
304-
<!-- Flot -->
305-
<resource>
306-
<directory>${basedir}/src/main/widgets/dist/assets/flot</directory>
307-
<targetPath>${project.build.directory}/classes/META-INF/resources/flot/</targetPath>
308-
</resource>
309-
</resources>
310-
</configuration>
311-
</execution>
312276
</executions>
313277
</plugin>
314-
315-
<plugin>
316-
<groupId>org.apache.maven.plugins</groupId>
317-
<artifactId>maven-jar-plugin</artifactId>
318-
<executions>
319-
<execution>
320-
<goals>
321-
<goal>test-jar</goal>
322-
</goals>
323-
</execution>
324-
</executions>
325-
</plugin>
326-
327278
<plugin>
328279
<groupId>org.apache.maven.plugins</groupId>
329-
<artifactId>maven-enforcer-plugin</artifactId>
280+
<artifactId>maven-jar-plugin</artifactId>
330281
<executions>
331282
<execution>
332-
<id>enforce-richwidgets-submodule-exists</id>
333283
<goals>
334-
<goal>enforce</goal>
284+
<goal>test-jar</goal>
335285
</goals>
336-
<configuration>
337-
<rules>
338-
<requireFilesExist>
339-
<files>
340-
<file>src/main/widgets/Gruntfile.js</file>
341-
</files>
342-
<message>The RichWidgets submodule is missing. Use "git clone --recursive" to clone the project.</message>
343-
</requireFilesExist>
344-
</rules>
345-
<fail>true</fail>
346-
</configuration>
347286
</execution>
348287
</executions>
349288
</plugin>

framework/src/main/java/org/richfaces/ui/input/autocomplete/autocomplete.template.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313

1414
<cdk:resource-dependency library="bootstrap" name="bootstrap.css" />
1515
<cdk:resource-dependency library="font-awesome" name="font-awesome.css" />
16-
<cdk:resource-dependency library="org.richfaces" name="widget/input/autocomplete.css" />
17-
16+
<cdk:resource-dependency library="org.richwidgets" name="input/autocomplete.css" />
17+
1818
<cdk:resource-dependency library="org.richfaces" name="ajax.reslib" />
1919
<cdk:resource-dependency library="com.jqueryui" name="jquery.ui.core.js" />
2020
<cdk:resource-dependency library="com.jqueryui" name="jquery.ui.widget.js" />
2121
<cdk:resource-dependency library="com.jqueryui" name="jquery.ui.position.js" />
2222
<cdk:resource-dependency library="com.jqueryui" name="jquery.ui.menu.js" />
2323
<cdk:resource-dependency library="com.jqueryui" name="jquery.ui.autocomplete.js" />
24-
<cdk:resource-dependency library="org.richfaces" name="widget/input/autocomplete.js" />
24+
<cdk:resource-dependency library="io.richwidgets" name="input/autocomplete.js" />
2525
<cdk:resource-dependency library="org.richfaces" name="bridge/bridgeBase.js" />
2626
<cdk:resource-dependency library="org.richfaces" name="bridge/input/autocompleteBridge.js" />
2727
</cc:interface>
@@ -45,7 +45,7 @@
4545
</script>
4646
</div>
4747
</cc:implementation>
48-
48+
4949
<cdk:fragment name="renderSuggestionsAsList">
5050
<cc:interface>
5151
<cc:attribute name="items" type="java.lang.Iterable" />
@@ -72,7 +72,7 @@
7272
</ul>
7373
</cc:implementation>
7474
</cdk:fragment>
75-
75+
7676
<cdk:fragment name="renderSuggestionsAsTable">
7777
<cc:interface>
7878
<cc:attribute name="items" type="java.lang.Iterable" />
@@ -94,7 +94,7 @@
9494
</table>
9595
</cc:implementation>
9696
</cdk:fragment>
97-
97+
9898
<cdk:fragment name="renderSuggestions">
9999
<cc:implementation>
100100
<c:choose>

framework/src/main/js/Gruntfile.js

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
"use strict";
2+
3+
module.exports = function(grunt) {
4+
5+
var path = require('path');
6+
7+
// Project configuration.
8+
grunt.initConfig({
9+
// Metadata.
10+
11+
pkg: grunt.file.readJSON('package.json'),
12+
13+
dir: {
14+
resources: {
15+
root: "../resources/META-INF/resources",
16+
richwidgets: "<%= dir.resources.root %>/io.richwidgets",
17+
jqueryui: "<%= dir.resources.root %>/com.jqueryui",
18+
bootstrap: "<%= dir.resources.root %>/bootstrap",
19+
fontawesome: "<%= dir.resources.root %>/font-awesome",
20+
flot: "<%= dir.resources.root %>/flot"
21+
},
22+
bower: {
23+
root: "bower_components/richwidgets/dist/assets",
24+
richwidgets: "<%= dir.bower.root %>/richwidgets",
25+
jqueryui: "<%= dir.bower.root %>/jquery-ui",
26+
bootstrap: "<%= dir.bower.root %>/bootstrap",
27+
fontawesome: "<%= dir.bower.root %>/font-awesome",
28+
flot: "<%= dir.bower.root %>/flot"
29+
}
30+
},
31+
32+
// Task configuration.
33+
34+
clean: {
35+
bower: ['bower_components'],
36+
resources: {
37+
options: { force: true },
38+
src: [
39+
'<%= dir.resources.richwidgets %>',
40+
'<%= dir.resources.jqueryui %>',
41+
'<%= dir.resources.bootstrap %>',
42+
'<%= dir.resources.fontawesome %>',
43+
'<%= dir.resources.flot %>',
44+
]
45+
}
46+
},
47+
48+
exec: {
49+
bowerInstall: {
50+
cmd : "bower install"
51+
}
52+
},
53+
54+
copy: {
55+
richwidgets: {
56+
files: [
57+
{
58+
expand: true,
59+
cwd: '<%= dir.bower.richwidgets %>',
60+
src: '**',
61+
dest: '<%= dir.resources.richwidgets %>'
62+
}
63+
]
64+
},
65+
jqueryui: {
66+
files: [
67+
{
68+
expand: true,
69+
cwd: '<%= dir.bower.jqueryui %>',
70+
src: '**',
71+
dest: '<%= dir.resources.jqueryui %>'
72+
}
73+
]
74+
},
75+
bootstrap: {
76+
files: [
77+
{
78+
expand: true,
79+
cwd: '<%= dir.bower.bootstrap %>',
80+
src: '**',
81+
dest: '<%= dir.resources.bootstrap %>'
82+
}
83+
]
84+
},
85+
fontawesome: {
86+
files: [
87+
{
88+
expand: true,
89+
cwd: '<%= dir.bower.fontawesome %>',
90+
src: '**',
91+
dest: '<%= dir.resources.fontawesome %>'
92+
}
93+
]
94+
},
95+
flot: {
96+
files: [
97+
{
98+
expand: true,
99+
cwd: '<%= dir.bower.flot %>',
100+
src: '**',
101+
dest: '<%= dir.resources.flot %>'
102+
}
103+
]
104+
}
105+
},
106+
107+
subgrunt: {
108+
richwidgets: {
109+
'bower_components/richwidgets' : ['bower', 'dist']
110+
}
111+
}
112+
});
113+
114+
// These plugins provide necessary tasks.
115+
grunt.loadNpmTasks('grunt-subgrunt');
116+
grunt.loadNpmTasks('grunt-contrib-clean');
117+
grunt.loadNpmTasks('grunt-contrib-copy');
118+
grunt.loadNpmTasks('grunt-exec');
119+
120+
grunt.registerTask('build', ['subgrunt:richwidgets']);
121+
122+
grunt.registerTask('copy-resources', ['clean:resources', 'copy']);
123+
124+
grunt.registerTask('dist', ['clean:bower', 'exec:bowerInstall', 'subgrunt:richwidgets', 'copy-resources']);
125+
126+
// Default task.
127+
grunt.registerTask('default', ['subgrunt:richwidgets']);
128+
129+
};

framework/src/main/js/bower.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "RichWidgets Builder",
3+
"version": "0.0.1-wip",
4+
"homepage": "https://github.com/richfaces/richfaces",
5+
"authors": [
6+
"Brian Leathem <bleathem@gmail.com>"
7+
],
8+
"description": "A grunt.js project used to build RichWidgets",
9+
"private": true,
10+
"ignore": [
11+
"**/.*",
12+
"node_modules",
13+
"bower_components",
14+
"test",
15+
"tests"
16+
],
17+
"dependencies": {
18+
"richwidgets": "git@github.com:richwidgets/richwidgets.git"
19+
}
20+
}

framework/src/main/js/package.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"name": "richfaces-widgets",
3+
"description": "A grunt.js project used to build RichWidgets for inclusion in RichFaces",
4+
"version": "0.0.1-wip",
5+
"homepage": "https://github.com/richfaces/richfaces",
6+
"author": "JBoss RedHat",
7+
"contributors": [
8+
{
9+
"name": "Brian Leathem",
10+
"email": "https://community.jboss.org/people/bleathem",
11+
"url": "http://www.bleathem.ca"
12+
},
13+
{
14+
"name": "Lukas Fryc",
15+
"email": "",
16+
"url": "http://lukas.fryc.eu/"
17+
}
18+
],
19+
"repository": {
20+
"type": "git",
21+
"url": "https://github.com/richfaces/richfaces"
22+
},
23+
"engines": {
24+
"node": ">= 0.8.4"
25+
},
26+
"dependencies": {},
27+
"devDependencies": {
28+
"grunt": "~0.4.1",
29+
"grunt-subgrunt": "~0.2.2",
30+
"grunt-contrib-copy": "~0.4.1",
31+
"grunt-contrib-concat": "~0.3.0",
32+
"grunt-contrib-cssmin": "~0.6.2",
33+
"grunt-contrib-uglify": "~0.2.0",
34+
"grunt-contrib-jshint": "~0.4.3",
35+
"grunt-contrib-connect": "~0.3.0",
36+
"grunt-contrib-clean": "~0.4.1",
37+
"grunt-contrib-watch": "~0.4.4",
38+
"grunt-parallel": "0.2.0",
39+
"grunt-shell": "0.2.2",
40+
"grunt-recess": "~0.3.3",
41+
"grunt-karma": "~0.5.4",
42+
"karma": "~0.9.8",
43+
"karma-spec-reporter": "0.0.3",
44+
"assemble-less": "~0.5.3",
45+
"matchdep": "~0.1.1",
46+
"bower": "~1.2.7",
47+
"path": "~0.4.9",
48+
"grunt-exec": "~0.4.2"
49+
},
50+
"keywords": [
51+
"richfaces",
52+
"richwidgets",
53+
"widgets",
54+
"jQuery UI"
55+
]
56+
}

0 commit comments

Comments
 (0)