You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by Les Hazlewood <lh...@apache.org> on 2012/07/25 05:45:59 UTC

Failed releases and Apache Rat

After blowing 5 hours on trying to release today, I've finally found that:

1) The RAT plugin is _terrible_ about indicating why something failed.
2) Our build passed on mvn apache-rat:rat but _not_ on apache-rat:check

I couldn't figure out for the life of me why things all built
beautifully, apache-rat:rat worked, but the build continually failed
during release only, especially after we put apache-rat:rat in our
release <preparationGoals/> section.  The build output, even when
using the -X (debug) and -e options didn't say _anything_ as to why
the build failed.

On a gut feeling, I decided to try apache-rat:check instead of
apache-rat:rat, and that finally found the culprit: the
DomainPermissionTest.java class did not have an ASL header.

As a security measure to prevent this again, I'm going to change
preparation goals and our CI server config to use apache-rat:check
instead so we can catch this in the future.

Just a friendly reminder: please configure your IDE to use a copyright
plugin to update file headers when working within Apache projects :)

Ok, now that I know what's going on, I should be able to start a vote
fairly soon.  Yay! :)

Cheers,

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk

Re: Failed releases and Apache Rat

Posted by Kalle Korhonen <ka...@gmail.com>.
On Tue, Jul 24, 2012 at 10:02 PM, Les Hazlewood <lh...@apache.org> wrote:
> mvn release:prepare works
> mvn release:perform fails when it gets to the support/web module.  I'm
> too frustrated and tired to debug further (I've tried everything from
> different Maven versions to upgrading plugin versions to latest
> stable, etc - all to no effect).  Can someone (Kalle?) take a look and
> figure out why this may be the case?

The only thing I can think of is the updated release plugin version
that caused it but could be anything. The release plugin is known to
be brittle which is why "if it ain't broke don't fix it" is often the
safest, then again everything else keeps moving along as well and
sometimes plugins need to catch up. Anyway, I know it sucks. I'm off
on a business trip to Europe in a few hours so I can't do anything do
anything about before early next week. We've had a few issues with, so
I'll do a few hard practice runs with it (a real release, we may need
to skip a few micro release numbers). That's the only way to know if
it really works end-to-end.

Kalle

Re: Failed releases and Apache Rat

Posted by Les Hazlewood <lh...@apache.org>.
FINALLY!

Skipping the site plugin for the samples module solved all problems
(apache-rat:check still verifies all samples content).  I'll call for
a vote...

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk

