You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Roland Asmann <Ro...@cfc.at> on 2007/02/26 20:34:19 UTC

Generating APT-files

Hi everybody,

I am building a plug-in that generates some APT-files. The thing is, I want it 
to run when the 'site:site' target is called, but I have no idea on how to 
achieve this.
Can anybody give me some hints as to where to add this plug-in? Or should I 
re-write it as a reporting-plugin? If so, I'm not sure on how to do this and 
if I should stick with the APT-output...

Any help/thoughts?

Thanks.

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: Roland.Asmann@cfc.at
Web: www.cfc.at

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


Re: Making resources defined in a superpom available to underlying poms.

Posted by Rémy Sanlaville <re...@gmail.com>.
No, you just have to declare it in our parent pom.
Just try to see if it works...

Parent
  | --- module1
  | --- module2
  | --- ...
  | --- src
  |       | --- main
  |       |        | --- config
  |       |        |        | --- checkstyle.xml
  | --- pom.xml

Rémy

RE: Making resources defined in a superpom available to underlying poms.

Posted by Jan-Olav Eide <Ja...@fast.no>.
I was hoping I could define the resource only once. If I understand you correctly, the plugin configuration below needs to be present in all poms? 

-----Original Message-----
From: Rémy Sanlaville [mailto:remy.sanlaville@gmail.com] 
Sent: 28. februar 2007 15:04
To: Maven Users List
Subject: Re: Making resources defined in a superpom available to underlying poms.

Hi,

For checkstyle, you can follow this [1]

[1] http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html
(cf. Use a custom developd Checkstyle Check modules)

or

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.1</version>
        <configuration>
          <configLocation>${project.parent.basedir
}/src/main/config/checkstyle.xml</configLocation>
        </configuration>
      </plugin>


The second solution is more generic and not specific for checkstyle.

HTH,

Rémy

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


Re: Making resources defined in a superpom available to underlying poms.

Posted by Rémy Sanlaville <re...@gmail.com>.
Hi,

For checkstyle, you can follow this [1]

[1] http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html
(cf. Use a custom developd Checkstyle Check modules)

or

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.1</version>
        <configuration>
          <configLocation>${project.parent.basedir
}/src/main/config/checkstyle.xml</configLocation>
        </configuration>
      </plugin>


The second solution is more generic and not specific for checkstyle.

HTH,

Rémy

Re: Generating APT-files

Posted by Eric Redmond <er...@gmail.com>.
Just fyi, Doxia has an APT Sink, which takes any Doxia source and outputs
APT... If you want to generate APT code, it's best to write a source that
can output ot APT, XHTML, PDF, or any other modules there.

Eric

On 2/26/07, Roland Asmann <Ro...@cfc.at> wrote:
>
> Thank you very much.. I guess I should've looked before I asked... :-)
> Still I think it would be a good idea to add this kind of info to the
> plugin-sites.
>
>
> On Monday 26 February 2007 21:26, Gregory Kick wrote:
> > The page that I usually go to for lifecycles is:
> >
> > http://docs.codehaus.org/display/MAVENUSER/introduction-to-the-lifecycle
> >
> > It's a bit of a pain to switch back and forth between the maven site
> > and the wiki, but there's some good stuff there.
> >
> > On 2/26/07, Roland Asmann <Ro...@cfc.at> wrote:
> > > Got it running now, thanks!
> > >
> > > One question though, how come I can't find anything about the site's
> > > lifecycle on the maven-pages? Might be a good idea to post the
> > > life-cycles there (like the standard lifecycle for building packages).
> > >
> > > On Monday 26 February 2007 21:10, Wendy Smoak wrote:
> > > > On 2/26/07, Roland Asmann <Ro...@cfc.at> wrote:
> > > > > So, what does goals does the 'mvn site' run compared to 'mvn
> > > > > site:site'?
> > > >
> > > > The site lifecycle is: pre-site, site, post-site, site-deploy
> > > >
> > > > Maven will run any plugin goals bound to those phases, up to and
> > > > including the phase you specify.  So, anything you've bound to the
> > > > phases, plus anything bound by default.  I don't know offhand what
> the
> > > > site plugin does in each phase, I'd have to look.
> > > >
> > > > When you execute 'mvn site:site' you are only running a single goal
> on
> > > > a single plugin.
> > >
> > > --
> > > Roland Asmann
> > >
> > > CFC Informationssysteme Entwicklungsgesellschaft m.b.H
> > > Bäckerstrasse 1/2/7
> > > A-1010 Wien
> > > FN 266155f, Handelsgericht Wien
> > >
> > > Tel.: +43/1/513 88 77 - 27
> > > Fax.: +43/1/513 88 62
> > > Email: Roland.Asmann@cfc.at
> > > Web: www.cfc.at
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
>
> --
> Roland Asmann
>
> CFC Informationssysteme Entwicklungsgesellschaft m.b.H
> Bäckerstrasse 1/2/7
> A-1010 Wien
> FN 266155f, Handelsgericht Wien
>
> Tel.: +43/1/513 88 77 - 27
> Fax.: +43/1/513 88 62
> Email: Roland.Asmann@cfc.at
> Web: www.cfc.at
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Eric Redmond
http://codehaus.org/~eredmond

