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

Andrew Wang commented on HADOOP-13789:
--------------------------------------

bq. Would this be cleaner as a new "protoc-test" goal rather than a flag?

Codewise, you're right that having two goals will be a bigger change, but I 
think a new goal is more inline with a Maven user's expectations since it seems 
common to have different goals for src vs. test, like with the aforementioned 
resource plugin and the jar plugin's {{jar}} and {{test-jar}}.

Having separate goals would also let us set the default {{output}} directory 
based on src vs. test, which would help prevent this probable YARN mistake.

FWIW I looked at the YARN protos and it looks like a copy-paste error. These 
protos are referenced in some tests in src/test/java. I also grepped all of CDH 
and only found references to these classes in Hadoop, so I think we're okay.

> Hadoop Common includes generated test protos in both jar and test-jar
> ---------------------------------------------------------------------
>
>                 Key: HADOOP-13789
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13789
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: build, common
>            Reporter: Sean Busbey
>            Assignee: Sean Busbey
>         Attachments: HADOOP-13789.1.patch
>
>
> Right now our ProtocMojo always adds source directories to the main compile 
> phase and we use it in hadoop-common to both generate main files as well as 
> test files. This results in the test files getting added to both our test jar 
> (correct) and our main jar (not correct).
> We should either add a main-vs-test flag to the configuration for ProtocMojo 
> or make a ProtocTestMojo that always adds as a test sources.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to