Creating checkstyle configuration file [message #1413450] |
Thu, 28 August 2014 14:43 |
|
Hi,
I try to build our shared IDE with an Oomph setup. I'm getting close to the expecting result, but there are still some little tasks to complete manually, like the Checkstyle configuration.
Indeed, we use a custom checkstyle configuration, stored in a configuration project in our workspace. Thus, in the preferences dialog we create a new configuration, with a type "Project relative configuration". This is not stored in a preference, but in a file checkstyle-config.xml, in the folder ".metadata\.plugins\net.sf.eclipsecs.core" of the workspace.
My question is : What is the best way to manage the checkstyle configuration with the Oomph setup ? Must I use a basic Resource creation task to create the config file ?
Thanks
|
|
|
Re: Creating checkstyle configuration file [message #1413474 is a reply to message #1413450] |
Thu, 28 August 2014 16:12 |
|
Hi Jonathan,
We don't use Checkstyle ourselves and don't know the format and semantics of its configuration files, so I'm not sure I
can give the best advice. A ResourceCreationTask with a targetURL =
${workspace.location|uri}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml might do the job for you. It
doesn't seem very composable but maybe that's not your immediate problem.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 28.08.2014 um 16:43 schrieb Jonathan Dumont:
> Hi,
>
> I try to build our shared IDE with an Oomph setup. I'm getting close to the expecting result, but there are still some
> little tasks to complete manually, like the Checkstyle configuration.
>
> Indeed, we use a custom checkstyle configuration, stored in a configuration project in our workspace. Thus, in the
> preferences dialog we create a new configuration, with a type "Project relative configuration". This is not stored in
> a preference, but in a file checkstyle-config.xml, in the folder ".metadata\.plugins\net.sf.eclipsecs.core" of the
> workspace.
>
> My question is : What is the best way to manage the checkstyle configuration with the Oomph setup ? Must I use a basic
> Resource creation task to create the config file ?
>
> Thanks
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: Creating checkstyle configuration file [message #1413556 is a reply to message #1413474] |
Thu, 28 August 2014 20:58 |
|
Hi Eike,
I have finally found a solution similar to your suggestion : I have created a Resource Creation task with the following properties :
targetURL="platform:/meta/net.sf.eclipsecs.core/checkstyle-config.xml"
encoding="UTF-8"
excludedTriggers="BOOTSTRAP"
content='your checkstyle config file content'
Notice that as the resource creation is done in the workspace metadata, it can't be done with the bootstrap trigger.
|
|
|
|
|
Re: Creating checkstyle configuration file [message #1742808 is a reply to message #1719458] |
Wed, 07 September 2016 18:06 |
|
Hi all, I know this thread is a little bit old I'm trying the same as the author of this thread and the end result is not perfect. I put this to my installation.setup:
<setupTask
xsi:type="setup:CompoundTask"
id="checkstyle.prefs"
disabled="false"
name="Checkstyle Setup">
<setupTask
xsi:type="setup:ResourceCreationTask"
excludedTriggers="BOOTSTRAP"
filter=""
content="<?xml version="1.0" encoding="UTF-8"?>

<checkstyle-configurations file-format-version="5.0.0" default-check-configuration="GOOS Checkstyle">
 <check-configuration name="GOOS Checkstyle" location="configuration\checkstyle\goos-checkstyle.xml" type="external" description="">
 <additional-data name="protect-config-file" value="true"/>
 </check-configuration>
</checkstyle-configurations>
"
targetURL="${workspace.location|uri}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml"
encoding="UTF-8">
<description></description>
</setupTask>
</setupTask>
But now every time I'm using this eclipse to start a (new) workspace ... oomph is asking for the "workspace.location". Hmm ... I think this could be done better Why oomph doesn't know the "current" workspace location? Is there another placeholder for that.
Kind Regards
Andreas Höhmann
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03748 seconds