[
https://issues.apache.org/jira/browse/OOZIE-2229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14544097#comment-14544097
]
Ryota Egashira commented on OOZIE-2229:
---------------------------------------
[~shwethags] thanks for info.
{quote}
we can define just one module and include different sources depending on the
profile.
{quote}
there is class which (e..g, LauncherMainHadoopUtils.java) has different
implementation for different versions, and need a way to differentiate it
inside the same module(directory). it looks a bit trick, hence trying the other
option first.
{quote}
The problem is we need to define 3 modules for each hadoop major version and
all these modules can't have the same version 4.2.0-SNAPSHOT
{quote}
can you explain a bit more on why it didn't work with the same version?
the patch I tried (on RB, will attach here) can still use the same version for
each module, but able to differentiate it using classifier.
but actually I hit another issue, when do mvn package -Phadoop-2, seem like
transitive dependency cannot take right profile from CLI.
just wondering you hit the same issue last time you tried.
error message i got
{code}
[ERROR] Failed to execute goal on project oozie-sharelib-hcatalog: Could not
resolve dependencies for project
org.apache.oozie:oozie-sharelib-hcatalog:jar:4.2.0-SNAPSHOT: Failure to find
org.apache.oozie:oozie-hadoop-utils:jar:hadoop1:4.2.0-SNAPSHOT in
https://repository.apache.org/content/groups/snapshots was cached in the local
repository, resolution will not be reattempted until the update interval of
apache.snapshots.repo has elapsed or updates are forced -> [Help 1]
{code}
oozie-sharelib-hcatalog depends on oozie-sharelib-oozie
oozie-sharelib-oozie depends on oozie-hadoop-utils
oozie-hadoop-utils version is specified by variable {hadooplib.classifier}
which supposed to be substitued by profile.
but -Phadoop-2 from CLI is not propated properly, always point to hadoop1.
looks like known maven issues.
http://jira.codehaus.org/browse/MNG-1388
http://jira.codehaus.org/browse/MNG-3782
transitive dependency(oozie-hadoop-utils) seem to resolve profile information
from top-level pom.
if we change activeByDefault true for hadoop-2 in top-level pom.xml, it works
pig.classifier or sqoop classifeir doesn't have the same issue, since it is not
transitively resolved.
appreciate if any information to workaround this
> oozie-hadoop-utils version does not conform to standard
> -------------------------------------------------------
>
> Key: OOZIE-2229
> URL: https://issues.apache.org/jira/browse/OOZIE-2229
> Project: Oozie
> Issue Type: Bug
> Reporter: Rohini Palaniswamy
> Assignee: Ryota Egashira
> Fix For: trunk
>
>
> The version for oozie-hadoop-utils package for different versions is of the
> form
> <oozie.hadoop-utils.version>hadoop-${hadoop.majorversion}-${project.version}</oozie.hadoop-utils.version>
> i.e
> <version>hadoop-1-4.2.0-SNAPSHOT</version>
> <version>hadoop-2-4.2.0-SNAPSHOT</version>
> <version>hadoop-3-4.2.0-SNAPSHOT</version>
> This is breaking the standard major.minor.revision.patch versioning for jar
> or the <major version>.<minor version>.<incremental version>-<qualifier>
> standard for maven.
> This causes problems with maven plugins like versions and also problems with
> some of our internal systems which do not expect alphabets and special
> characters (- in this case) in the major version.
> The correct way to do this would be to use classifiers like how it is done in
> Pig and Sqoop for different versions of hadoop.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)