On Wed, Jul 25, 2012 at 9:26 AM, Les Hazlewood <lh...@apache.org> wrote:
> P.S. On the 1.2.0 tag, 'mvn site' failed w/ Maven 3.0.4.  It succeeded
> with Maven 3.0.3.
>
> --
> Les Hazlewood | @lhazlewood
> CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
> Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk
>
>
> On Wed, Jul 25, 2012 at 9:25 AM, Les Hazlewood <lh...@apache.org> wrote:
>> Bizarre.  I checked out the 1.2.0 tag and it failed on 'mvn site' on
>> the samples/spring module, but the 1.2.0 release clearly worked
>> before.
>>
>> I think we need to tell the site plugin to exclude all the samples -
>> they are there for source code reference only - not something we need
>> to publish full maven reports for IMO.  I'll do that just for 1.2.1
>> for now and see how it goes unless anyone feels strongly otherwise.
>>
>> --
>> Les Hazlewood | @lhazlewood
>> CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
>> Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk
>>
>>
>> On Tue, Jul 24, 2012 at 10:20 PM, Les Hazlewood <lh...@apache.org> wrote:
>>> It looks to be a RAT failure, but this is weird:  This error only
>>> occurs if running 'mvn site' at the root of the project or in the
>>> 'support' directory.  It does not happen when in support/web directly.
>>>
>>> The message complains of a missing
>>> 'src/main/resources/log4j.properties' file.  This is definitely in the
>>> support/web module, but not in the project root or in 'support'.  I
>>> wonder why it can't find it.
>>>
>>> [ERROR] Failed to execute goal
>>> org.apache.maven.plugins:maven-site-plugin:3.1:site (default-site) on
>>> project samples-web: Error during page generation: Error rendering
>>> Maven report: Cannot read header: src/main/resources/log4j.properties
>>> (No such file or directory) -> [Help 1]
>>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
>>> execute goal org.apache.maven.plugins:maven-site-plugin:3.1:site
>>> (default-site) on project samples-web: Error during page generation
>>>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
>>>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>>>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>>>         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>>>         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>>>         at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>>>         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>>>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
>>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>>>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>>>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>         at java.lang.reflect.Method.invoke(Method.java:597)
>>>         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>>>         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>>>         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>>>         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>>> Caused by: org.apache.maven.plugin.MojoExecutionException: Error
>>> during page generation
>>>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:143)
>>>         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
>>>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>>>         ... 19 more
>>> Caused by: org.apache.maven.doxia.siterenderer.RendererException:
>>> Error rendering Maven report: Cannot read header
>>>         at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:233)
>>>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319)
>>>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
>>>         at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)
>>>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)
>>>         ... 21 more
>>> Caused by: org.apache.maven.reporting.MavenReportException: Cannot read header
>>>         at org.apache.rat.mp.RatReportMojo.generate(RatReportMojo.java:319)
>>>         at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:228)
>>>         ... 25 more
>>> Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot read header
>>>         at org.apache.rat.mp.AbstractRatMojo.createReport(AbstractRatMojo.java:388)
>>>         at org.apache.rat.mp.RatReportMojo.createReport(RatReportMojo.java:156)
>>>         at org.apache.rat.mp.RatReportMojo.generate(RatReportMojo.java:315)
>>>         ... 26 more
>>> Caused by: org.apache.rat.api.RatException: Cannot read header
>>>         at org.apache.rat.report.claim.util.ClaimReporterMultiplexer.report(ClaimReporterMultiplexer.java:44)
>>>         at org.apache.rat.mp.FilesReportable.run(FilesReportable.java:69)
>>>         at org.apache.rat.Report.report(Report.java:410)
>>>         at org.apache.rat.Report.report(Report.java:388)
>>>         at org.apache.rat.mp.AbstractRatMojo.createReport(AbstractRatMojo.java:369)
>>>         ... 28 more
>>> Caused by: org.apache.rat.document.RatDocumentAnalysisException:
>>> Cannot read header
>>>         at org.apache.rat.analysis.DocumentHeaderAnalyser.analyse(DocumentHeaderAnalyser.java:45)
>>>         at org.apache.rat.analysis.DefaultAnalyserFactory$DefaultAnalyser.analyse(DefaultAnalyserFactory.java:60)
>>>         at org.apache.rat.document.impl.util.DocumentAnalyserMultiplexer.analyse(DocumentAnalyserMultiplexer.java:37)
>>>         at org.apache.rat.report.claim.util.ClaimReporterMultiplexer.report(ClaimReporterMultiplexer.java:42)
>>>         ... 32 more
>>> Caused by: java.io.FileNotFoundException:
>>> src/main/resources/log4j.properties (No such file or directory)
>>>         at java.io.FileInputStream.open(Native Method)
>>>         at java.io.FileInputStream.<init>(FileInputStream.java:120)
>>>         at org.apache.rat.mp.FilesReportable$FileDocument.reader(FilesReportable.java:89)
>>>         at org.apache.rat.analysis.DocumentHeaderAnalyser.analyse(DocumentHeaderAnalyser.java:40)
>>>         ... 35 more

Re: Failed releases and Apache Rat

Posted by Les Hazlewood <lh...@apache.org>.
P.S. On the 1.2.0 tag, 'mvn site' failed w/ Maven 3.0.4.  It succeeded
with Maven 3.0.3.

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk


On Wed, Jul 25, 2012 at 9:25 AM, Les Hazlewood <lh...@apache.org> wrote:
> Bizarre.  I checked out the 1.2.0 tag and it failed on 'mvn site' on
> the samples/spring module, but the 1.2.0 release clearly worked
> before.
>
> I think we need to tell the site plugin to exclude all the samples -
> they are there for source code reference only - not something we need
> to publish full maven reports for IMO.  I'll do that just for 1.2.1
> for now and see how it goes unless anyone feels strongly otherwise.
>
> --
> Les Hazlewood | @lhazlewood
> CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
> Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk
>
>
> On Tue, Jul 24, 2012 at 10:20 PM, Les Hazlewood <lh...@apache.org> wrote:
>> It looks to be a RAT failure, but this is weird:  This error only
>> occurs if running 'mvn site' at the root of the project or in the
>> 'support' directory.  It does not happen when in support/web directly.
>>
>> The message complains of a missing
>> 'src/main/resources/log4j.properties' file.  This is definitely in the
>> support/web module, but not in the project root or in 'support'.  I
>> wonder why it can't find it.
>>
>> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-site-plugin:3.1:site (default-site) on
>> project samples-web: Error during page generation: Error rendering
>> Maven report: Cannot read header: src/main/resources/log4j.properties
>> (No such file or directory) -> [Help 1]
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
>> execute goal org.apache.maven.plugins:maven-site-plugin:3.1:site
>> (default-site) on project samples-web: Error during page generation
>>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
>>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>>         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>>         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>>         at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>>         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:597)
>>         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>>         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>>         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>>         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>> Caused by: org.apache.maven.plugin.MojoExecutionException: Error
>> during page generation
>>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:143)
>>         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
>>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>>         ... 19 more
>> Caused by: org.apache.maven.doxia.siterenderer.RendererException:
>> Error rendering Maven report: Cannot read header
>>         at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:233)
>>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319)
>>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
>>         at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)
>>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)
>>         ... 21 more
>> Caused by: org.apache.maven.reporting.MavenReportException: Cannot read header
>>         at org.apache.rat.mp.RatReportMojo.generate(RatReportMojo.java:319)
>>         at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:228)
>>         ... 25 more
>> Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot read header
>>         at org.apache.rat.mp.AbstractRatMojo.createReport(AbstractRatMojo.java:388)
>>         at org.apache.rat.mp.RatReportMojo.createReport(RatReportMojo.java:156)
>>         at org.apache.rat.mp.RatReportMojo.generate(RatReportMojo.java:315)
>>         ... 26 more
>> Caused by: org.apache.rat.api.RatException: Cannot read header
>>         at org.apache.rat.report.claim.util.ClaimReporterMultiplexer.report(ClaimReporterMultiplexer.java:44)
>>         at org.apache.rat.mp.FilesReportable.run(FilesReportable.java:69)
>>         at org.apache.rat.Report.report(Report.java:410)
>>         at org.apache.rat.Report.report(Report.java:388)
>>         at org.apache.rat.mp.AbstractRatMojo.createReport(AbstractRatMojo.java:369)
>>         ... 28 more
>> Caused by: org.apache.rat.document.RatDocumentAnalysisException:
>> Cannot read header
>>         at org.apache.rat.analysis.DocumentHeaderAnalyser.analyse(DocumentHeaderAnalyser.java:45)
>>         at org.apache.rat.analysis.DefaultAnalyserFactory$DefaultAnalyser.analyse(DefaultAnalyserFactory.java:60)
>>         at org.apache.rat.document.impl.util.DocumentAnalyserMultiplexer.analyse(DocumentAnalyserMultiplexer.java:37)
>>         at org.apache.rat.report.claim.util.ClaimReporterMultiplexer.report(ClaimReporterMultiplexer.java:42)
>>         ... 32 more
>> Caused by: java.io.FileNotFoundException:
>> src/main/resources/log4j.properties (No such file or directory)
>>         at java.io.FileInputStream.open(Native Method)
>>         at java.io.FileInputStream.<init>(FileInputStream.java:120)
>>         at org.apache.rat.mp.FilesReportable$FileDocument.reader(FilesReportable.java:89)
>>         at org.apache.rat.analysis.DocumentHeaderAnalyser.analyse(DocumentHeaderAnalyser.java:40)
>>         ... 35 more

Re: Failed releases and Apache Rat

Posted by Les Hazlewood <lh...@apache.org>.
Bizarre.  I checked out the 1.2.0 tag and it failed on 'mvn site' on
the samples/spring module, but the 1.2.0 release clearly worked
before.

I think we need to tell the site plugin to exclude all the samples -
they are there for source code reference only - not something we need
to publish full maven reports for IMO.  I'll do that just for 1.2.1
for now and see how it goes unless anyone feels strongly otherwise.

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk


On Tue, Jul 24, 2012 at 10:20 PM, Les Hazlewood <lh...@apache.org> wrote:
> It looks to be a RAT failure, but this is weird:  This error only
> occurs if running 'mvn site' at the root of the project or in the
> 'support' directory.  It does not happen when in support/web directly.
>
> The message complains of a missing
> 'src/main/resources/log4j.properties' file.  This is definitely in the
> support/web module, but not in the project root or in 'support'.  I
> wonder why it can't find it.
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-site-plugin:3.1:site (default-site) on
> project samples-web: Error during page generation: Error rendering
> Maven report: Cannot read header: src/main/resources/log4j.properties
> (No such file or directory) -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
> execute goal org.apache.maven.plugins:maven-site-plugin:3.1:site
> (default-site) on project samples-web: Error during page generation
>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>         at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error
> during page generation
>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:143)
>         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>         ... 19 more
> Caused by: org.apache.maven.doxia.siterenderer.RendererException:
> Error rendering Maven report: Cannot read header
>         at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:233)
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319)
>         at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
>         at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)
>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)
>         ... 21 more
> Caused by: org.apache.maven.reporting.MavenReportException: Cannot read header
>         at org.apache.rat.mp.RatReportMojo.generate(RatReportMojo.java:319)
>         at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:228)
>         ... 25 more
> Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot read header
>         at org.apache.rat.mp.AbstractRatMojo.createReport(AbstractRatMojo.java:388)
>         at org.apache.rat.mp.RatReportMojo.createReport(RatReportMojo.java:156)
>         at org.apache.rat.mp.RatReportMojo.generate(RatReportMojo.java:315)
>         ... 26 more
> Caused by: org.apache.rat.api.RatException: Cannot read header
>         at org.apache.rat.report.claim.util.ClaimReporterMultiplexer.report(ClaimReporterMultiplexer.java:44)
>         at org.apache.rat.mp.FilesReportable.run(FilesReportable.java:69)
>         at org.apache.rat.Report.report(Report.java:410)
>         at org.apache.rat.Report.report(Report.java:388)
>         at org.apache.rat.mp.AbstractRatMojo.createReport(AbstractRatMojo.java:369)
>         ... 28 more
> Caused by: org.apache.rat.document.RatDocumentAnalysisException:
> Cannot read header
>         at org.apache.rat.analysis.DocumentHeaderAnalyser.analyse(DocumentHeaderAnalyser.java:45)
>         at org.apache.rat.analysis.DefaultAnalyserFactory$DefaultAnalyser.analyse(DefaultAnalyserFactory.java:60)
>         at org.apache.rat.document.impl.util.DocumentAnalyserMultiplexer.analyse(DocumentAnalyserMultiplexer.java:37)
>         at org.apache.rat.report.claim.util.ClaimReporterMultiplexer.report(ClaimReporterMultiplexer.java:42)
>         ... 32 more
> Caused by: java.io.FileNotFoundException:
> src/main/resources/log4j.properties (No such file or directory)
>         at java.io.FileInputStream.open(Native Method)
>         at java.io.FileInputStream.<init>(FileInputStream.java:120)
>         at org.apache.rat.mp.FilesReportable$FileDocument.reader(FilesReportable.java:89)
>         at org.apache.rat.analysis.DocumentHeaderAnalyser.analyse(DocumentHeaderAnalyser.java:40)
>         ... 35 more

Re: Failed releases and Apache Rat