Making resources defined in a superpom available to underlying poms.

Posted by Jan-Olav Eide <Ja...@fast.no>.
I have a pom with packaging jar that contains a number of modules
(possibly nested). I have some resources that I want to be available to
all underlying poms . In my case it is a reference to a checkstyle
configuration file, but it could be anything (such as the stylesheet
used for javadoc generation). I have defined a property with the
_absolute_ path to this file in the top level pom, but is that the best
way to do it? I'd rather use a relative path (relative to the top
level), is that possible? 

--
jo

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


Re: Generating APT-files

Posted by Roland Asmann <Ro...@cfc.at>.
Thank you very much.. I guess I should've looked before I asked... :-)
Still I think it would be a good idea to add this kind of info to the 
plugin-sites.


On Monday 26 February 2007 21:26, Gregory Kick wrote:
> The page that I usually go to for lifecycles is:
>
> http://docs.codehaus.org/display/MAVENUSER/introduction-to-the-lifecycle
>
> It's a bit of a pain to switch back and forth between the maven site
> and the wiki, but there's some good stuff there.
>
> On 2/26/07, Roland Asmann <Ro...@cfc.at> wrote:
> > Got it running now, thanks!
> >
> > One question though, how come I can't find anything about the site's
> > lifecycle on the maven-pages? Might be a good idea to post the
> > life-cycles there (like the standard lifecycle for building packages).
> >
> > On Monday 26 February 2007 21:10, Wendy Smoak wrote:
> > > On 2/26/07, Roland Asmann <Ro...@cfc.at> wrote:
> > > > So, what does goals does the 'mvn site' run compared to 'mvn
> > > > site:site'?
> > >
> > > The site lifecycle is: pre-site, site, post-site, site-deploy
> > >
> > > Maven will run any plugin goals bound to those phases, up to and
> > > including the phase you specify.  So, anything you've bound to the
> > > phases, plus anything bound by default.  I don't know offhand what the
> > > site plugin does in each phase, I'd have to look.
> > >
> > > When you execute 'mvn site:site' you are only running a single goal on
> > > a single plugin.
> >
> > --
> > Roland Asmann
> >
> > CFC Informationssysteme Entwicklungsgesellschaft m.b.H
> > Bäckerstrasse 1/2/7
> > A-1010 Wien
> > FN 266155f, Handelsgericht Wien
> >
> > Tel.: +43/1/513 88 77 - 27
> > Fax.: +43/1/513 88 62
> > Email: Roland.Asmann@cfc.at
> > Web: www.cfc.at
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: Roland.Asmann@cfc.at
Web: www.cfc.at

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


Re: Generating APT-files

Posted by Gregory Kick <gk...@gmail.com>.
The page that I usually go to for lifecycles is:

http://docs.codehaus.org/display/MAVENUSER/introduction-to-the-lifecycle

It's a bit of a pain to switch back and forth between the maven site
and the wiki, but there's some good stuff there.

