You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stefan Hübner <st...@googlemail.com> on 2010/03/29 13:53:00 UTC

possible to ship an Ant based plugin with resources?

Hi,

I'm developing some custom maven plugin and am wondering if it's
possible to have an Ant based maven plugin shipping some necessary
resources?

I'm writing a plugin that does some DB manipulations and some of the
SQL scripts could already be shipped with the plugin. I've already
figured that files in src/main/resources are included in the plugin
JAR. But I don't know how to point my Ant scripts to those
SQL-scripts.

Regards,
Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: possible to ship an Ant based plugin with resources?

Posted by Wayne Fay <wa...@gmail.com>.
> When the plugin gets executed on the target project, I get "Source
> file or resource collection, transactions or sql statement must be
> set!"

If this was a Java plugin, I'd tell you to use the getResourceAsStream
approach. Does Ant have anything similar?

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: possible to ship an Ant based plugin with resources?

Posted by Stefan Hübner <st...@googlemail.com>.
> If i understand the things correct you have to locate the scripts into the
> default location of the plugin (src/main/sripts)...?

Say, I have a SQL script that I want to execute from my Ant based mojo
using sql ant task. I put that script in the plugin's
src/main/scripts. My problem is how to point the SQL task to that
script:

<target...>
	<sql driver="${db.driver}" url="${db.url}"
	     userid="${db.user}" password="${db.pwd}"
	     rdbms="mysql">
	    <fileset file="createVersionTable.sql" />
	</sql>
</target>

When the plugin gets executed on the target project, I get "Source
file or resource collection, transactions or sql statement must be
set!"

Any ideas?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: possible to ship an Ant based plugin with resources?

Posted by Karl Heinz Marbaise <ka...@soebes.de>.
Hi,
Ah...now i got the point thanks...

If i understand the things correct you have to locate the scripts into the
default location of the plugin (src/main/sripts)...?

Kind regards
Karl Heinz Marbaise
-- 
View this message in context: http://old.nabble.com/possible-to-ship-an-Ant-based-plugin-with-resources--tp28068223p28068935.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: possible to ship an Ant based plugin with resources?

Posted by Stefan Hübner <st...@googlemail.com>.
I'm writing a plugin for maven that is implemented in Ant. see
http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: possible to ship an Ant based plugin with resources?

Posted by Karl Heinz Marbaise <ka...@soebes.de>.
Hi,

may be i misunderstand things but why are you trying to ship a maven plugin
via Ant ? Or didn't i get the poing ? 
Kind regards
Karl Heinz Marbaise
-- 
View this message in context: http://old.nabble.com/possible-to-ship-an-Ant-based-plugin-with-resources--tp28068223p28068707.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org