You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by e9...@seznam.cz on 2012/07/25 14:52:39 UTC

How write maven plugin to read *.java (all sources) and generate some output?

Hello,
I am completely new in writing own maven plugins.. as I have read this tutorial: http://books.sonatype.com/books/mvnref-book/reference/writing-plugins.html

there is only simple example. But now any further information how to develop more complex plugin. 

All I want is create some maven plugin , that could be added to the parrent pom that will read all source class, and than I will generate some output into each project subfolder, where the sources are located.

eg.When the maven will build some product, I would like to create new file count.txt in every plugin folder, where will be couple rows:

class1 - 223 lines
class2 - 10 lines ....

and at the end my maven plugin will create one final file, where will be sum of this small sub count files.txt

any good advices?

thanks

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


Re: How write maven plugin to read *.java (all sources) and generate some output?

Posted by Ron Wheeler <rw...@artifact-software.com>.
Read the code in a few actual plug-ins.
Look for ones that are similar to your plan in terms of file reading and 
writing.

Ron

On 25/07/2012 8:52 AM, e92-330cd@seznam.cz wrote:
> Hello,
> I am completely new in writing own maven plugins.. as I have read this tutorial: http://books.sonatype.com/books/mvnref-book/reference/writing-plugins.html
>
> there is only simple example. But now any further information how to develop more complex plugin.
>
> All I want is create some maven plugin , that could be added to the parrent pom that will read all source class, and than I will generate some output into each project subfolder, where the sources are located.
>
> eg.When the maven will build some product, I would like to create new file count.txt in every plugin folder, where will be couple rows:
>
> class1 - 223 lines
> class2 - 10 lines ....
>
> and at the end my maven plugin will create one final file, where will be sum of this small sub count files.txt
>
> any good advices?
>
> thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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