On 2/26/07, Roland Asmann <Ro...@cfc.at> wrote:
> Got it running now, thanks!
>
> One question though, how come I can't find anything about the site's lifecycle
> on the maven-pages? Might be a good idea to post the life-cycles there (like
> the standard lifecycle for building packages).
>
>
> On Monday 26 February 2007 21:10, Wendy Smoak wrote:
> > On 2/26/07, Roland Asmann <Ro...@cfc.at> wrote:
> > > So, what does goals does the 'mvn site' run compared to 'mvn site:site'?
> >
> > The site lifecycle is: pre-site, site, post-site, site-deploy
> >
> > Maven will run any plugin goals bound to those phases, up to and
> > including the phase you specify.  So, anything you've bound to the
> > phases, plus anything bound by default.  I don't know offhand what the
> > site plugin does in each phase, I'd have to look.
> >
> > When you execute 'mvn site:site' you are only running a single goal on
> > a single plugin.
>
> --
> Roland Asmann
>
> CFC Informationssysteme Entwicklungsgesellschaft m.b.H
> Bäckerstrasse 1/2/7
> A-1010 Wien
> FN 266155f, Handelsgericht Wien
>
> Tel.: +43/1/513 88 77 - 27
> Fax.: +43/1/513 88 62
> Email: Roland.Asmann@cfc.at
> Web: www.cfc.at
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Gregory Kick
gk5885@gmail.com

Re: Generating APT-files

Posted by Roland Asmann <Ro...@cfc.at>.
Got it running now, thanks!

One question though, how come I can't find anything about the site's lifecycle 
on the maven-pages? Might be a good idea to post the life-cycles there (like 
the standard lifecycle for building packages).


On Monday 26 February 2007 21:10, Wendy Smoak wrote:
> On 2/26/07, Roland Asmann <Ro...@cfc.at> wrote:
> > So, what does goals does the 'mvn site' run compared to 'mvn site:site'?
>
> The site lifecycle is: pre-site, site, post-site, site-deploy
>
> Maven will run any plugin goals bound to those phases, up to and
> including the phase you specify.  So, anything you've bound to the
> phases, plus anything bound by default.  I don't know offhand what the
> site plugin does in each phase, I'd have to look.
>
> When you execute 'mvn site:site' you are only running a single goal on
> a single plugin.

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: Roland.Asmann@cfc.at
Web: www.cfc.at

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


Re: Generating APT-files

Posted by Wendy Smoak <ws...@gmail.com>.
On 2/26/07, Roland Asmann <Ro...@cfc.at> wrote:

> So, what does goals does the 'mvn site' run compared to 'mvn site:site'?

The site lifecycle is: pre-site, site, post-site, site-deploy

Maven will run any plugin goals bound to those phases, up to and
including the phase you specify.  So, anything you've bound to the
phases, plus anything bound by default.  I don't know offhand what the
site plugin does in each phase, I'd have to look.

When you execute 'mvn site:site' you are only running a single goal on
a single plugin.

-- 
Wendy

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


Re: Generating APT-files

Posted by Roland Asmann <Ro...@cfc.at>.
So, what does goals does the 'mvn site' run compared to 'mvn site:site'?


On Monday 26 February 2007 20:47, Wendy Smoak wrote:
> On 2/26/07, Roland Asmann <Ro...@cfc.at> wrote:
> > Hi everybody,
> >
> > I am building a plug-in that generates some APT-files. The thing is, I
> > want it to run when the 'site:site' target is called, but I have no idea
> > on how to achieve this.
> > Can anybody give me some hints as to where to add this plug-in? Or should
> > I re-write it as a reporting-plugin? If so, I'm not sure on how to do
> > this and if I should stick with the APT-output...
> >
> > Any help/thoughts?
>
> Try binding your plugin to the pre-site phase.  Then run 'mvn site'
> [1] and you should see your plugin run, along with the site plugin
> doing its work.
>
> [1] not 'mvn site:site' which only runs a single plugin goal. Very
> confusing since the plugin, goal, and lifecycle phase all have the
> same name!

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: Roland.Asmann@cfc.at
Web: www.cfc.at

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


Re: Generating APT-files

Posted by Wendy Smoak <ws...@gmail.com>.
On 2/26/07, Roland Asmann <Ro...@cfc.at> wrote:
> Hi everybody,
>
> I am building a plug-in that generates some APT-files. The thing is, I want it
> to run when the 'site:site' target is called, but I have no idea on how to
> achieve this.
> Can anybody give me some hints as to where to add this plug-in? Or should I
> re-write it as a reporting-plugin? If so, I'm not sure on how to do this and
> if I should stick with the APT-output...
>
> Any help/thoughts?

Try binding your plugin to the pre-site phase.  Then run 'mvn site'
[1] and you should see your plugin run, along with the site plugin
doing its work.

[1] not 'mvn site:site' which only runs a single plugin goal. Very
confusing since the plugin, goal, and lifecycle phase all have the
same name!

-- 
Wendy

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