[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-04 Thread Elek, Marton (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16238956#comment-16238956
 ] 

Elek, Marton commented on RATIS-102:


The reason behind [~jingzhao] saw a problem after RATIS-102 is that the the 
'mvn clean' starter to work. Unfortunatelly the proto generation is bound to 
the package phase, so as it's written in the BUILDING.txt you need to do a 'mvn 
package' first to generate all the proto files.

In short:

* mvn clean package: works after RATIS-102
* mvn clean compile: doesn't work after RATIS-102 (It worked until now because 
the clean was not a real clean and you had the old, sometimes out-of-date 
classes)

I am almost sure that RATIS-129 is not a good solution for this problem as it's 
conflicting with 'mvn clean compile' (I will write the details to there) but 
the good solution is to use RATIS-132

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Fix For: 0.2.0-alpha
>
> Attachments: RATIS-102.000.patch, RATIS-102.001.patch, 
> RATIS-102.002.patch, RATIS-102.003.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-03 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16238503#comment-16238503
 ] 

Tsz Wo Nicholas Sze commented on RATIS-102:
---

A better approach is to check if the shaded src dir exists.  Let me file a JIRA.
{code}
+++ b/ratis-proto-shaded/pom.xml
@@ -466,9 +466,9 @@
  files or update the protobuf version.
   -->
   
-
-  !skipShade
-
+
+  ${shaded.sources.dir}
+
   
   
 compile-protobuf
{code}


> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Fix For: 0.2.0-alpha
>
> Attachments: RATIS-102.000.patch, RATIS-102.001.patch, 
> RATIS-102.002.patch, RATIS-102.003.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-03 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16238487#comment-16238487
 ] 

Tsz Wo Nicholas Sze commented on RATIS-102:
---

[~jingzhao], you are right that {{mvn test}} does not work it needs
{code}
mvn -DskipShade test
{code}

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Fix For: 0.2.0-alpha
>
> Attachments: RATIS-102.000.patch, RATIS-102.001.patch, 
> RATIS-102.002.patch, RATIS-102.003.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-03 Thread Jing Zhao (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16238472#comment-16238472
 ] 

Jing Zhao commented on RATIS-102:
-

Looks like with ratis-102, if I run "mvn package -DskipTests" and then "mvn 
test" on a clean repo, I will get a lot of compilation errors. And if I revert 
ratis-102, everything works fine. Could you please take a look, [~szetszwo]? 

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Fix For: 0.2.0-alpha
>
> Attachments: RATIS-102.000.patch, RATIS-102.001.patch, 
> RATIS-102.002.patch, RATIS-102.003.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-02 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16236654#comment-16236654
 ] 

Tsz Wo Nicholas Sze commented on RATIS-102:
---

+1 the 003 patch looks good.  Will commit it shortly.

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Attachments: RATIS-102.000.patch, RATIS-102.001.patch, 
> RATIS-102.002.patch, RATIS-102.003.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-02 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16236637#comment-16236637
 ] 

Tsz Wo Nicholas Sze commented on RATIS-102:
---

I have filed RATIS-128 for the missing versions warnings.

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Attachments: RATIS-102.000.patch, RATIS-102.001.patch, 
> RATIS-102.002.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-02 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16236604#comment-16236604
 ] 

Tsz Wo Nicholas Sze commented on RATIS-102:
---

> There are new WARNINGs from mvn (for any goal). 

The warnings were not introduced by the patch here.  They also show up in {{mvn 
package -DskipTests}} without the patch.

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Attachments: RATIS-102.000.patch, RATIS-102.001.patch, 
> RATIS-102.002.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-02 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16236595#comment-16236595
 ] 

Tsz Wo Nicholas Sze commented on RATIS-102:
---

