On Wed, 6 Jul 2005, Edwin Punzalan wrote:

How did you invoke the plugin?

Using m2 sablecc-plugin:sablecc ?

You seem to have specified the plugin in the project pom that uses it;
if you want it to run automatically you have to add a
<phase>generate-sources</phase> tag near the executions element, and
specify the goal in <execution><goals>sablecc</goals</execution>.

Maybe you can post the pom + how you invoke m2?

>
> Wilfred Springer wrote:
>
> >Hi,
> >
> >I'm trying to get my own plugin running (m2), but it is never invoked.
> >If I try to use it in a project, then Maven seems to be aware of it, but
> >never invokes the execute() operation on my Mojo to make it actually
> >happen.
> >
> >The only message related to my plugin I'm getting is this one:
> >
> >[INFO] sablecc-plugin: using locally installed snapshot
> >
> >Any clues?
> >
> >Wilfred
> >
> >====================== Mojo Source Code =========================
> >
> >/**
> > * A Maven2 Mojo for generating Java sources from SableCC grammar files.
> > *
> > * @author Wilfred Springer
> > * @version $Revision$
> > * @goal sablecc
> > * @phase generate-sources
> > */
> >public class SableCCMojo extends AbstractMojo {
> >
> >  /**
> >   * The directory containing the source grammar files.
> >   * @parameter
> >   */
> >  private String sourceDir;
> >
> >  /**
> >   * The target directory.
> >   *
> >   * @parameter
> >   */
> >  private String targetDir;
> >
> >
> >===================== Plugin POM ================================
> >
> ><project>
> >  <modelVersion>4.0.0</modelVersion>
> >  <groupId>sablecc-plugin</groupId>
> >  <packaging>maven-plugin</packaging>
> >  <version>1.0-SNAPSHOT</version>
> >  <artifactId>sablecc-plugin</artifactId>
> >  <dependencies>
> >    <dependency>
> >      <groupId>org.apache.maven</groupId>
> >      <artifactId>maven-plugin-api</artifactId>
> >      <version>2.0-alpha-3</version>
> >    </dependency>
> >    <dependency>
> >      <groupId>sablecc</groupId>
> >      <artifactId>sablecc</artifactId>
> >      <version>2.18.2</version>
> >    </dependency>
> >    <dependency>
> >      <groupId>commons-io</groupId>
> >      <artifactId>commons-io</artifactId>
> >      <version>1.0</version>
> >    </dependency>
> >  </dependencies>
> >  <build>
> >    <sourceDirectory>src/java</sourceDirectory>
> >  </build>
> ></project>
> >
> >================ Plugin Invocation ===============================
> >
> >[INFO] jcalc: using locally installed snapshot
> >[INFO]
> >----------------------------------------------------------------------------
> >[INFO] Building jcalc:jcalc-parser:jar:1.0-SNAPSHOT
> >[INFO]
> >----------------------------------------------------------------------------
> >[INFO] maven-clean-plugin: resolved to version 2.0-alpha-3 from local
> >repository
> >[INFO] [clean:clean]
> >[INFO] Deleting directory
> >/home/wilfred/workspace/jcalc/jcalc-parser/target
> >[INFO]
> >----------------------------------------------------------------------------
> >[INFO] BUILD SUCCESSFUL
> >[INFO]
> >----------------------------------------------------------------------------
> >[INFO] Total time: 1 second
> >[INFO] Finished at: Wed Jul 06 10:28:54 CEST 2005
> >[INFO] Final Memory: 1M/2M
> >[INFO]
> >----------------------------------------------------------------------------
> >[EMAIL PROTECTED] jcalc-parser]$ m2 install
> >[INFO] jcalc: using locally installed snapshot
> >[INFO]
> >----------------------------------------------------------------------------
> >[INFO] Building jcalc:jcalc-parser:jar:1.0-SNAPSHOT
> >[INFO]
> >----------------------------------------------------------------------------
> >[INFO] maven-resources-plugin: resolved to version 2.0-alpha-3 from
> >local repository
> >[INFO] maven-compiler-plugin: resolved to version 2.0-alpha-3 from local
> >repository
> >[INFO] maven-surefire-plugin: resolved to version 2.0-alpha-3 from local
> >repository
> >[INFO] maven-jar-plugin: resolved to version 2.0-alpha-3 from local
> >repository
> >[INFO] maven-source-plugin: resolved to version 2.0-alpha-2 from local
> >repository
> >[INFO] maven-install-plugin: resolved to version 2.0-alpha-3 from local
> >repository
> >[INFO] sablecc-plugin: using locally installed snapshot
> >[INFO] [resources:resources]
> >[INFO] [compiler:compile]
> >[INFO] Nothing to compile - all classes are up to date
> >[INFO] [resources:testResources]
> >[INFO] [compiler:testCompile]
> >[INFO] No sources to compile
> >[INFO] [surefire:test]
> >[INFO] Setting reports dir:
> >/home/wilfred/workspace/jcalc/jcalc-parser/target/surefire-reports
> >
> >-------------------------------------------------------
> > T E S T S
> >-------------------------------------------------------
> >There are no test to run.
> >
> >Results :
> >[surefire] Tests run: 0, Failures: 0, Errors: 0
> >
> >[INFO] [jar:jar]
> >[WARNING] JAR will be empty - no content was marked for inclusion!
> >[INFO] Building jar:
> >/home/wilfred/workspace/jcalc/jcalc-parser/target/jcalc-parser-1.0-SNAPSHOT.jar
> >[INFO] [source:jar]
> >[INFO] Not producing source bundle for a SNAPSHOT build
> >[INFO] [install:install]
> >[INFO] Installing
> >/home/wilfred/workspace/jcalc/jcalc-parser/target/jcalc-parser-1.0-SNAPSHOT.jar
> > to 
> >/home/wilfred/.m2/repository/jcalc/jcalc-parser/1.0-SNAPSHOT/jcalc-parser-1.0-SNAPSHOT.jar
> >[INFO]
> >----------------------------------------------------------------------------
> >[INFO] BUILD SUCCESSFUL
> >[INFO]
> >----------------------------------------------------------------------------
> >[INFO] Total time: 5 seconds
> >[INFO] Finished at: Wed Jul 06 10:29:08 CEST 2005
> >[INFO] Final Memory: 2M/5M
> >[INFO]
> >----------------------------------------------------------------------------
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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

Reply via email to