Commits

David Carr committed 3af8c03

events: handle war packaging (#1)

fixes issue #1

Comments (0)

Files changed (2)

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")
+        }
+    }
+}

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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.