You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by cmoulliard <cm...@gmail.com> on 2009/01/27 13:49:14 UTC

Procedure to format AND checkstyle in Eclipse according to Camel rules ?

Hi,

I would like to know the procedure to follow in order to format code to be
published to camel project in Eclipse ?

Idem but to check style ?

Is the code formatted automatically during maven build process of Camel
project ?

Remarks :
- ActiveMQCodeFormatter.xml file exists under the folder etc/eclipse. Maybe
this file could be rename to CamelCodeFormater ? Is it the file to be used
in Eclipse to format the code ?
- Several files exist under buildingtools project ? Which one to be used
with eclipse to checkstyle (using checkstyle plugin / PMD plugin)  ?



-----
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: http://www.nabble.com/Procedure-to-format-AND-checkstyle-in-Eclipse-according-to-Camel-rules---tp21683694s22882p21683694.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Procedure to format AND checkstyle in Eclipse according to Camel rules ?

Posted by Willem Jiang <wi...@gmail.com>.
No , the code can't be fromatted automatically during maven build processs
of Camel project.
But you can get some help from Eclipse ;)

The camel-checkstyle.xml in the buildingtools , just for running the check
style plugin for maven.

Willem


On Tue, Jan 27, 2009 at 8:49 PM, cmoulliard <cm...@gmail.com> wrote:

>
> Hi,
>
> I would like to know the procedure to follow in order to format code to be
> published to camel project in Eclipse ?
>
> Idem but to check style ?
>
> Is the code formatted automatically during maven build process of Camel
> project ?
>
> Remarks :
> - ActiveMQCodeFormatter.xml file exists under the folder etc/eclipse. Maybe
> this file could be rename to CamelCodeFormater ? Is it the file to be used
> in Eclipse to format the code ?
> - Several files exist under buildingtools project ? Which one to be used
> with eclipse to checkstyle (using checkstyle plugin / PMD plugin)  ?
>
>
>
> -----
> Charles Moulliard
> SOA Architect
>
> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
> --
> View this message in context:
> http://www.nabble.com/Procedure-to-format-AND-checkstyle-in-Eclipse-according-to-Camel-rules---tp21683694s22882p21683694.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>

Re: Procedure to format AND checkstyle in Eclipse according to Camel rules ?

Posted by Gert Vanthienen <ge...@skynet.be>.
L.S.,

We could also configure the Maven Eclipse plugin to generate per-project 
code formatting rules while doing mvn eclipse:eclipse.  The only 
drawback is that it overwrites the .settings/org.eclipse.jdt.core.prefs 
in the process, so we also have to specify the compiler compliance level 
ourselves in the template prefs file.  I gave it a quick try on my 
machine and it seems to work fine this way.

Regards,

Gert

Jon Anstey wrote:
> Spot on Ramon. You can also tell Maven where your Eclipse workspace actually
> is like so
>
> mvn -Psetup.eclipse -Declipse.workspace.dir=/path/to/your/workspace
>
> On Tue, Jan 27, 2009 at 9:28 AM, Ramon Buckland <ra...@gmail.com>wrote:
>
>   
>> cc'd to dev@
>>
>> Thanks Charles,  I have/had the same question.
>>
>> Once it is in email I'll volunteer to push that to the wiki.
>>
>> I know already that line width is set at 140 (thanks Claus).
>>
>> In Eclipse I am using Sun standard formatting with change of 140 line
>> width.
>>
>> It seems, by inspecting the uber pom.xml that
>>
>> {code} mvn -Psetup.eclipse {code}
>>
>> should create the magic with a checkstyle configuration applied to a
>> workspace. but it assumed a few things about workspace locations and etc
>> which did not seem to hold for me.
>>
>> On Tue, Jan 27, 2009 at 23:49, cmoulliard <cm...@gmail.com> wrote:
>>
>>     
>>> Hi,
>>>
>>> I would like to know the procedure to follow in order to format code to
>>>       
>> be
>>     
>>> published to camel project in Eclipse ?
>>>
>>> Idem but to check style ?
>>>
>>> Is the code formatted automatically during maven build process of Camel
>>> project ?
>>>
>>> Remarks :
>>> - ActiveMQCodeFormatter.xml file exists under the folder etc/eclipse.
>>>       
>> Maybe
>>     
>>> this file could be rename to CamelCodeFormater ? Is it the file to be
>>>       
>> used
>>     
>>> in Eclipse to format the code ?
>>> - Several files exist under buildingtools project ? Which one to be used
>>> with eclipse to checkstyle (using checkstyle plugin / PMD plugin)  ?
>>>
>>>
>>>
>>>       
>
>
>
>   


Re: Procedure to format AND checkstyle in Eclipse according to Camel rules ?

Posted by Jon Anstey <ja...@gmail.com>.
Spot on Ramon. You can also tell Maven where your Eclipse workspace actually
is like so

mvn -Psetup.eclipse -Declipse.workspace.dir=/path/to/your/workspace

On Tue, Jan 27, 2009 at 9:28 AM, Ramon Buckland <ra...@gmail.com>wrote:

> cc'd to dev@
>
> Thanks Charles,  I have/had the same question.
>
> Once it is in email I'll volunteer to push that to the wiki.
>
> I know already that line width is set at 140 (thanks Claus).
>
> In Eclipse I am using Sun standard formatting with change of 140 line
> width.
>
> It seems, by inspecting the uber pom.xml that
>
> {code} mvn -Psetup.eclipse {code}
>
> should create the magic with a checkstyle configuration applied to a
> workspace. but it assumed a few things about workspace locations and etc
> which did not seem to hold for me.
>
> On Tue, Jan 27, 2009 at 23:49, cmoulliard <cm...@gmail.com> wrote:
>
> >
> > Hi,
> >
> > I would like to know the procedure to follow in order to format code to
> be
> > published to camel project in Eclipse ?
> >
> > Idem but to check style ?
> >
> > Is the code formatted automatically during maven build process of Camel
> > project ?
> >
> > Remarks :
> > - ActiveMQCodeFormatter.xml file exists under the folder etc/eclipse.
> Maybe
> > this file could be rename to CamelCodeFormater ? Is it the file to be
> used
> > in Eclipse to format the code ?
> > - Several files exist under buildingtools project ? Which one to be used
> > with eclipse to checkstyle (using checkstyle plugin / PMD plugin)  ?
> >
> >
> >
>



-- 
Cheers,
Jon

http://janstey.blogspot.com/

Re: Procedure to format AND checkstyle in Eclipse according to Camel rules ?

Posted by Ramon Buckland <ra...@gmail.com>.
cc'd to dev@

Thanks Charles,  I have/had the same question.

Once it is in email I'll volunteer to push that to the wiki.

I know already that line width is set at 140 (thanks Claus).

In Eclipse I am using Sun standard formatting with change of 140 line width.

It seems, by inspecting the uber pom.xml that

{code} mvn -Psetup.eclipse {code}

should create the magic with a checkstyle configuration applied to a
workspace. but it assumed a few things about workspace locations and etc
which did not seem to hold for me.

On Tue, Jan 27, 2009 at 23:49, cmoulliard <cm...@gmail.com> wrote:

>
> Hi,
>
> I would like to know the procedure to follow in order to format code to be
> published to camel project in Eclipse ?
>
> Idem but to check style ?
>
> Is the code formatted automatically during maven build process of Camel
> project ?
>
> Remarks :
> - ActiveMQCodeFormatter.xml file exists under the folder etc/eclipse. Maybe
> this file could be rename to CamelCodeFormater ? Is it the file to be used
> in Eclipse to format the code ?
> - Several files exist under buildingtools project ? Which one to be used
> with eclipse to checkstyle (using checkstyle plugin / PMD plugin)  ?
>
>
>

Re: Procedure to format AND checkstyle in Eclipse according to Camel rules ?

