You can build a plugin to bind to any lifecycle phase of the build
process - or you can use the "AntRun" plugin to bind in a specific ant
task (or set of tasks) pretty quickly. Not sure what events you want to
trigger it, but if just want messages coming out at specific points of
the build life cycle, then using the Antrun plugin is probably the
fastest option.

Something like:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-antrun-plugin</artifactId>
  <executions>
    <execution>
      <id>foo</id> <!-- make this unique among all antrun plugin
bindings in this pom -->
      <phase>initialize</phase>
      <configuration>
        <tasks>
          <echo>Sending a message!!!</echo>
          <!-- <echo>${project.basedir}</echo> -->
          <echo>Running on ${os.name}</echo>
        </tasks>
      </configuration>
      <goals>
        <goal>run</goal>
      </goals>
    </execution>
  </executions>
</plugin>

-joe

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Erez Nahir
Sent: Wednesday, May 16, 2007 2:12 PM
To: Maven Users List
Subject: Maven build listener?

Hi,

I would like to add to the build summary additional information, it 
doesn't have to be embedded in the final message, can be just on top of
it.
I was thinking to use some kind of listener that will print my message 
to the screen, something like:

[INFO] 
------------------------------------------------------------------------
[INFO] My message goes here....
[INFO] 
------------------------------------------------------------------------
[INFO] 
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed May 16 17:08:43 EDT 2007
[INFO] Final Memory: 1M/3M
[INFO] 
------------------------------------------------------------------------

Is there a way to add some kind of maven listener to the build?

Thanks,
Erez.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to