Hi,

I guess you could patch the sql-plugin, but maybe you should use the
maven-dependency-plugin[1] to unpack your new module for the tests. Then
the sql-plugin can just read the unpacked file and you don't need to patch
anything.

[1] http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html

Roland


> Hi
>
> I'm facing a problem sharing files between modules. We have a multi
> module build where several of the modules have database tests that use
> the sql-maven-plugin to set up a test database.
>
> These modules needs to share two files: a DDL file that creates the
> tables and an SQL file that populates the tables. We don't want to have
> multiple copies of these files in different modules, for obvious reasons.
>
> After browsing the web for examples of sharing resources between
> modules, I tried one where you put the files to be shared in a new
> module. They go into the directory src/main/resources. Then each module
> that needs the files just adds a dependency on the new module.
>
> The problem with that approach is that the files are then class path
> resources, which the sql-maven-plugin is not able to see. It seems to
> only be able use files within the current module.
>
> Is there another way we can do this?
>
> Would it be possible to patch the sql-maven-plugin to be able to read
> class path resources as files? Are there any examples of other plugins
> that do this?
>
> --
> Dennis Lundberg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to