kaino / dbdeploy

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

dbdeploy:change-script does not work with default scriptdirectory #76

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create new maven project 
  "mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart"
2. Add dbdeploy to pom.xml
  <build>
    <plugins>
      <plugin>
        <groupId>com.dbdeploy</groupId>
        <artifactId>maven-dbdeploy-plugin</artifactId>
        <version>3.0M3</version>
      </plugin>
    </plugins>
  </build>

3. Create default SQL directory
  $ mkdir src/main/sql

4. Execute change-script goal
  $ mvn dbdeploy:change-script

What is the expected output? What do you see instead?
== expected ==
[INFO] [dbdeploy:change-script {execution: default-cli}]
[INFO] Created new change script:

== actual ==
[INFO] [dbdeploy:change-script {execution: default-cli}]
[ERROR]
com.dbdeploy.exceptions.UsageException: Script directory must point to a valid 
directory

What version of the product are you using? On what operating system?
dbdeploy 3.0M3 maven 2.2.1 or 3.0.4

Please provide any additional information below.

Original issue reported on code.google.com by dnew...@unixmonkeys.com on 28 Nov 2012 at 7:15

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The default for this parameter is apparently set in the file 
maven-dbdeploy-plugin/src/main/java/com/dbdeploy/mojo/CreateChangeScriptMojo.jav
a

and is set via
default-value="${project.src.directory}/main/sql

I don't seem to have the property ${project.src.directory} is either maven 2.2 
or 3.0.  However, both version seem to have the property ${project.basedir}  I 
am attaching a patch.

Original comment by dnew...@unixmonkeys.com on 28 Nov 2012 at 8:12

Attachments: