You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Benjamin Marwell <bm...@gmail.com> on 2020/02/03 07:35:17 UTC

Re: maven enforcer ensure javadoc attached

Hi Jon,

I think you could use the verifier-plugin for checking file existence.

https://maven.apache.org/plugins/maven-verifier-plugin/verify-mojo.html

Am So., 2. Feb. 2020 um 17:55 Uhr schrieb Jon Harper <jo...@gmail.com>:
>
> Hi list,
>
> I would like to use maven-enforcer-plugin to ensure that javadocs are
> attached in release mode before installing. That's because I use
> $ mvn package javadoc:aggregate-jar deploy
> to build, so if someone forgets to call the aggregate-jar goal, the
> release will be missing the javadoc.
>
> I don't see any rule to enforce this (the closest I found is
> https://github.com/elastic/attached-artifact-enforcer which does the
> opposite, ensure that something is not attached).
>
> Is it possible to do what I want using the standard rules ? If not,
> would you consider to add new rules for this ?
>
> Thanks,
> Jon
>
> Note: I need to use javadoc:aggregate-jar on the command line and not
> part of the lifecycle because:
> - I want the aggregated javadoc to be attached to the root pom
> artifact, not some child "distribution"-like artifact
> - I want the aggregated javadoc to be created after the submodules
> have been built.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: maven enforcer ensure javadoc attached

Posted by Jon Harper <jo...@gmail.com>.
Hi Benjamin,
thank you for your answer. But I don't see any option to check that
the artifact are attached in the verify plugin.
The problem is that the files can be present in the target folder but
not attached if you have not run the goal in the same maven invocation
as the one doing "install".
I haven't tested, but maybe the solution is to always run the
build-helper:attach-artifact goal which can be bound the the lifecycle
so it can't be omitted during the release. It would do what I want if
it fails when the files are not present.

Thanks
Jon

On Mon, Feb 3, 2020 at 8:35 AM Benjamin Marwell <bm...@gmail.com> wrote:
>
> Hi Jon,
>
> I think you could use the verifier-plugin for checking file existence.
>
> https://maven.apache.org/plugins/maven-verifier-plugin/verify-mojo.html
>
> Am So., 2. Feb. 2020 um 17:55 Uhr schrieb Jon Harper <jo...@gmail.com>:
> >
> > Hi list,
> >
> > I would like to use maven-enforcer-plugin to ensure that javadocs are
> > attached in release mode before installing. That's because I use
> > $ mvn package javadoc:aggregate-jar deploy
> > to build, so if someone forgets to call the aggregate-jar goal, the
> > release will be missing the javadoc.
> >
> > I don't see any rule to enforce this (the closest I found is
> > https://github.com/elastic/attached-artifact-enforcer which does the
> > opposite, ensure that something is not attached).
> >
> > Is it possible to do what I want using the standard rules ? If not,
> > would you consider to add new rules for this ?
> >
> > Thanks,
> > Jon
> >
> > Note: I need to use javadoc:aggregate-jar on the command line and not
> > part of the lifecycle because:
> > - I want the aggregated javadoc to be attached to the root pom
> > artifact, not some child "distribution"-like artifact
> > - I want the aggregated javadoc to be created after the submodules
> > have been built.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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