Posted by Ramon Buckland <ra...@gmail.com>.
I didn't thanks Willem. Hopefully this is the issue.

I'll revisit it and "do the needful" on the issue / wiki.

ta.

On Wed, Jan 28, 2009 at 02:04, Willem Jiang <wi...@gmail.com> wrote:

> Hi ,
>
> Did you run mvn install before running the mvn -Psetup.eclipse ?
> Here are some instruction from CXF that you may take a look ;)
>
> [1] http://cwiki.apache.org/CXF/setting-up-eclipse.html
>
> Willem
>
> On Tue, Jan 27, 2009 at 10:11 PM, Ramon Buckland
> <ra...@gmail.com>wrote:
>
> > Charles,  (and others)
> >
> > I was just trying to get it working but I did not have much success with
> > trunk.
> >
> > I logged an issue, https://issues.apache.org/activemq/browse/CAMEL-1298
> >
> > << workaround >>
> > However, what I noticed was that, the Profile first sets up your
> workspace.
> > When it starts running through each project, this is when it fails
> (ymmv).
> > From there, just run mvn eclipse:eclipse and then import the projects as
> > you
> > desire into the workspace you need
> >
> > r.
> >
>

Re: Procedure to format AND checkstyle in Eclipse according to Camel rules ?

Posted by Willem Jiang <wi...@gmail.com>.
Hi ,

Did you run mvn install before running the mvn -Psetup.eclipse ?
Here are some instruction from CXF that you may take a look ;)

[1] http://cwiki.apache.org/CXF/setting-up-eclipse.html

Willem

On Tue, Jan 27, 2009 at 10:11 PM, Ramon Buckland
<ra...@gmail.com>wrote:

> Charles,  (and others)
>
> I was just trying to get it working but I did not have much success with
> trunk.
>
> I logged an issue, https://issues.apache.org/activemq/browse/CAMEL-1298
>
> << workaround >>
> However, what I noticed was that, the Profile first sets up your workspace.
> When it starts running through each project, this is when it fails (ymmv).
> From there, just run mvn eclipse:eclipse and then import the projects as
> you
> desire into the workspace you need
>
> r.
>

Re: Procedure to format AND checkstyle in Eclipse according to Camel rules ?

Posted by Ramon Buckland <ra...@gmail.com>.
Charles,  (and others)

I was just trying to get it working but I did not have much success with
trunk.

I logged an issue, https://issues.apache.org/activemq/browse/CAMEL-1298

<< workaround >>
However, what I noticed was that, the Profile first sets up your workspace.
When it starts running through each project, this is when it fails (ymmv).
>From there, just run mvn eclipse:eclipse and then import the projects as you
desire into the workspace you need

r.

Re: Procedure to format AND checkstyle in Eclipse according to Camel rules ?

Posted by Ramon Buckland <ra...@gmail.com>.
cc'd to dev@

Thanks Charles,  I have/had the same question.

Once it is in email I'll volunteer to push that to the wiki.

I know already that line width is set at 140 (thanks Claus).

In Eclipse I am using Sun standard formatting with change of 140 line width.

It seems, by inspecting the uber pom.xml that

{code} mvn -Psetup.eclipse {code}

should create the magic with a checkstyle configuration applied to a
workspace. but it assumed a few things about workspace locations and etc
which did not seem to hold for me.

On Tue, Jan 27, 2009 at 23:49, cmoulliard <cm...@gmail.com> wrote:

>
> Hi,
>
> I would like to know the procedure to follow in order to format code to be
> published to camel project in Eclipse ?
>
> Idem but to check style ?
>
> Is the code formatted automatically during maven build process of Camel
> project ?
>
> Remarks :
> - ActiveMQCodeFormatter.xml file exists under the folder etc/eclipse. Maybe
> this file could be rename to CamelCodeFormater ? Is it the file to be used
> in Eclipse to format the code ?
> - Several files exist under buildingtools project ? Which one to be used
> with eclipse to checkstyle (using checkstyle plugin / PMD plugin)  ?
>
>
>