You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by alloyer <al...@gmail.com> on 2009/06/29 05:02:00 UTC

How can I do the -Psourcecheck before creating a patch?

Hi, can anyone tell me how to add option -Psourcecheck when creating a patch?
My previous patch have some style problem and jonstey tell me to do source
check to ensure proper formatting  when building the patch, but I can not
find how to do it. I am using TortoiseSVN  on windows XP.
-- 
View this message in context: http://www.nabble.com/How-can-I-do-the--Psourcecheck-before-creating-a-patch--tp24247776p24247776.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: How can I do the -Psourcecheck before creating a patch?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Usually you can run it before doing the patch. Then fix the issues in
the source files. And then do a regular patch.

>From maven command line you do:

mvn compile -Psourcecheck

Maybe Eclipse can run the command as well, if you use Eclipse as editor.


On Mon, Jun 29, 2009 at 5:02 AM, alloyer<al...@gmail.com> wrote:
>
> Hi, can anyone tell me how to add option -Psourcecheck when creating a patch?
> My previous patch have some style problem and jonstey tell me to do source
> check to ensure proper formatting  when building the patch, but I can not
> find how to do it. I am using TortoiseSVN  on windows XP.
> --
> View this message in context: http://www.nabble.com/How-can-I-do-the--Psourcecheck-before-creating-a-patch--tp24247776p24247776.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: How can I do the -Psourcecheck before creating a patch?

Posted by alloyer <al...@gmail.com>.
oh...it seems i used it uncorrectly before. the checkstyle pluging works well
on every unproper formattings.
:-D

alloyer wrote:
> 
> Yes, the checkstyle plugin provides most of the proper code style.
> But there are some ill-suited code checkstyle plugin can not detect, like
> this,
>  @Produces( {XXX})
>  the checkstyle can not notice a whitespace is added after the "("
> uncorrectly. eclipse will add it when formatting operation by default, so
> the mvn command is better for me although it cost a little more time.
> 
> Thanks, 
> 
> willem.jiang wrote:
>> 
>> Hi,
>> 
>> Do you use eclipse to edit your camel code?
>> I just did some improvement on the eclipse checkstyle setting up. Please
>> feel free to give it a try :)
>> 
>> 1. Install the checkstyle pulgin for eclipse
>> http://eclipse-cs.sourceforge.net/update
>> 
>> 2. Setup the workspace for the checkstyle
>>   * Build the kit first
>>      mvn clean install -Dtest=false
>>   * Set up the workspace with checkstyle setting
>>      mvn eclipse:eclipse -Psetup.eclipse
>>   * You will find the mvn create a wrokspace directory in the parent
>> directory of the camel trunk directory.
>>     Open the eclipse and use the wrokspace, then import the projects
>> from the camel trunk.
>> 
>> In this way you could see if the code is ok for checkstyle in eclipse.
>> 
>> Willem
>> 
>> alloyer wrote:
>>> Hi, can anyone tell me how to add option -Psourcecheck when creating a
>>> patch?
>>> My previous patch have some style problem and jonstey tell me to do
>>> source
>>> check to ensure proper formatting  when building the patch, but I can
>>> not
>>> find how to do it. I am using TortoiseSVN  on windows XP.
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-can-I-do-the--Psourcecheck-before-creating-a-patch--tp24247776p24251620.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: How can I do the -Psourcecheck before creating a patch?

Posted by alloyer <al...@gmail.com>.
Yes, the checkstyle plugin provides most of the proper code style.
But there are some ill-suited code checkstyle plugin can not detect, like
this,
 @Produces( {XXX})
 the checkstyle can not notice a whitespace is added after the "("
uncorrectly. eclipse will add it when formatting operation by default, so
the mvn command is better for me although it cost a little more time.

Thanks, 

willem.jiang wrote:
> 
> Hi,
> 
> Do you use eclipse to edit your camel code?
> I just did some improvement on the eclipse checkstyle setting up. Please
> feel free to give it a try :)
> 
> 1. Install the checkstyle pulgin for eclipse
> http://eclipse-cs.sourceforge.net/update
> 
> 2. Setup the workspace for the checkstyle
>   * Build the kit first
>      mvn clean install -Dtest=false
>   * Set up the workspace with checkstyle setting
>      mvn eclipse:eclipse -Psetup.eclipse
>   * You will find the mvn create a wrokspace directory in the parent
> directory of the camel trunk directory.
>     Open the eclipse and use the wrokspace, then import the projects
> from the camel trunk.
> 
> In this way you could see if the code is ok for checkstyle in eclipse.
> 
> Willem
> 
> alloyer wrote:
>> Hi, can anyone tell me how to add option -Psourcecheck when creating a
>> patch?
>> My previous patch have some style problem and jonstey tell me to do
>> source
>> check to ensure proper formatting  when building the patch, but I can not
>> find how to do it. I am using TortoiseSVN  on windows XP.
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-can-I-do-the--Psourcecheck-before-creating-a-patch--tp24247776p24251288.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: How can I do the -Psourcecheck before creating a patch?

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

Do you use eclipse to edit your camel code?
I just did some improvement on the eclipse checkstyle setting up. Please
feel free to give it a try :)

1. Install the checkstyle pulgin for eclipse
http://eclipse-cs.sourceforge.net/update

2. Setup the workspace for the checkstyle
  * Build the kit first
     mvn clean install -Dtest=false
  * Set up the workspace with checkstyle setting
     mvn eclipse:eclipse -Psetup.eclipse
  * You will find the mvn create a wrokspace directory in the parent
directory of the camel trunk directory.
    Open the eclipse and use the wrokspace, then import the projects
from the camel trunk.

In this way you could see if the code is ok for checkstyle in eclipse.

Willem

alloyer wrote:
> Hi, can anyone tell me how to add option -Psourcecheck when creating a patch?
> My previous patch have some style problem and jonstey tell me to do source
> check to ensure proper formatting  when building the patch, but I can not
> find how to do it. I am using TortoiseSVN  on windows XP.