It's even "nicer" if you need to control the access to such resource and
bugs come by (http://jira.codehaus.org/browse/MCHECKSTYLE-109,
http://jira.codehaus.org/browse/PLXCOMP-128)

To share such common resources and configuration (checkstyle, license, ..)
with other maven projects I needed a maven project with all the maven
goodies, that everyone in an intranet only could use but not abuse. To get
eclipse-cs to use same configuration, project is under svn and release
plugin tags releases nicely, and eclipse-cs configuration is a viewvc
enabled path which is long and nasty but named and eclipse-cs supports
authentication for remote configuration.

Regards,
Stevo.

2009/6/23 Stephen Connolly <stephen.alan.conno...@gmail.com>

> it's even better if your source control is subversion fronted by apache...
>
> 2009/6/23 Mohan KR <kmoh....@gmail.com>:
> > I have always used the remote location for checkstyle, especially for
> > sharing cs configuration for
> > *disconnected* projects. And then nice thing is if using eclipse, with
> > eclipse-cs I check in the
> > .checkstyle and we have everything synced up nicely.
> >
> > Of course, you need to *host* the checkstyle file for this, apache httpd
> > works really nice.
> >
> > Thanks,
> > mohan kr
> >
> > -----Original Message-----
> > From: Stevo Slavić [mailto:ssla...@gmail.com]
> > Sent: Monday, June 22, 2009 3:13 PM
> > To: Maven Users List
> > Subject: Re: Sharing checkstyle configuration across multiple maven
> projects
> >
> > There was a difference between my attached example and one
> > here<
> http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-
> > module-config.html>,
> > instead of defining maven-checkstyle-plugin in build/plugins section I've
> > defined it in build/pluginManagement/plugins section. Second mistake was
> > that shared-resources (build-tools) inherited parent that's aggregating
> it
> > causing cyclic dependency.
> >
> > Regards,
> > Stevo.
> >
> > On Mon, Jun 22, 2009 at 5:58 PM, Todd Thiessen <thies...@nortel.com>
> wrote:
> >
> >> What you could do is point to an actual version of your checkstyle
> >> config. ie:
> >>
> >>        <plugin>
> >>          <groupId>org.apache.maven.plugins</groupId>
> >>          <artifactId>maven-checkstyle-plugin</artifactId>
> >>          <dependencies>
> >>            <dependency>
> >>              <groupId>...</groupId>
> >>              <artifactId>...</artifactId>
> >>              <version>...</version>
> >>            </dependency>
> >>          </dependencies>
> >>        </plugin>
> >>
> >> Instead of the using the <configLocation> parameter. This way any of
> >> your modules can point to the artifact without having to know its folder
> >> location.
> >>
> >> ---
> >> Todd Thiessen
> >>
> >>
> >> > -----Original Message-----
> >> > From: Stevo Slavic [mailto:ssla...@gmail.com]
> >> > Sent: Monday, June 22, 2009 11:50 AM
> >> > To: users@maven.apache.org
> >> > Subject: Sharing checkstyle configuration across multiple
> >> > maven projects
> >> >
> >> > Hello Maven users,
> >> >
> >> > I'm trying to configure a maven project to serve as parent
> >> > project for multiple other maven projects. One of the things
> >> > parent was supposed to do is share checkstyle configuration.
> >> > To accomplish this I've tried by following example given here
> >> > <http://maven.apache.org/plugins/maven-checkstyle-plugin/examp
> >> > les/multi-module-config.html> . Attached are two project,
> >> > pappa in role of a "capo di tutti capi" parent pom, and
> >> > aproject as a simple project being pappa's child.
> >> > Unfortunately, this doesn't work as expected, checkstyle
> >> > configuration doesn't get found when trying to generate site
> >> > for aproject. Little bit of debugging revealed that maven
> >> > complains at a config location URL (see [1]).
> >> >
> >> > Are there any workarounds to this?
> >> >
> >> > I'm thinking of spring framework's pseudo URL prefix
> >> > "classpath:", is something like that available in maven 2?
> >> >
> >> >
> >> > Regards,
> >> > Stevo.
> >> >
> >> >
> >> > [1] aproject's maven build output snippet
> >> >
> >> > [INFO] Generating "Checkstyle" report.
> >> > [DEBUG] URLResourceLoader: Exception when looking for
> >> > 'checkstyle/checks.xml' at ''
> >> > java.net.MalformedURLException: no protocol:
> >> > checkstyle/checks.xml at java.net.URL.<init>(URL.java:567) at
> >> > java.net.URL.<init>(URL.java:464) at
> >> > java.net.URL.<init>(URL.java:413) at
> >> > org.codehaus.plexus.resource.loader.URLResourceLoader.getResou
> >> > rceAsInputStream(URLResourceLoader.java:45)
> >> > at
> >> > org.codehaus.plexus.resource.DefaultResourceManager.getResourc
> >> > eAsInputStream(DefaultResourceManager.java:77)
> >> > at
> >> > org.codehaus.plexus.resource.DefaultResourceManager.getResourc
> >> > eAsFile(DefaultResourceManager.java:117)
> >> > at
> >> > org.apache.maven.plugin.checkstyle.CheckstyleReport.getConfigF
> >> > ile(CheckstyleReport.java:1132)
> >> > at
> >> > org.apache.maven.plugin.checkstyle.CheckstyleReport.executeRep
> >> > ort(CheckstyleReport.java:599)
> >> > at
> >> > org.apache.maven.reporting.AbstractMavenReport.generate(Abstra
> >> > ctMavenReport.java:98)
> >> > at
> >> > org.apache.maven.plugins.site.ReportDocumentRenderer.renderDoc
> >> > ument(ReportDocumentRenderer.java:139)
> >> > at
> >> > org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render
> >> > Module(DefaultSiteRenderer.java:269)
> >> > at
> >> > org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render
> >> > (DefaultSiteRenderer.java:101)
> >> > at
> >> > org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:133)
> >> > at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:100)
> >> > at
> >> > org.apache.maven.plugin.DefaultPluginManager.executeMojo(Defau
> >> > ltPluginManager.java:483)
> >> > at
> >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
> >> > ls(DefaultLifecycleExecutor.java:678)
> >> > at
> >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
> >> > lWithLifecycle(DefaultLifecycleExecutor.java:540)
> >> > at
> >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
> >> > l(DefaultLifecycleExecutor.java:519)
> >> > at
> >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
> >> > lAndHandleFailures(DefaultLifecycleExecutor.java:371)
> >> > at
> >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTas
> >> > kSegments(DefaultLifecycleExecutor.java:332)
> >> > at
> >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(De
> >> > faultLifecycleExecutor.java:181)
> >> > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
> >> > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
> >> > at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
> >> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> > Method) at
> >> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> >> > orImpl.java:39)
> >> > at
> >> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> >> > odAccessorImpl.java:25)
> >> > at java.lang.reflect.Method.invoke(Method.java:585)
> >> > at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> >> > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >> > at
> >> > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> >> > at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: users-h...@maven.apache.org
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to