Espigah / dbdeploy

Automatically exported from code.google.com/p/dbdeploy
0 stars 0 forks source link

change_number is now maven artifact name #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate a delta sql.
2.
3.

What is the expected output? What do you see instead?
The value of the change number in the generated SQL should be the sequence
number from the start of the sql file name. Instead, it is the name of the
maven artifact.

INSERT INTO changelog (change_number, complete_dt, applied_by, description)
 VALUES (com.dbdeploy:dbdeploy-core:jar:3.0-SNAPSHOT, getdate(),
user_name(), '0006_create_table_margin_call.sql')

What version of the product are you using? On what operating system?
Trunk as of revision 126.

Please provide any additional information below.
Unit tests in trunk are failing. ScriptGenerationTest.

Original issue reported on code.google.com by kevin.st...@gmail.com on 12 Oct 2009 at 9:46

GoogleCodeExporter commented 9 years ago
Hi Kevin,

I don't have that problem on my machine.  (I always run 
http://code.google.com/p/dbdeploy/source/browse/trunk/validate_distribution_exam
ples.
sh before commit, which runs all the tests and checks the example ant file in 
the 
produced zip file works ok.)

What operating system are you using?  What maven version?  What java version?

(I use 64 bit fedora 11; maven 2.2.1; and sun java 1.6_something.)

I suspect the problem comes down to you using an older version of maven, and 
the 
resources plugin is incorrectly subtituting ${script.id} in the .ftl.  

I've been bad and not locked down the versions of plugins used - if you confirm 
what 
version of maven you're using I'll ensure the right plugin is locked down.

Thanks

Original comment by gtack...@googlemail.com on 13 Oct 2009 at 9:08

GoogleCodeExporter commented 9 years ago
Actually, thinking about it a bit more, it's very silly that I've enabled 
resource  
filtering on src/main/resources - this was only to get the pom version into 
welcome.txt so it can be displayed on startup.

Should just use getClass().getPackage().getImplementationVersion() instead.

Original comment by gtack...@googlemail.com on 13 Oct 2009 at 9:15

GoogleCodeExporter commented 9 years ago
Hi Graham,

Thanks for the pointer. It looks to be a Maven issue. I'm using Maven 2.2.1 at 
home
and it builds fine. At work I'm using 2.0.9, so I downloaded it at home to give 
it a try.

With 2.0.9, the build has test failures and the generated delta script has the 
same
problem reported in this issue. With Maven 2.0.10 and 2.2.1 (the only other two 
I
have tried) it works fine. 

Thanks for looking into it.

Original comment by kevin.st...@gmail.com on 13 Oct 2009 at 9:34

GoogleCodeExporter commented 9 years ago
Fixed in r127

Original comment by gtack...@googlemail.com on 18 Oct 2009 at 6:58