Thanks for the update.  The new patch works for both {{mvn clean}} and {{mvn 
clean -DskipCleanShade}}.  Some minor comments:
- In BUILDING.md, "skipShadeClean" should be "skipCleanShade".
{code}
+$ mvn clean -DskipShadeClean
{code}
- There are new WARNINGs from mvn (for any goal).
{code}
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for 
org.apache.ratis:ratis-hadoop-shaded:jar:0.1.1-alpha-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for 
org.apache.maven.plugins:maven-shade-plugin is missing. @ 
org.apache.ratis:ratis-hadoop-shaded:[unknown-version], 
/Users/szetszwo/hadoop/incubator-ratis/ratis-hadoop-shaded/pom.xml, line 184, 
column 19
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for 
org.apache.ratis:ratis-proto-shaded:jar:0.1.1-alpha-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for 
org.xolstice.maven.plugins:protobuf-maven-plugin is missing. @ 
org.apache.ratis:ratis-proto-shaded:[unknown-version], 
/Users/szetszwo/hadoop/incubator-ratis/ratis-proto-shaded/pom.xml, line 491, 
column 19
[WARNING] 'build.plugins.plugin.version' for 
org.apache.maven.plugins:maven-shade-plugin is missing. @ 
org.apache.ratis:ratis-proto-shaded:[unknown-version], 
/Users/szetszwo/hadoop/incubator-ratis/ratis-proto-shaded/pom.xml, line 524, 
column 19
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten 
the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support 
building such malformed projects.
[WARNING] 
{code}
- It seems that force compiling the proto files does not work.  We should 
either fix it of remove the following from BUILDING.md.
{code}
If you want to force compiling the proto files (for example after changing 
them), you should run

$ mvn package -DskipTests -Dcompile-protobuf
{code}


> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Attachments: RATIS-102.000.patch, RATIS-102.001.patch, 
> RATIS-102.002.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-02 Thread Elek, Marton (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16236088#comment-16236088
 ] 

Elek, Marton commented on RATIS-102:


The nightly build seems to be ok: 

   https://builds.apache.org/job/ratis-qbt-master-java8-linux-x86/3/

There is one ASF licence warning by the .travis.yaml on RATIS-4. I will remove 
this file from the RATIS-4 patch. It could be usefull to test PR/custom forks, 
but it should be adjusted first to use yetus. Will remove now.

The other problem is a real unit test failure which IMHO a real unit test 
problem and should be fixed.

The precommit hook is more trickier. There is a lot of compilation error (see 
https://builds.apache.org/job/PreCommit-RATIS-Build/9/console). I think because 
the shading is bind to the package phase, so a simple mvn clean compile is not 
supported on the source code. I am still investigating it.

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Attachments: RATIS-102.000.patch, RATIS-102.001.patch, 
> RATIS-102.002.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-02 Thread Elek, Marton (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16236052#comment-16236052
 ] 

Elek, Marton commented on RATIS-102:


Hi, [~szetszwo], thx for the testing.

Yes, you are right. I tested it with ratis-hadoop-shaded, and it seems that 
ratis-proto-shaded worked in a different way. 

The problem was the activeByDefault, which is (IMHO) very confusing. According 
to the maven docs:

[Profile with activeByDefault...] "will automatically be active for all builds 
*unless* another profile in the same POM is activated using one of the 
previously described methods." 

So I modified the activation to depend on variable. Now it works:

{code} 
mvn clean -DskipCleanShade=true | grep shaded
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ ratis-proto-shaded 
---
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ ratis-hadoop-shaded 
---
{code}

{code}
mvn clean | grep shaded 
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ ratis-proto-shaded 
---
[INFO] --- maven-clean-plugin:3.0.0:clean (shaded-clean) @ ratis-proto-shaded 
---
[INFO] Deleting /home/elek/projects/ratis/ratis-proto-shaded (includes = 
[dependency-reduced-pom.xml], excludes = [])
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ ratis-hadoop-shaded 
---
[INFO] --- maven-clean-plugin:3.0.0:clean (shaded-clean) @ ratis-hadoop-shaded 
---
[INFO] Deleting /home/elek/projects/ratis/ratis-hadoop-shaded (includes = 
[dependency-reduced-pom.xml], excludes = [])
{code}

The other problem is the usage of / in profile, as the 
profiles are evaluated at the beginning of maven run. For example using 
 and calling 'mvn clean install': at the beginning of the 
execution the dir exists, so it won't be generated (profile will be turned 
off), but in the clean phase the dir will be deleted.

