[
https://issues.apache.org/jira/browse/AMBARI-19149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15742431#comment-15742431
]
Doroszlai, Attila commented on AMBARI-19149:
--------------------------------------------
* {{test}} phase fails if style checks fail: OK.
* {{mvn checkstyle:check}} works (since AMBARI-19158 is fixed): OK
* We still have several cleanups to go, will post patches when they are ready.
To be able to build just one project (eg. {{ambari-server}}), one needs to have
the dependencies installed. This is nothing new.
Try this:
{noformat}
rm -fr ~/.m2/repository/utility
rm -fr ~/.m2/repository/org/apache/ambari
git checkout branch-2.4
git clean -fd
cd ambari-server
mvn compile
{noformat}
It will fail with:
{noformat}
[ERROR] Failed to execute goal on project ambari-server: Could not resolve
dependencies for project org.apache.ambari:ambari-server:jar:2.4.2.0.0: The
following artifacts could not be resolved:
org.apache.ambari:ambari-views:jar:2.4.2.0.0,
org.apache.ambari:ambari-metrics-common:jar:2.4.2.0.0: Could not find artifact
org.apache.ambari:ambari-views:jar:2.4.2.0.0 in oss.sonatype.org
(https://oss.sonatype.org/content/groups/staging) -> [Help 1]
{noformat}
branch-2.4 has no {{utility}} module, but {{ambari-server}} has several other
dependencies. If one can build {{ambari-server}} without having to worry about
those dependencies, it's just that they are already built, installed (in
{{~/.m2/repository}}) and forgotten about. However, if they change in ways
that affect {{ambari-server}}, then they need to be rebuilt.
> Clean up Ambari Server source code warnings
> -------------------------------------------
>
> Key: AMBARI-19149
> URL: https://issues.apache.org/jira/browse/AMBARI-19149
> Project: Ambari
> Issue Type: Task
> Components: ambari-server
> Reporter: Doroszlai, Attila
> Assignee: Doroszlai, Attila
> Fix For: 3.0.0
>
> Attachments: AMBARI-19149-1.patch, IDEA_Ambari_v1.xml
>
>
> Eclipse's default warnings generated for {{ambari-server}} number roughly
> over 3300. Out of these, at least half of them are:
> * Unused imports
> * Type safety due to forgotten {{<>}}
> * Missing Serialization IDs from anonymous {{HashMap}} implementations
> * Unused variables
> * {{Capture<T>}} in tests
> * {{switch}} fall-through and missing {{case statements}}: *only makes
> changes which won't affect existing functionality*
> This makes spotting actual problems, like missing {{case}} statements a
> nightmare. We need to go through and clean out as many of these warnings as
> possible.
> Note: With respect to the import cleanup, the IDE of choice should have the
> following import order setup. They should always be expanded and never use
> {{*}}.
> # {{java}}
> # {{javax}}
> # {{org}}
> # {{com}}
> # other
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)