You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by fogwolf <ta...@hotmail.com> on 2006/09/01 16:10:21 UTC

maven 2 plugin dev question

Hi there.

I am converting my Maven 1 environment to Maven 2 & am running into an issue
with a plugin I'm trying to update. This plugin basically filters some
template files, replacing placeholder values, & places them within
directories under the project on which the plugin is being run. In Maven 1
these templates in jelly format & were bundled with the plugin. I'm finding
in Maven 2 you can't seem to be able to bundle templates like this with the
plugin - is this true? I feel like this makes the plugin less portable. How
should I go about this in Maven 2? If these templates indeed can't be
bundled with the plugin in Maven 2, would it be best to keep them in our
repository? How do you access the repository programmatically - does Maven
provide you with an API for this, since I know it does it behind the scenes
quite often. Would it make more sense to keep them in CVS? If so, what would
be the best way to access CVS from my Maven plugin - to use the Ant CVS task
to check the files out to a temp directory, do the variable replacement &
copy them over?

Thanks!
-- 
View this message in context: http://www.nabble.com/maven-2-plugin-dev-question-tf2202791.html#a6099344
Sent from the Maven Developers forum at Nabble.com.


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


Re: maven 2 plugin dev question

Posted by fogwolf <ta...@hotmail.com>.
What if my plugin is written in Ant & not Java? Also, when I run the maven
install command to build & install my plugin, it isn't adding my resources
directory to the jar file. How do I get it to do this?

Thanks!!


Arnaud Bailly-3 wrote:
> 
> fogwolf <ta...@hotmail.com> writes:
> 
>> Hi there.
>>
>> I am converting my Maven 1 environment to Maven 2 & am running into an
>> issue
>> with a plugin I'm trying to update. This plugin basically filters some
>> template files, replacing placeholder values, & places them within
>> directories under the project on which the plugin is being run. In Maven
>> 1
>> these templates in jelly format & were bundled with the plugin. I'm
>> finding
>> in Maven 2 you can't seem to be able to bundle templates like this with
>> the
>> plugin - is this true? I feel like this makes the plugin less
> 
> I think this is false if you access the templates from the classpath
> (ie. getClass().getResourceAsStream("xxx/yyy/zzz")). Then you can
> bundle your templates (or any other resource files) within your
> plugin's jar. Alternatively, you could bundle templates as separate
> jar and make your plugin depend on it.
> 
> regards
> -- 
> OQube < software engineering \ génie logiciel >
> Arnaud Bailly, Dr.
> \web> http://www.oqube.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/maven-2-plugin-dev-question-tf2202791.html#a6152725
Sent from the Maven Developers forum at Nabble.com.


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


Re: maven 2 plugin dev question

Posted by Arnaud Bailly <ab...@oqube.com>.
fogwolf <ta...@hotmail.com> writes:

> Hi there.
>
> I am converting my Maven 1 environment to Maven 2 & am running into an issue
> with a plugin I'm trying to update. This plugin basically filters some
> template files, replacing placeholder values, & places them within
> directories under the project on which the plugin is being run. In Maven 1
> these templates in jelly format & were bundled with the plugin. I'm finding
> in Maven 2 you can't seem to be able to bundle templates like this with the
> plugin - is this true? I feel like this makes the plugin less

I think this is false if you access the templates from the classpath
(ie. getClass().getResourceAsStream("xxx/yyy/zzz")). Then you can
bundle your templates (or any other resource files) within your
plugin's jar. Alternatively, you could bundle templates as separate
jar and make your plugin depend on it.

regards
-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


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