开发者

Maven: Any way to edit resource files?

I have a mavenized sql project, which has a few SQL scripts. These scripts are basically Oracle statements of the form

insert xyz into some_table;
show errors

These files are to be copied to a deploy project, but for the statements to work, some modifications have to be made.

For the moment, we are editing files manually (with the help of Notepad++) so that they turn 开发者_如何学Pythonout like this

insert xyz into some_table\

Is there any way to do this with maven ?Im not sure this is exactly resource filtering, and i'm pretty sure that this is not the purpose of Maven. I've been looking at the maven assembly plugin for the moment, but no luck.

Any thoughts will be appreciated.

Thanks in advance


If it's a fairly simple text replacement, then you can use maven-replacer-plugin:

http://code.google.com/p/maven-replacer-plugin/

If all else fails, you can also use maven-antrun-plugin to do anything that ant can do. Here is a prior question that discusses this:

Full search and replace of strings in source files when copying resources

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