Posted by Les Hazlewood <lh...@apache.org>.
It looks to be a RAT failure, but this is weird:  This error only
occurs if running 'mvn site' at the root of the project or in the
'support' directory.  It does not happen when in support/web directly.

The message complains of a missing
'src/main/resources/log4j.properties' file.  This is definitely in the
support/web module, but not in the project root or in 'support'.  I
wonder why it can't find it.

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.1:site (default-site) on
project samples-web: Error during page generation: Error rendering
Maven report: Cannot read header: src/main/resources/log4j.properties
(No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.apache.maven.plugins:maven-site-plugin:3.1:site
(default-site) on project samples-web: Error during page generation
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error
during page generation
	at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:143)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	... 19 more
Caused by: org.apache.maven.doxia.siterenderer.RendererException:
Error rendering Maven report: Cannot read header
	at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:233)
	at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319)
	at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
	at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)
	at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)
	... 21 more
Caused by: org.apache.maven.reporting.MavenReportException: Cannot read header
	at org.apache.rat.mp.RatReportMojo.generate(RatReportMojo.java:319)
	at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:228)
	... 25 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot read header
	at org.apache.rat.mp.AbstractRatMojo.createReport(AbstractRatMojo.java:388)
	at org.apache.rat.mp.RatReportMojo.createReport(RatReportMojo.java:156)
	at org.apache.rat.mp.RatReportMojo.generate(RatReportMojo.java:315)
	... 26 more
Caused by: org.apache.rat.api.RatException: Cannot read header
	at org.apache.rat.report.claim.util.ClaimReporterMultiplexer.report(ClaimReporterMultiplexer.java:44)
	at org.apache.rat.mp.FilesReportable.run(FilesReportable.java:69)
	at org.apache.rat.Report.report(Report.java:410)
	at org.apache.rat.Report.report(Report.java:388)
	at org.apache.rat.mp.AbstractRatMojo.createReport(AbstractRatMojo.java:369)
	... 28 more
Caused by: org.apache.rat.document.RatDocumentAnalysisException:
Cannot read header
	at org.apache.rat.analysis.DocumentHeaderAnalyser.analyse(DocumentHeaderAnalyser.java:45)
	at org.apache.rat.analysis.DefaultAnalyserFactory$DefaultAnalyser.analyse(DefaultAnalyserFactory.java:60)
	at org.apache.rat.document.impl.util.DocumentAnalyserMultiplexer.analyse(DocumentAnalyserMultiplexer.java:37)
	at org.apache.rat.report.claim.util.ClaimReporterMultiplexer.report(ClaimReporterMultiplexer.java:42)
	... 32 more
Caused by: java.io.FileNotFoundException:
src/main/resources/log4j.properties (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:120)
	at org.apache.rat.mp.FilesReportable$FileDocument.reader(FilesReportable.java:89)
	at org.apache.rat.analysis.DocumentHeaderAnalyser.analyse(DocumentHeaderAnalyser.java:40)
	... 35 more

Re: Failed releases and Apache Rat

Posted by Les Hazlewood <lh...@apache.org>.
'mvn site' builds all the way until it reaches the support/web module.
 Then it fails.

However, immediately after failure, this works:

> cd support/web
> mvn site

How that's possible, I don't know.

Do we want the static site generated for the 1.2.1 release?  Unless
someone is willing to figure out how to fix it, I'm fairly certain I'm
stuck.

Any takers?

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk


On Tue, Jul 24, 2012 at 10:02 PM, Les Hazlewood <lh...@apache.org> wrote:
> I'm at my wits end - I just can't get the release process to work
> using the normal release plugin process as documented
> (https://cwiki.apache.org/confluence/display/SHIRO/Performing+a+Release).
>  This has always worked in all other previous releases.  I don't know
> what makes the 1.2.1 poms different.
>
> mvn release:prepare works
> mvn release:perform fails when it gets to the support/web module.  I'm
> too frustrated and tired to debug further (I've tried everything from
> different Maven versions to upgrading plugin versions to latest
> stable, etc - all to no effect).  Can someone (Kalle?) take a look and
> figure out why this may be the case?
>
> For now, I'm just doing a manual checkout of the 1.2.1 tag (created
> successfully during mvn release:prepare) and calling mvn deploy
> -Pdocs,apache-release. At least this will give us voteable artifacts.
> If I'm lucky site-deploy will work without problems too.  They just
> don't work together in the context of the release plugin.
>
> Regards,
>
> --
> Les Hazlewood | @lhazlewood
> CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
> Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk
>
>
> On Tue, Jul 24, 2012 at 8:45 PM, Les Hazlewood <lh...@apache.org> wrote:
>> After blowing 5 hours on trying to release today, I've finally found that:
>>
>> 1) The RAT plugin is _terrible_ about indicating why something failed.
>> 2) Our build passed on mvn apache-rat:rat but _not_ on apache-rat:check
>>
>> I couldn't figure out for the life of me why things all built
>> beautifully, apache-rat:rat worked, but the build continually failed
>> during release only, especially after we put apache-rat:rat in our
>> release <preparationGoals/> section.  The build output, even when
>> using the -X (debug) and -e options didn't say _anything_ as to why
>> the build failed.
>>
>> On a gut feeling, I decided to try apache-rat:check instead of
>> apache-rat:rat, and that finally found the culprit: the
>> DomainPermissionTest.java class did not have an ASL header.
>>
>> As a security measure to prevent this again, I'm going to change
>> preparation goals and our CI server config to use apache-rat:check
>> instead so we can catch this in the future.
>>
>> Just a friendly reminder: please configure your IDE to use a copyright
>> plugin to update file headers when working within Apache projects :)
>>
>> Ok, now that I know what's going on, I should be able to start a vote
>> fairly soon.  Yay! :)
>>
>> Cheers,
>>
>> --
>> Les Hazlewood | @lhazlewood
>> CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
>> Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk

Re: Failed releases and Apache Rat

Posted by Les Hazlewood <lh...@apache.org>.
I'm at my wits end - I just can't get the release process to work
using the normal release plugin process as documented
(https://cwiki.apache.org/confluence/display/SHIRO/Performing+a+Release).
 This has always worked in all other previous releases.  I don't know
what makes the 1.2.1 poms different.

mvn release:prepare works
mvn release:perform fails when it gets to the support/web module.  I'm
too frustrated and tired to debug further (I've tried everything from
different Maven versions to upgrading plugin versions to latest
stable, etc - all to no effect).  Can someone (Kalle?) take a look and
figure out why this may be the case?

For now, I'm just doing a manual checkout of the 1.2.1 tag (created
successfully during mvn release:prepare) and calling mvn deploy
-Pdocs,apache-release. At least this will give us voteable artifacts.
If I'm lucky site-deploy will work without problems too.  They just
don't work together in the context of the release plugin.

Regards,

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk


On Tue, Jul 24, 2012 at 8:45 PM, Les Hazlewood <lh...@apache.org> wrote:
> After blowing 5 hours on trying to release today, I've finally found that:
>
> 1) The RAT plugin is _terrible_ about indicating why something failed.
> 2) Our build passed on mvn apache-rat:rat but _not_ on apache-rat:check
>
> I couldn't figure out for the life of me why things all built
> beautifully, apache-rat:rat worked, but the build continually failed
> during release only, especially after we put apache-rat:rat in our
> release <preparationGoals/> section.  The build output, even when
> using the -X (debug) and -e options didn't say _anything_ as to why
> the build failed.
>
> On a gut feeling, I decided to try apache-rat:check instead of
> apache-rat:rat, and that finally found the culprit: the
> DomainPermissionTest.java class did not have an ASL header.
>
> As a security measure to prevent this again, I'm going to change
> preparation goals and our CI server config to use apache-rat:check
> instead so we can catch this in the future.
>
> Just a friendly reminder: please configure your IDE to use a copyright
> plugin to update file headers when working within Apache projects :)
>
> Ok, now that I know what's going on, I should be able to start a vote
> fairly soon.  Yay! :)
>
> Cheers,
>
> --
> Les Hazlewood | @lhazlewood
> CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
> Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk