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

env.JAVA_HOME undefined #76

Closed
andredasilvapinto opened this issue Jul 9, 2014 · 6 comments
Closed

env.JAVA_HOME undefined #76

andredasilvapinto opened this issue Jul 9, 2014 · 6 comments
Milestone

Comments

@andredasilvapinto
Copy link
Contributor

I was getting these errors while building the project:

[ERROR] The project com.betfair.cougar:cougar-test-utils:3.1-SNAPSHOT (/home/andresp/git/cougar3/cougar-test/cougar-test-utils/pom.xml) has 1 error
[ERROR] 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${env.JAVA_HOME}/lib/tools.jar @ line 47, column 16
[ERROR]
[ERROR] The project com.betfair.cougar:cougar-client-code-tests:3.1-SNAPSHOT (/home/andresp/git/cougar3/cougar-test/cougar-client-code-tests/pom.xml) has 1 error
[ERROR] 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${env.JAVA_HOME}/lib/tools.jar @ line 127, column 25

replacing ${env.JAVA_HOME} with ${java.home} on the referred lines fixed the problem.

@eswdd
Copy link
Contributor

eswdd commented Jul 10, 2014

JAVA_HOME is a pretty standard environment variable, we’ve had probe using java.home in the past as sometimes it gets set to the jre. At least this way you can ensure it’s a jdk, so just set it in your environment.

We can add to some building notes when we get round to it ;)

On 9 Jul 2014, at 16:59, André Pinto notifications@github.com wrote:

I was getting these errors while building the project:

[ERROR] The project com.betfair.cougar:cougar-test-utils:3.1-SNAPSHOT (/home/andresp/git/cougar3/cougar-test/cougar-test-utils/pom.xml) has 1 error
[ERROR] 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${env.JAVA_HOME}/lib/tools.jar @ line 47, column 16
[ERROR]

[ERROR] The project com.betfair.cougar:cougar-client-code-tests:3.1-SNAPSHOT (/home/andresp/git/cougar3/cougar-test/cougar-client-code-tests/pom.xml) has 1 error
[ERROR] 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${env.JAVA_HOME}/lib/tools.jar @ line 127, column 25

replacing ${env.JAVA_HOME} with ${java.home} on the referred lines fixed the problem.


Reply to this email directly or view it on GitHub.

@andredasilvapinto
Copy link
Contributor Author

I have JAVA_HOME defined as an environment variable. The problem is with ${env.JAVA_HOME}. I don't know why Maven is not picking that environment property on my system, nevertheless the official documentation says we should use ${java.home}:

env.JAVA_HOME
Contains the Java installation directory. This can point to either a Java Development Kit (JDK) installation or a Java Runtime Environment (JRE). Instead of using this, you should consider referencing the ${java.home} property.

in http://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-properties.html

@andredasilvapinto
Copy link
Contributor Author

@eswdd
Copy link
Contributor

eswdd commented Jul 10, 2014

I build the current code just fine on a mac, without any ref to classes.jar, I don't fancy hacking our profiles like that...

As for java.home, once the travis build is passing, submit a pull request and if travis passes then we'll include it.

@andredasilvapinto
Copy link
Contributor Author

My intention with the stackoverflow post was just to show a typical configuration for the JDK tools dependency using java.home.

@eswdd
Copy link
Contributor

eswdd commented Jul 10, 2014

Ah ok
On 10 Jul 2014 14:56, "André Pinto" notifications@github.com wrote:

My intention with the stackoverflow post was just to show a typical
configuration for the JDK tools dependency using java.home.


Reply to this email directly or view it on GitHub
#76 (comment).

@eswdd eswdd closed this as completed in a8fe6e2 Jul 10, 2014
@eswdd eswdd added this to the Release 3.2.0 milestone Jul 11, 2014
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

No branches or pull requests

2 participants