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

Pradeep Agrawal commented on RANGER-2265:
-----------------------------------------

I am unable to see this issue in my mac. 

Without this patch on Linux :
{code:java}
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] ranger
[INFO] Unix Native Authenticator
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary
[INFO]
[INFO] ranger ............................................. SKIPPED
[INFO] Unix Native Authenticator .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.906 s
[INFO] Finished at: 2018-10-26T05:34:30+00:00
[INFO] Final Memory: 11M/379M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'assembly' in plugin 
org.apache.maven.plugins:maven-assembly-plugin:3.0.0 among available goals 
help, single -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException
{code}
After this patch on Linux. The same issue is seen without this patch and 
RANGER-2243 patch as well.
{code:java}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-antrun-plugin:1.7:run 
(generate-version-annotation) on project ranger-util: An Ant BuildException has 
occured: exec returned: 1
[ERROR] around Ant part ...<exec failonerror="true" executable="python">... @ 
4:48 in /root/ranger/ranger-util/target/antrun/build-main.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :ranger-util
{code}

> To make the profile "all" to be active by default when ranger build 
> --------------------------------------------------------------------
>
>                 Key: RANGER-2265
>                 URL: https://issues.apache.org/jira/browse/RANGER-2265
>             Project: Ranger
>          Issue Type: Improvement
>          Components: Ranger
>    Affects Versions: master
>            Reporter: Qiang Zhang
>            Assignee: Qiang Zhang
>            Priority: Major
>              Labels: build
>         Attachments: 
> 0001-RANGER-2265-Added-all-the-modules-for-linux-profile-.patch, 
> 0001-RANGER-2265-To-make-the-profile-all-to-be-active-by-.patch
>
>
> After merge https://issues.apache.org/jira/browse/RANGER-2243 patch, we need 
> to pass -Pall to the build. 
>  Refer command:
>  mvn -DskipTests=true clean compile package install assembly:assembly -Pall
> If use the following command would cause failue:
>  mvn -DskipTests=true clean compile package install assembly:assembly
>  {noformat}
>  OS name: "linux", version: "2.6.32-431.el6.x86_64", arch: "amd64", family: 
> "unix"
>  [INFO] Reactor Summary:
>  [INFO]
>  [INFO] ranger ............................................. SKIPPED
>  [INFO] Unix Native Authenticator .......................... SKIPPED
>  [INFO] 
> ------------------------------------------------------------------------
>  [INFO] BUILD FAILURE
>  [ERROR] Could not find goal 'assembly' in plugin 
> org.apache.maven.plugins:maven-assembly-plugin:3.0.0 among available goals 
> help, single -> [Help 1]
> {noformat}
> Use the following command to find default profile,
>  we can see the profile "linux" is active:
> {noformat}
>  mvn help:active-profiles -N
>  Active Profiles for Project 'org.apache.ranger:ranger:pom:2.0.0-SNAPSHOT':
>  The following profiles are active:
>  - env-settings (source: external)
>  - env-unix (source: external)
>  - linux (source: org.apache.ranger:ranger:2.0.0-SNAPSHOT)
> {noformat}
> Which we expect the default profile "all" to be active.
> Refer to the Maven issue:
>  Profile not active even though it has activeByDefault set to true
>  https://issues.apache.org/jira/browse/MNG-4917
> {noformat}
> And from Introduction to Build Profiles:
>  This profile will automatically be active for all builds unless another 
> profile in the same pom is activated using one of the previously described 
> methods. All profiles that are active by default are automatically 
> deactivated when a profile in the pom is activated on the command line or 
> through its activation config.
> {noformat}
>  *In short, the profile "linux" disables "all" when ranger build without 
> specifying the profile id.*
> To make the profile "all" to be active by default,
>  we should remove the property "activation" of profile "linux".
>  In fact, the property "activation" of profile "linux" make no sense,
>  just prompt us to compile under linux os,
>  and it should not be activated automatically instead of "all".
>  It should be activated by specifying the profile id:
>  mvn -DskipTests=true clean compile package install assembly:assembly -Plinux



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to