Commits

David Carr  committed 3af8c03

events: handle war packaging (#1)

fixes issue #1

  • Participants
  • Parent commits 6ba64ed

Comments (0)

Files changed (2)

File scripts/_Events.groovy

  * limitations under the License.
  */
 
+// Make the migrations available on the classpath when using run-app
 eventPackagingEnd = {
     def srcPath = config.grails?.mongeez?.changelogLocation ?: 'grails-app/migrations'
     def src = new File(buildSettings.baseDir, srcPath)
         }
     }
 }
+
+// Make the migrations available on the classpath when packaged as a WAR
+eventCreateWarStart = { name, stagingDir ->
+    def srcPath = config.grails?.mongeez?.changelogLocation ?: 'grails-app/migrations'
+    def src = new File(buildSettings.baseDir, srcPath)
+    def target = new File(stagingDir, 'WEB-INF/classes/migrations')
+    if (src.exists()) {
+        ant.sync(toDir: target, overwrite: true) {
+            fileset(dir: src, includes: "**/*.xml,**/*.js")
+        }
+    }
+}

File src/docs/guide/releaseNotes.gdoc

 
 h4. 0.2.0 (TBD)
 * First public release
+* Fixed: WAR doesn't include migrations ( "#1":https://bitbucket.org/davidmc24/grails-mongeez/issue/1/ )
 * Fixed: MongeezController doesn't work with mongodb plugin ( "#2":https://bitbucket.org/davidmc24/grails-mongeez/issue/2/ )
 
 h4. 0.1.2 (September 12, 2012)