Permalink
Browse files

Upgraded to Grails 2.0.4 and Grails Central

  • Loading branch information...
1 parent a059e41 commit 53a66227971a727a119cb52a3027f80e6a42c87d @4np committed Jun 26, 2012
View
14 .classpath
@@ -0,0 +1,14 @@
+<classpath>
+ <classpathentry kind="src" path="src/java"/>
+ <classpathentry kind="src" path="src/groovy"/>
+ <classpathentry kind="src" path="grails-app/conf"/>
+ <classpathentry kind="src" path="grails-app/controllers"/>
+ <classpathentry kind="src" path="grails-app/domain"/>
+ <classpathentry kind="src" path="grails-app/services"/>
+ <classpathentry kind="src" path="grails-app/taglib"/>
+ <classpathentry kind="src" path="test/integration"/>
+ <classpathentry kind="src" path="test/unit"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="com.springsource.sts.grails.core.CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="web-app/WEB-INF/classes"/>
+</classpath>
View
1 .gitignore
@@ -10,3 +10,4 @@ target
/web-app/WEB-INF/classes
.idea
*.iml
+*.zip
View
19 .project
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>uploadr</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.springsource.sts.grails.core.nature</nature>
+ <nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
View
3 README.md
@@ -403,6 +403,9 @@ Take a look at the documentation above, and the default event handlers in the up
The front-end side (the gui) of the upload plugin is developed as a [jQuery](http://jquery.com/) plugin (javascript: [full](grails-uploadr/blob/master/web-app/js/jquery.uploadr.js), [minified](grails-uploadr/blob/master/web-app/js/jquery.uploadr.minified.js), css: [full](grails-uploadr/blob/master/web-app/css/uploadr.css), [minified](grails-uploadr/blob/master/web-app/css/uploadr.minified.css)) which means you can also use the front-end in _non-Grails_ projects. You will, however, have to create your own back-end logic (take the _handle_ method in the [default controller](grails-uploadr/blob/master/grails-app/controllers/hungry/wombat/UploadController.groovy) as an example) to handle the file uploads. The use of the jQuery plugin is currently undocumented, but the [initialization JavaScript](grails-uploadr/blob/master/grails-app/views/js/_init.gsp) will probably provide you with all the information you require...
## Changelog
+###Version 0.5.11
+Upgraded to Grails 2.0.4 and Grails Central
+
###Version 0.5.7
Added three global parameters (downloadable, deletable, viewable) to define whether the file control buttons are visible (default) or not. Thanks to Michael Aube for the feedback :)
View
79 UploadrGrailsPlugin.groovy
@@ -19,44 +19,59 @@
* $Date$
*/
class UploadrGrailsPlugin {
- def version = "0.5.10"
- def grailsVersion = "1.3.7 > *"
- def dependsOn = [jquery: "1.4 > *", jqueryUi: "1.8 > *", modernizr: "1.7.2 > *", resources: "1.0 > *"]
- def pluginExcludes = [
- "grails-app/views/error.gsp"
- ]
- def author = "Jeroen Wesbeek"
- def authorEmail = "work@osx.eu"
- def title = "A HTML5 drag and drop multi-file upload plugin"
- def documentation = "http://grails.org/plugin/uploadr"
- def description = '''\\
+ def version = "0.5.11"
+ def grailsVersion = "1.3.7 > *"
+ def dependsOn = [jquery: "1.4 > *", jqueryUi: "1.8 > *", modernizr: "1.7.2 > *", resources: "1.0 > *"]
+ def pluginExcludes = [
+ "grails-app/views/error.gsp"
+ ]
+ def author = "Jeroen Wesbeek"
+ def authorEmail = "work@osx.eu"
+ def title = "A HTML5 drag and drop multi-file upload plugin"
+ def description = '''\\
A HTML5 drag and drop multi-file upload plugin
'''
+ def documentation = "https://github.com/4np/grails-uploadr/blob/master/README.md"
+ def license = "APACHE"
+ def issueManagement = [ system: "github", url: "https://github.com/4np/grails-uploadr/issues" ]
+ def scm = [ url: "https://github.com/4np/grails-uploadr" ]
- def doWithWebDescriptor = { xml ->
- // TODO Implement additions to web.xml (optional), this event occurs before
- }
+ // Extra (optional) plugin metadata
- def doWithSpring = {
- // TODO Implement runtime spring config (optional)
- }
+ // Details of company behind the plugin (if there is one)
+// def organization = [ name: "My Company", url: "http://www.my-company.com/" ]
- def doWithDynamicMethods = { ctx ->
- // TODO Implement registering dynamic methods to classes (optional)
- }
+ // Any additional developers beyond the author specified above.
+// def developers = [ [ name: "Joe Bloggs", email: "joe@bloggs.net" ]]
- def doWithApplicationContext = { applicationContext ->
- // TODO Implement post initialization spring config (optional)
- }
+ def doWithWebDescriptor = { xml ->
+ // TODO Implement additions to web.xml (optional), this event occurs before
+ }
- def onChange = { event ->
- // TODO Implement code that is executed when any artefact that this plugin is
- // watching is modified and reloaded. The event contains: event.source,
- // event.application, event.manager, event.ctx, and event.plugin.
- }
+ def doWithSpring = {
+ // TODO Implement runtime spring config (optional)
+ }
- def onConfigChange = { event ->
- // TODO Implement code that is executed when the project configuration changes.
- // The event is the same as for 'onChange'.
- }
+ def doWithDynamicMethods = { ctx ->
+ // TODO Implement registering dynamic methods to classes (optional)
+ }
+
+ def doWithApplicationContext = { applicationContext ->
+ // TODO Implement post initialization spring config (optional)
+ }
+
+ def onChange = { event ->
+ // TODO Implement code that is executed when any artefact that this plugin is
+ // watching is modified and reloaded. The event contains: event.source,
+ // event.application, event.manager, event.ctx, and event.plugin.
+ }
+
+ def onConfigChange = { event ->
+ // TODO Implement code that is executed when the project configuration changes.
+ // The event is the same as for 'onChange'.
+ }
+
+ def onShutdown = { event ->
+ // TODO Implement code that is executed when the application shuts down (optional)
+ }
}
View
11 application.properties
@@ -1,11 +1,4 @@
#Grails Metadata file
-#Mon Dec 12 16:49:15 CET 2011
-app.grails.version=1.3.7
+#Tue Jun 26 17:05:15 CEST 2012
+app.grails.version=2.0.4
app.name=uploadr
-app.version=0.5.10
-#plugins.hibernate=1.3.7
-#plugins.jquery=1.6.1.1
-#plugins.jquery-ui=1.8.15
-#plugins.modernizr=1.7.2
-#plugins.resources=1.0.2
-#plugins.tomcat=1.3.7.2
View
31 dependencies.groovy
@@ -1,31 +0,0 @@
-grails.project.class.dir = "target/classes"
-grails.project.test.class.dir = "target/test-classes"
-grails.project.test.reports.dir = "target/test-reports"
-//grails.project.war.file = "target/${appName}-${appVersion}.war"
-grails.project.dependency.resolution = {
- // inherit Grails' default dependencies
- inherits("global") {
- // uncomment to disable ehcache
- // excludes 'ehcache'
- }
- log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
- repositories {
- grailsPlugins()
- grailsHome()
- grailsCentral()
-
- // uncomment the below to enable remote dependency resolution
- // from public Maven repositories
- //mavenLocal()
- //mavenCentral()
- //mavenRepo "http://snapshots.repository.codehaus.org"
- //mavenRepo "http://repository.codehaus.org"
- //mavenRepo "http://download.java.net/maven/2/"
- //mavenRepo "http://repository.jboss.com/maven2/"
- }
- dependencies {
- // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
-
- // runtime 'mysql:mysql-connector-java:5.1.13'
- }
-}
View
32 grails-app/conf/BuildConfig.groovy
@@ -1,7 +1,9 @@
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
+grails.project.target.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"
+
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
@@ -10,14 +12,13 @@ grails.project.dependency.resolution = {
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
repositories {
- grailsPlugins()
- grailsHome()
grailsCentral()
+ grailsRepo "http://grails.org/plugins"
// uncomment the below to enable remote dependency resolution
// from public Maven repositories
- //mavenLocal()
//mavenCentral()
+ //mavenLocal()
//mavenRepo "http://snapshots.repository.codehaus.org"
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
@@ -26,18 +27,25 @@ grails.project.dependency.resolution = {
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
- // runtime 'mysql:mysql-connector-java:5.1.13'
+ // runtime 'mysql:mysql-connector-java:5.1.5'
}
- // [jquery: "1.4 => *", jqueryUi: "1.8 => *", modernizr: "1.7.2 => *", resources: "1.0 => *"]
plugins {
- build(":tomcat:$grailsVersion",":release:1.0.0") {
- export = false
+ build(":tomcat:$grailsVersion",
+ ":release:latest.integration") {
+ // plugin only plugin, should not be transitive to the application
+ export = false
+ }
+
+ compile(":resources:latest.integration") {
+ export = false
+ }
+
+ runtime(":jquery:latest.integration",
+ ":jquery-ui:latest.integration",
+ ":modernizr:latest.integration") {
+ export = false
}
- compile ":resources:1.0"
- runtime ":jquery:1.7.1",
- ":jquery-ui:1.8.15",
- ":modernizr:1.7.2",
- ":hibernate:$grailsVersion"
+
}
}
View
24 grails-app/conf/Config.groovy
@@ -0,0 +1,24 @@
+// configuration for plugin testing - will not be included in the plugin zip
+
+log4j = {
+ // Example of changing the log pattern for the default console
+ // appender:
+ //
+ //appenders {
+ // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
+ //}
+
+ error 'org.codehaus.groovy.grails.web.servlet', // controllers
+ 'org.codehaus.groovy.grails.web.pages', // GSP
+ 'org.codehaus.groovy.grails.web.sitemesh', // layouts
+ 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
+ 'org.codehaus.groovy.grails.web.mapping', // URL mapping
+ 'org.codehaus.groovy.grails.commons', // core / classloading
+ 'org.codehaus.groovy.grails.plugins', // plugins
+ 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
+ 'org.springframework',
+ 'org.hibernate',
+ 'net.sf.ehcache.hibernate'
+
+ warn 'org.mortbay.log'
+}
View
43 grails-app/conf/DataSource.groovy
@@ -0,0 +1,43 @@
+dataSource {
+ pooled = true
+ driverClassName = "org.h2.Driver"
+ username = "sa"
+ password = ""
+}
+hibernate {
+ cache.use_second_level_cache = true
+ cache.use_query_cache = false
+ cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
+}
+// environment specific settings
+environments {
+ development {
+ dataSource {
+ dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
+ url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000"
+ }
+ }
+ test {
+ dataSource {
+ dbCreate = "update"
+ url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000"
+ }
+ }
+ production {
+ dataSource {
+ dbCreate = "update"
+ url = "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000"
+ pooled = true
+ properties {
+ maxActive = -1
+ minEvictableIdleTimeMillis=1800000
+ timeBetweenEvictionRunsMillis=1800000
+ numTestsPerEvictionRun=3
+ testOnBorrow=true
+ testWhileIdle=true
+ testOnReturn=true
+ validationQuery="SELECT 1"
+ }
+ }
+ }
+}
View
2 grails-app/conf/UrlMappings.groovy
@@ -7,7 +7,7 @@ class UrlMappings {
}
}
- "/"(view: "/index")
+ "/"(view:"/index")
"500"(view:'/error')
}
}
View
11 grails-app/views/error.gsp
@@ -0,0 +1,11 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Grails Runtime Exception</title>
+ <meta name="layout" content="main">
+ <link rel="stylesheet" href="${resource(dir: 'css', file: 'errors.css')}" type="text/css">
+ </head>
+ <body>
+ <g:renderException exception="${exception}" />
+ </body>
+</html>
View
BIN grails-uploadr-0.4.1.zip
Binary file not shown.
View
BIN grails-uploadr-0.4.2.zip
Binary file not shown.
View
BIN grails-uploadr-0.4.3.zip
Binary file not shown.
View
BIN grails-uploadr-0.4.4.zip
Binary file not shown.
View
BIN grails-uploadr-0.4.5.zip
Binary file not shown.
View
BIN grails-uploadr-0.4.6.zip
Binary file not shown.
View
BIN grails-uploadr-0.4.7.zip
Binary file not shown.
View
BIN grails-uploadr-0.4.8.zip
Binary file not shown.
View
BIN grails-uploadr-0.4.9.zip
Binary file not shown.
View
BIN grails-uploadr-0.5.0.zip
Binary file not shown.
View
BIN grails-uploadr-0.5.1.zip
Binary file not shown.
View
BIN grails-uploadr-0.5.10.zip
Binary file not shown.
View
BIN grails-uploadr-0.5.2.zip
Binary file not shown.
View
BIN grails-uploadr-0.5.3.zip
Binary file not shown.
View
BIN grails-uploadr-0.5.4.zip
Binary file not shown.
View
BIN grails-uploadr-0.5.5.zip
Binary file not shown.
View
BIN grails-uploadr-0.5.6.zip
Binary file not shown.
View
BIN grails-uploadr-0.5.7.zip
Binary file not shown.
View
BIN grails-uploadr-0.5.8.zip
Binary file not shown.
View
BIN grails-uploadr-0.5.9.zip
Binary file not shown.
View
23 plugin.xml
@@ -1,23 +0,0 @@
-<plugin name='uploadr' version='0.5.10' grailsVersion='1.3.7 &gt; *'>
- <author>Jeroen Wesbeek</author>
- <authorEmail>work@osx.eu</authorEmail>
- <title>A HTML5 drag and drop multi-file upload plugin</title>
- <description>\
-A HTML5 drag and drop multi-file upload plugin
-</description>
- <documentation>http://grails.org/plugin/uploadr</documentation>
- <resources>
- <resource>BuildConfig</resource>
- <resource>UploadrPluginResources</resource>
- <resource>UrlMappings</resource>
- <resource>hungry.wombat.UploadController</resource>
- <resource>hungry.wombat.UploadrTagLib</resource>
- </resources>
- <dependencies>
- <plugin name='jquery' version='1.4 &gt; *' />
- <plugin name='jqueryUi' version='1.8 &gt; *' />
- <plugin name='modernizr' version='1.7.2 &gt; *' />
- <plugin name='resources' version='1.0 &gt; *' />
- </dependencies>
- <behavior />
-</plugin>
View
41 web-app/WEB-INF/applicationContext.xml
@@ -6,37 +6,28 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
<bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
<description>Grails application factory bean</description>
- <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
- <property name="grailsResourceLoader" ref="grailsResourceLoader" />
+ <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
+ <property name="grailsResourceLoader" ref="grailsResourceLoader" />
</bean>
<bean id="pluginManager" class="org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean">
<description>A bean that manages Grails plugins</description>
- <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
- <property name="application" ref="grailsApplication" />
+ <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
+ <property name="application" ref="grailsApplication" />
</bean>
- <bean id="grailsConfigurator" class="org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator">
- <constructor-arg>
- <ref bean="grailsApplication" />
- </constructor-arg>
- <property name="pluginManager" ref="pluginManager" />
- </bean>
+ <bean id="grailsConfigurator" class="org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator">
+ <constructor-arg>
+ <ref bean="grailsApplication" />
+ </constructor-arg>
+ <property name="pluginManager" ref="pluginManager" />
+ </bean>
- <bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean">
- <property name="grailsResourceHolder" ref="grailsResourceHolder" />
- </bean>
+ <bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean" />
- <bean id="grailsResourceHolder" scope="prototype" class="org.codehaus.groovy.grails.commons.spring.GrailsResourceHolder">
- <property name="resources">
- <value>classpath*:**/grails-app/**/*.groovy</value>
- </property>
- </bean>
-
- <bean id="characterEncodingFilter"
- class="org.springframework.web.filter.CharacterEncodingFilter">
- <property name="encoding">
- <value>utf-8</value>
- </property>
- </bean>
+ <bean id="characterEncodingFilter" class="org.springframework.web.filter.CharacterEncodingFilter">
+ <property name="encoding">
+ <value>utf-8</value>
+ </property>
+ </bean>
</beans>
View
2 web-app/WEB-INF/sitemesh.xml
@@ -5,7 +5,7 @@
<parser content-type="text/html;charset=ISO-8859-1"
class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
<parser content-type="text/html;charset=UTF-8"
- class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
+ class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
</page-parsers>
<decorator-mappers>
View
25 web-app/WEB-INF/tld/c.tld
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+<taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
- version="2.0">
-
- <description>JSTL 1.1 core library</description>
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+ version="2.1">
+
+ <description>JSTL 1.2 core library</description>
<display-name>JSTL core</display-name>
- <tlib-version>1.1</tlib-version>
+ <tlib-version>1.2</tlib-version>
<short-name>c</short-name>
<uri>http://java.sun.com/jsp/jstl/core</uri>
@@ -74,7 +74,7 @@ not the body content should be processed.
<description>
Name of the exported scoped variable for the
resulting value of the test condition. The type
-of the scoped variable is Boolean.
+of the scoped variable is Boolean.
</description>
<name>var</name>
<required>false</required>
@@ -174,6 +174,9 @@ Collection of items to iterate over.
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.Object</type>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
</attribute>
<attribute>
<description>
@@ -253,6 +256,9 @@ String of tokens to iterate over.
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
</attribute>
<attribute>
<description>
@@ -322,7 +328,7 @@ visibility.
<tag>
<description>
Like &lt;%= ... &gt;, but for expressions.
- </description>
+ </description>
<name>out</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
<body-content>JSP</body-content>
@@ -467,6 +473,9 @@ Expression to be evaluated.
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
</attribute>
<attribute>
<description>
View
16 web-app/WEB-INF/tld/fmt.tld
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+<taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
- version="2.0">
-
- <description>JSTL 1.1 i18n-capable formatting library</description>
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+ version="2.1">
+
+ <description>JSTL 1.2 i18n-capable formatting library</description>
<display-name>JSTL fmt</display-name>
- <tlib-version>1.1</tlib-version>
+ <tlib-version>1.2</tlib-version>
<short-name>fmt</short-name>
<uri>http://java.sun.com/jsp/jstl/fmt</uri>
@@ -55,7 +55,7 @@ and may contain a two-letter (upper-case)
country code (as defined by ISO-3166).
Language and country codes must be
separated by hyphen (-) or underscore
-(_).
+(_).
</description>
<name>value</name>
<required>true</required>
@@ -496,7 +496,7 @@ Date and/or time to be formatted.
<description>
Specifies whether the time, the date, or both
the time and date components of the given
-date are to be formatted.
+date are to be formatted.
</description>
<name>type</name>
<required>false</required>

0 comments on commit 53a6622

Please sign in to comment.