Latest patch:
https://issues.apache.org/jira/secure/attachment/12945681/0001-RANGER-2265-Added-all-the-modules-for-linux-profile-.patch
More analysis on the root cause of build failure on linux environment:
===========================================================
1. [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]
a. This error is because, for the linux profile, we are not specifying
any maven-assembly-plugin version. Hence "maven-assembly-plugin:3.0.0" is
picked based on the maven version that is available on the system. Before
RANGER-2243 changes there is a common assembly-plugin section with version
2.2-beta-5 (under pluginManagement section) in root pom.xml which is applied
for all the profiles by default. Hence this issue is not seen before
RANGER-2243.
b. Why this error is seen only on linux env, is because, according to
maven documentation, there are multiple ways to activate a particular profile
and each are applied based on particular priority. In pom.xml, any profile with
<os> <family> is given higher priority than the profile marked
<activeByDefault> as true. <os><family> is computed based on the environment
the code is built/packaged. Since we have only one profile with <os> <family>
as linux, this profiles is applied only on the linux environments and is taking
precedence than "all" profile even though it is marked <activeByDefault> true.
But in mac environment, there is no other profile with <os> <family> that
matches the environment, "all" profile is used as the active profile.
2. Initial fix that is provided by Qiang Zhang
(https://issues.apache.org/jira/secure/attachment/12945374/0001-RANGER-2265-To-make-the-profile-all-to-be-active-by-.patch)
a. With this fix, the <os> <family> activation tag is removed. So the
profile that is marked <activeByDefault> true ("all" in this case) will be used
as the active profile for all the environments. But the issue with this patch
is that, "unixauthnative" module will not be built by default in the linux
environments. In order to build "unixauthnative" module on linux, "-Plinux"
option has to be provided.
After doing some more research, in order to keep the default behavior
consistent on all the environments as pre RANGER-2243 changes, I think we need
to create two different default profiles for linux and non-linux environments.
The latest patch I uploaded
(https://issues.apache.org/jira/secure/attachment/12945681/0001-RANGER-2265-Added-all-the-modules-for-linux-profile-.patch)
contains those changes.
1. On non-linux environments, we have "all" profile which is marked
<activeByDefault> true. This profile builds/packages all the modules except
"unixauthnative" module.
2. On linux environment, we have "linux" profile with <os> <family> activation
tag whis will be the default active profile. This profile builds/packages all
the modules including "unixauthnative" module.
Hope this explanation makes sense. If anyone has better suggestions, please
feel free to provide.
Thanks,
Sailaja.
On 10/25/18, 9:09 PM, "Don Bosco Durai" <[email protected]> wrote:
There are 2 patches. Any specific one you want me to try it out?
Bosco
On 10/25/18, 5:18 PM, "Sailaja Polavarapu" <[email protected]>
wrote:
Hi, Bosco,
I updated a new patch to
https://issues.apache.org/jira/browse/RANGER-2265. Can you give it a try?
On 10/25/18, 2:22 PM, "Don Bosco Durai" <[email protected]> wrote:
Yes, I am using Linux based Docker.
Thanks for looking into it.
Bosco
On 10/25/18, 2:09 PM, "Sailaja Polavarapu"
<[email protected]> wrote:
From the following documentation it looks like profile with OS
family takes precedence.
https://maven.apache.org/guides/introduction/introduction-to-profiles.html
>>>>>>>>>>>>>>>>>>
Profiles can also be active by default using a configuration
like the following:
<profiles>
<profile>
<id>profile-1</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
...
</profile>
</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.
>>>>>>>>>>>>>>>>>>>>>>>>
If you are compiling on linux, then you see this issue as the
profile with os family is taking precedence. If you are compiling in mac, we
don’t see this issue. One more solution that is specified in the above document
is to use settings.xml to specify active profiles.
Thanks,
Sailaja.
On 10/25/18, 11:21 AM, "Velmurugan Periasamy" <[email protected]>
wrote:
I am able to build locally using the below command (no
change) even after RANGER-2243.
mvn clean compile package install assembly:assembly
Could it be related to maven version? I am using maven
3.3.9 and it is picking up the right maven-assembly-plugin (2.2-beta-5)
specified in pom.xml. Not sure why you are picking up 3.0.0?
________________________________________
From: Ramesh Mani <[email protected]>
Sent: Thursday, October 25, 2018 2:15 PM
To: [email protected]
Subject: Re: Ranger mvn build parameters...
Hi Bosco,
JIRA https://issues.apache.org/jira/browse/RANGER-2265 is
raised for
addressing this. If this patch works we don¹t need to
updated
Thanks
Ramesh
On 10/23/18, 10:22 PM, "Don Bosco Durai" <[email protected]>
wrote:
>Seems after
https://issues.apache.org/jira/browse/RANGER-2243 patch, we
>need to pass -Pall to the build.
>
>
>
>Without that, I am getting this error:
>
>
>
>mvn -DskipTests=true clean compile package install
assembly:assembly
>
>[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]
>
>
>
>Can we change the public documentation with additional
details? Seems we
>need to change quite a few places:
>
>
>
>https://ranger.apache.org/quick_start_guide.html
>
>https://cwiki.apache.org/confluence/display/RANGER/Ranger+Installation+Gui
>de
>
>https://github.com/apache/ranger
>
>
>
>There are other places also.
>
>
>
>Thanks
>
>
>
>Bosco
>
>
>
>
>
>
>
>
>