Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven build improvements #9335

Merged
merged 1 commit into from Sep 13, 2017

Conversation

jtkb
Copy link
Contributor

@jtkb jtkb commented Aug 8, 2017

This pullrequest changes

Documented how to change the version of Maven to match OpenCV core and modified bash scripts accordingly.

Changed from WARN to ERROR the environment variable checks - I found that without these set the build would fail on Linux Mint and less experienced individuals may be mystified by the CMake fail message. This change hopefully makes the failure more obvious.

Extracted integration test module and placed into own profile.

Configured CMake Maven plugin to use native CMake by default.

Updated documentation.

Documented how to change the version of Maven to match OpenCV core and modified bash scripts accordingly.

Extracted integration test module and placed into own profile.

Configured CMake Maven plugin to use native CMake by default.

Updated documentation.
@jtkb jtkb force-pushed the maintenance/maven_build_updates branch from 4e5ae70 to ef59ca7 Compare August 8, 2017 18:43
@mshabunin mshabunin self-assigned this Aug 10, 2017
@mshabunin
Copy link
Contributor

👍

@@ -175,14 +176,14 @@
<configuration>
<rules>
<requireEnvironmentVariable>
<level>WARN</level>
<level>ERROR</level>
<variableName>ANT_HOME</variableName>
<message>$ANT_HOME is not set. Build may fail.</message>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no requirement for ANT_HOME in Ubuntu 16.04 with system Apache ant package.
The same note about JAVA_HOME (it is not required with system java jdk package)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you but this assumes that the user is building using the system packages (I am assuming you mean the repo provided ones). I for one do not use the system JDK packages and install the Oracle JDK manually. I also do not set the JAVA_HOME environment variable set, mainly because Debian alternatives handle determination of which binaries to execute and OpenCv is one of a very few instances I need to have it set. Without JAVA_HOME set I see this build error:

[INFO] [INFO] --- cmake-maven-plugin:3.4.1-b2:compile (cmake-compile) @ opencv --- [INFO] Configured to use native CMake make: *** No rule to make target 'opencv_java'. Stop.

Which to someone with a similar installation as mine i.e. using Oracle JDK may not link to JAVA_HOME not being set.

Consequently I decided to change these two checks to Error in an attempt to provide clear failure reason.

@vpisarev vpisarev merged commit 31348f8 into opencv:master Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants