[
http://jira.codehaus.org/browse/MSQL-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=212064#action_212064
]
Ludwig Magnusson commented on MSQL-53:
--------------------------------------
Hey!
I actually noticed today that there is another option...
you can specify sourceFiles like this:
<scrFiles>
<srcFile>first</srcFile>
<srcFile>second</srcFile>
<srcFile>third</srcFile>
</srcFiles>
and they are executed in the specified order.
I think the documentation could be better here. When looking att the code and
documentation I saw that the fileset paramerter is of the class FileSet which
is a subclass to directoryScanner. Therefore the fileset takes in parameters
that the directoryscanner does, like baseDir. Bur this is not very well
documented. I think that the fileSet is for specifying files with wildcards
like *-data.sql. I havent checked if this works with srcFiles.
> Execution order of sql files
> ----------------------------
>
> Key: MSQL-53
> URL: http://jira.codehaus.org/browse/MSQL-53
> Project: Maven 2.x SQL Plugin
> Issue Type: New Feature
> Affects Versions: 1.5
> Reporter: Ludwig Magnusson
> Priority: Minor
>
> When specefying sql source files for the sql plugin in the pom like this:
> <configuration>
> <fileset>
> <basedir>${project.basedir}/sql</basedir>
> <includes>
> <include>create-db.sql</include>
> <include>project-structure.sql</include>
> <include>project-data.sql</include>
> </includes>
> </fileset>
> </configuration>
> the files will not be executed in the specified order, but rather in
> alphabetical order. In this case that would mean that the data file is
> executed before the structure file and the insertion will fail.
> A quick fix is to name the files something like
> 1-create-db.sql
> 2-project-structure.sql
> 3-project-data.sql
> But is it possibe/desirable to make it possible to specify the execution
> order in the pom?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email