You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2007/04/25 16:21:47 UTC

GPG plugin just for deploy?

The direction for using the GPG plugin are:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>


However, this is going to run the GPG plugin every time I run install (I
tested).

That's a problem for me, and a problem for my continuous integration server.

I don't want to store a public key passphrase in my settings.xml.

How can I ensure that the GPG plugin is only used when I'm using the deploy
goal?

And is there a hook for signing assemblies as well as aritfacts?

Thanks!


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Re: GPG plugin just for deploy?

Posted by Howard Lewis Ship <hl...@gmail.com>.
My mistake; appears to be inherited!

On 4/25/07, Howard Lewis Ship <hl...@gmail.com> wrote:
>
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-gpg-plugin</artifactId>
>           <executions>
>             <execution>
>               <id>sign-artifacts</id>
>               <phase>verify</phase>
>               <goals>
>                 <goal>sign</goal>
>               </goals>
>             </execution>
>           </executions>
>         </plugin>
>   </plugins>
> </pluginManagement>
> </build>
>
>   <profiles>
>     <profile>
>       <id>deploy</id>
>       <build>
>         <plugins>
>           <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-gpg-plugin</artifactId>
>           </plugin>
>         </plugins>
>       </build>
>     </profile>
>   </profiles>
>
>
> This works for the parent POM ("mvn install" does not do PGP, "mvn install
> -P deploy" does).  It does not seem to be inherited by child modules.  Is
> there a way to do that?
>
> On 4/25/07, Howard Lewis Ship <hl...@gmail.com> wrote:
> >
> > Thanks, I'll give it a shot.  Thanks for the quick reply.
> >
> > On 4/25/07, Wendy Smoak < wsmoak@gmail.com> wrote:
> > >
> > > On 4/25/07, Howard Lewis Ship < hlship@gmail.com > wrote:
> > >
> > > > However, this is going to run the GPG plugin every time I run
> > > install (I
> > > > tested).
> > > ...
> > > > How can I ensure that the GPG plugin is only used when I'm using the
> > > deploy
> > > > goal?
> > >
> > > Put the plugin execution config in a profile, and only enable it when
> > > you want to sign the artifacts.
> > >
> > > Using a profile id of 'release' works well for this as it seems to get
> > > enabled automatically by the release plugin.
> > >
> > > --
> > > Wendy
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > Howard M. Lewis Ship
> > TWD Consulting, Inc.
> > Independent J2EE / Open-Source Java Consultant
> > Creator and PMC Chair, Apache Tapestry
> > Creator, Apache HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.   http://howardlewisship.com
> >
>
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>



-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Re: GPG plugin just for deploy?

Posted by Howard Lewis Ship <hl...@gmail.com>.
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
  </plugins>
</pluginManagement>
</build>

  <profiles>
    <profile>
      <id>deploy</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>


This works for the parent POM ("mvn install" does not do PGP, "mvn install
-P deploy" does).  It does not seem to be inherited by child modules.  Is
there a way to do that?

On 4/25/07, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> Thanks, I'll give it a shot.  Thanks for the quick reply.
>
> On 4/25/07, Wendy Smoak <ws...@gmail.com> wrote:
> >
> > On 4/25/07, Howard Lewis Ship <hlship@gmail.com > wrote:
> >
> > > However, this is going to run the GPG plugin every time I run install
> > (I
> > > tested).
> > ...
> > > How can I ensure that the GPG plugin is only used when I'm using the
> > deploy
> > > goal?
> >
> > Put the plugin execution config in a profile, and only enable it when
> > you want to sign the artifacts.
> >
> > Using a profile id of 'release' works well for this as it seems to get
> > enabled automatically by the release plugin.
> >
> > --
> > Wendy
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>



-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Re: GPG plugin just for deploy?

Posted by Howard Lewis Ship <hl...@gmail.com>.
Thanks, I'll give it a shot.  Thanks for the quick reply.

On 4/25/07, Wendy Smoak <ws...@gmail.com> wrote:
>
> On 4/25/07, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> > However, this is going to run the GPG plugin every time I run install (I
> > tested).
> ...
> > How can I ensure that the GPG plugin is only used when I'm using the
> deploy
> > goal?
>
> Put the plugin execution config in a profile, and only enable it when
> you want to sign the artifacts.
>
> Using a profile id of 'release' works well for this as it seems to get
> enabled automatically by the release plugin.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Re: GPG plugin just for deploy?

Posted by Wendy Smoak <ws...@gmail.com>.
On 4/25/07, Howard Lewis Ship <hl...@gmail.com> wrote:

> However, this is going to run the GPG plugin every time I run install (I
> tested).
...
> How can I ensure that the GPG plugin is only used when I'm using the deploy
> goal?

Put the plugin execution config in a profile, and only enable it when
you want to sign the artifacts.

Using a profile id of 'release' works well for this as it seems to get
enabled automatically by the release plugin.

-- 
Wendy

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