Convention is a namespaced skip... And maven us convention over
configuration

On Monday, 4 June 2012, Dan Tran wrote:

> Yes ${hibernate.skip} is %100 sure, but user can always tune their pom
> use that model.
>
>  <properties>
>   <hibernate.skip>false</hibernate.skip>
>  </properties>
>
>   <build>
>      [.....]
>
>      <skip>${hibernate.skip}</skip>
>      [...]
>   </build>
>
>
> What other mojo devs think?
>
> -D
>
>
>
> On Sun, Jun 3, 2012 at 12:45 PM, Robert Scholte 
> <[email protected]<javascript:;>>
> wrote:
> > Don't you think it should be ${hibernate3.skip} to be 100% sure you will
> be
> > skipping the hibernate plugin?
> >
> > -Robert
> > ________________________________
> > From: [email protected] <javascript:;>
> > To: [email protected] <javascript:;>
> > Date: Sun, 3 Jun 2012 14:20:17 -0500
> > Subject: [mojo-scm] [16791] trunk/mojo/hibernate3-maven-plugin:
> > [MHIBERNATE-126] add skip configuration
> >
> >
> > Revision 16791 Author dantran Date 2012-06-03 14:20:16 -0500 (Sun, 03 Jun
> > 2012)
> >
> > Log Message
> >
> > [MHIBERNATE-126] add skip configuration
> >
> > Modified Paths
> >
> > trunk/mojo/hibernate3-maven-plugin/pom.xml
> >
> trunk/mojo/hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/AbstractHibernateMojo.java
> >
> > Diff
> >
> > Modified: trunk/mojo/hibernate3-maven-plugin/pom.xml (16790 => 16791)
> >
> > --- trunk/mojo/hibernate3-maven-plugin/pom.xml        2012-06-03
> 15:29:25 UTC (rev
> > 16790)
> > +++ trunk/mojo/hibernate3-maven-plugin/pom.xml        2012-06-03
> 19:20:16 UTC (rev
> > 16791)
> > @@ -17,7 +17,7 @@
> >    <parent>
> >      <groupId>org.codehaus.mojo</groupId>
> >      <artifactId>mojo-parent</artifactId>
> > -    <version>29</version>
> > +    <version>30</version>
> >    </parent>
> >
> >    <groupId>org.codehaus.mojo</groupId>
> >
> > Modified:
> >
> trunk/mojo/hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/AbstractHibernateMojo.java
> > (16790 => 16791)
> >
> > ---
> >
> trunk/mojo/hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/AbstractHibernateMojo.java
>      2012-06-03
> > 15:29:25 UTC (rev 16790)
> > +++
> >
> trunk/mojo/hibernate3-maven-plugin/src/main/java/org/codehaus/mojo/hibernate3/AbstractHibernateMojo.java
>      2012-06-03
> > 19:20:16 UTC (rev 16791)
> > @@ -60,6 +60,13 @@
> >       * @readonly
> >       */
> >      protected ArtifactRepository localRepository;
> > +
> > +    /**
> > +     * Skip this execution
> > +     *
> > +     * @parameter expression="${skip}" default-value="false"
> > +     */
> > +    protected boolean skip;
> >
> >  // ------------------------ INTERFACE METHODS ------------------------
> >
> > @@ -68,6 +75,12 @@
> >      public void execute()
> >          throws MojoExecutionException, MojoFailureException
> >      {
> > +
> > +        if ( skip ) {
> > +            this.getLog().info( "Skipping hibernate execution." );
> > +            return;
> > +        }
> > +
> >          try
> >          {
> >              AntRunMojo antRunMojo = new AntRunMojo();
> >
> > ________________________________
> > To unsubscribe from this list please visit:
> > http://xircles.codehaus.org/manage_email
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to