As a workaround I suggest to always shade/protobuf-compile and use 
'-DskipShade' to avoid multiple skip shade. It's a more flag, but for this 
method we can support 'mvn clean install'

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Attachments: RATIS-102.000.patch, RATIS-102.001.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-01 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16234686#comment-16234686
 ] 

Tsz Wo Nicholas Sze commented on RATIS-102:
---

Hi [~elek], just have tried the 001 patch but {{mvn clean}} does not remove the 
shaded source.  Could you take a look?
{code}
szetszwo incubator-ratis$mvn clean
[INFO] Scanning for projects...

[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time: 0.967 s
[INFO] Finished at: 2017-11-01T13:23:07-07:00
[INFO] Final Memory: 17M/309M
[INFO] 
szetszwo incubator-ratis$ls 
ratis-proto-shaded/src/main/java/org/apache/ratis/shaded/io/netty/channel/AbstractChannel.java
 
ratis-proto-shaded/src/main/java/org/apache/ratis/shaded/io/netty/channel/AbstractChannel.java
{code}

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Attachments: RATIS-102.000.patch, RATIS-102.001.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-11-01 Thread Elek, Marton (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16234584#comment-16234584
 ] 

Elek, Marton commented on RATIS-102:


Thx the point. Fair enough: I didn't know about this use case. I will modify 
the patch just to activate the clean-shade by default. In that case it could be 
disabled with -P!clean-shade, but yetus could work in RATIS-4, as yetus use 
'mvn clean' without specific profiles

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>Priority: Major
>  Labels: build
> Attachments: RATIS-102.000.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-09-08 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16159789#comment-16159789
 ] 

Tsz Wo Nicholas Sze commented on RATIS-102:
---

We need to shade for every clean.  It is good to have an option to clean up the 
classes and test data without removing the shaded source.

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>  Labels: build
> Attachments: RATIS-102.000.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-09-08 Thread Elek, Marton (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16158281#comment-16158281
 ] 

Elek, Marton commented on RATIS-102:


Actually the won't be reshaded every time, if you use just `mvn package` and 
not `mvn clean package`.

I just tested it with doing an `mvn install -DskipTests` after a clean.

The subsequent builds (mvn install -DskipTests, again) took 12 sec.

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>  Labels: build
> Attachments: RATIS-102.000.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-09-04 Thread Tsz Wo Nicholas Sze (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16153128#comment-16153128
 ] 

Tsz Wo Nicholas Sze commented on RATIS-102:
---

Hi [~elek], it is a good point that the {{mvn clean}} command should clean 
everything so that other tool would work.

However, we don't want to do shade every time when compile the source since it 
takes a much longer time.  How about we set the clean-shade profile to be 
active by default?  Then, we could avoid clean-shade by disabling the profile.

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>  Labels: build
> Attachments: RATIS-102.000.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RATIS-102) Clean generated sources as part of the default clean lifecycle

2017-09-04 Thread Jing Zhao (JIRA)

[ 
https://issues.apache.org/jira/browse/RATIS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16152995#comment-16152995
 ] 

Jing Zhao commented on RATIS-102:
-

The patch looks good to me. +1

Do you also want to take a look at the patch, [~szetszwo]?

> Clean generated sources as part of the default clean lifecycle
> --
>
> Key: RATIS-102
> URL: https://issues.apache.org/jira/browse/RATIS-102
> Project: Ratis
>  Issue Type: Bug
>Reporter: Elek, Marton
>Assignee: Elek, Marton
>  Labels: build
> Attachments: RATIS-102.000.patch
>
>
> RATIS-49 introduced new profiles to cleanup the generated sources/proto files 
> in the shaded artifacts.
> I suggest to make it more easier by binding the additional {clean:clean} 
> plugin calls to the clean phase of the default clean lifecycle instead of 
> trigger them from a separated profile.  
> In RATIS-4 I experimenting  with build scripts and yetus test-patch script. 
> As the simple {{mvn clean}} command is more common, it would be easier to 
> switch to the simple clean without the profile.
> The cleanup could be done with triggering additional clean plugin execution.
> To test:
> {code}
> git checkout 52c4b64
> mvn clean package -DskipTests
> git checkout master
> mvn clean package -DskipTests
> {code}
> Without the patch the second only works with -Pclean-shade, with the proposed 
> patch it works without activating any additional profile



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)