zion3mx / c5-db-migration

Automatically exported from code.google.com/p/c5-db-migration
0 stars 0 forks source link

Migrations aren't read from jars properly #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add migration scripts to a jar 
2. Try to pull in migration scripts from the classpath
3. No migration scripts will be found because of a bug on 

What is the expected output? What do you see instead?

I should have had migration resources, but all the resources were filtered out.

What version of the product are you using? On what operating system?

0.9.9-m3

Please provide any additional information below.

I attached the fix -- in the case of jar-residing resources,
getFile().isDirectory() raises an exception. Just using
resource.isReadable() is sufficient for this, and works for jar and file
resources.

I added a debug log if this bites anyone else, but feel free to cull that
from the patch.

Original issue reported on code.google.com by matthew.mceachen on 10 Mar 2010 at 11:05

Attachments:

GoogleCodeExporter commented 9 years ago
Just to be clear, we have a maven module that contains the pojos, the DAOs and 
the
dbmigration scripts which are pulled into several webapps that share the same 
domain.

Original comment by matthew.mceachen on 11 Mar 2010 at 5:32

GoogleCodeExporter commented 9 years ago
Applied the patch with minor tweaks... thanks!  Let me know if the next version 
works 
for you as expected.

Original comment by christia...@gmail.com on 18 Mar 2010 at 6:58

GoogleCodeExporter commented 9 years ago
The -m3 build missed your patch -- can you build an -m4?

Original comment by matthew.mceachen on 25 Mar 2010 at 11:57

GoogleCodeExporter commented 9 years ago
Just pushed -m4.  Let me know how it works for you.

Original comment by christia...@gmail.com on 27 Mar 2010 at 5:47

GoogleCodeExporter commented 9 years ago
-m4 works great. Thanks!

Original comment by matthew.mceachen on 6 Apr 2010 at 2:13