[
https://issues.apache.org/jira/browse/PIG-4942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15381232#comment-15381232
]
Peter Slawski commented on PIG-4942:
------------------------------------
Hi Daniel,
Thank you for the reply and simplified patch.
Should mvn-install still depend on the set-version target like it did before?
set-version looks to be generating the pom files which mvn-install refers to.
When building Pig only for Hadoop 2, mvn-build will fail as the pig-*h1.jar
will not be built. This is the case when -Dhadoopversion=23 is passed through
the command line. I understand this is not a problem for your use case as Pig
is built for both Hadoop 1 and 2. The patch I provided did handle this case.
Since Hadoop-1 support is being dropped in 0.17, I am not too concern with
going with your simplified approach on the 0.16 branch anyhow.
ant clean mvn-install -Dhadoopversion=23
...
BUILD FAILED
.../build.xml:1278: Warning: Could not find file
/.../pig-0.16.0-SNAPSHOT-core-h1.jar to copy.
> Fix mvn-install ant target
> --------------------------
>
> Key: PIG-4942
> URL: https://issues.apache.org/jira/browse/PIG-4942
> Project: Pig
> Issue Type: Bug
> Components: build
> Affects Versions: 0.16.0
> Reporter: Peter Slawski
> Assignee: Peter Slawski
> Fix For: 0.16.1
>
> Attachments: PIG-4942.1.patch, PIG-4942.2.patch, PIG-4942.3.patch
>
>
> The mvn-install ant target which allows pig artifacts to be placed in the
> local repository became broken by PIG-4499 in Pig 0.15. That patch removed
> the mvn-jar target which the mvn-install target had dependent on. Instead,
> the jar-h12 target was used as a replacement. However, this target is
> insufficient as it does not move built jars to their expected output
> locations and does not handle well the case where we are building Pig only
> for Hadoop 2 via the {{-Dhadoopversion=23}} option.
> There is an important detail to make note. The {{jar-h12}} target uses
> propertyreset scripts to change the hadoopversion property before it calls
> ant targets to change the behavior of the ant targets. These propertyreset
> scripts do nothing when the {{-Dhadoopversion}} option is provided through
> the command line. This is because ant does not allow overwriting user
> properties.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)