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

add ant plan #919

Merged
merged 4 commits into from
Jun 21, 2016
Merged

add ant plan #919

merged 4 commits into from
Jun 21, 2016

Conversation

cullenmcdermott
Copy link
Contributor

@cullenmcdermott cullenmcdermott commented Jun 18, 2016

I saw that #881 already existed, I'm fine with whichever one the maintainers want to take. I'm having trouble installing this package with hab pkg install due to the Crypto error: No public or secret keys found for name_with_rev so I haven't been able to fully test it but I am able to use it to compile a Cassandra artifact if I build this first.

@thesentinels
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @adamhjk to be a potential reviewer


do_build() {
export JAVA_HOME=$(hab pkg path core/jdk8)
ln -s $(hab pkg path core/glibc)/lib/ld-2.22.so /lib/ld-linux-x86-64.so.2
Copy link
Contributor

Choose a reason for hiding this comment

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

this should probably be a patchelf rather than a symlink

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've update the PR to use a patchelf instead of a symlink

pkg_license=('Apache 2')
pkg_source=https://github.com/apache/ant/archive/rel/$pkg_version.tar.gz
pkg_shasum=53dbfb13e0e9bf1b34bcbfdf807c1b9df1b89362b176e1e58150906f518b2c88
pkg_deps=()
Copy link
Contributor

Choose a reason for hiding this comment

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

this will need a runtime dep of core/jdk8

@bookshelfdave
Copy link
Contributor

@cullenmcdermott looks good, I was able to start Ant after adding core/jdk8 to pkg_deps and setting JAVA_HOME.

it would be great to have a README.md that mentions:

# Ant requires JAVA_HOME to be set, and can be set via:
export JAVA_HOME=$(hab pkg path core/jdk8)

The same could be added to core/jdk8.

@bookshelfdave
Copy link
Contributor

@cullenmcdermott I added a Maven plan: #928 which builds with Ant.

pkg_name=ant
pkg_version=1.9.7
pkg_maintainer='The Habitat Maintainers <[email protected]>'
pkg_license=('Apache 2')
Copy link
Contributor

Choose a reason for hiding this comment

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

can you change the license string to read Apache-2.0, per the SPDX License List?

@smith smith mentioned this pull request Jun 21, 2016
@spuder
Copy link

spuder commented Jun 21, 2016

@metadave How are you starting ant? When I run the pkg, I get the following error.

Error: Could not find or load main class org.apache.tools.ant.launch.Launcher

curl https://raw.githubusercontent.com/cullenmcdermott/habitat-1/451481a5753ecb7b2a1cdadb16c0520201420e70/plans/ant/plan.sh > plan.sh
hab studio -k spuder enter
[0][default:/src:0]# build
...
[2][default:/src:0]# export JAVA_HOME=$(hab pkg path core/jdk8)
[3][default:/src:0]# hab pkg exec spuder/ant ant
/hab/pkgs/spuder/ant/1.9.7/20160621172825/bin/ant: line 85: uname: command not found
/hab/pkgs/spuder/ant/1.9.7/20160621172825/bin/ant: line 102: basename: command not found
/hab/pkgs/spuder/ant/1.9.7/20160621172825/bin/ant: line 115: dirname: command not found
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher

@bookshelfdave
Copy link
Contributor

@spuder my bad, I built via hab studio build ant, and then ran it in my Habitat dev shell which happens to have core/coreutils installed.

The solution is to change add core/coreutils to pkg_deps.

    pkg_deps=(core/jdk8 core/coreutils)

@spuder
Copy link

spuder commented Jun 21, 2016

Indeed adding core/coreutils to pkg_deps fixes the problem.

Looking forward to core/ant being released. (metadave/ant still has the coreutils problem).

@bookshelfdave
Copy link
Contributor

bookshelfdave commented Jun 21, 2016

@spuder metadave/ant was just a test build, I don't intend to release artifacts in that origin. However, I've pushed a build just in case someone stumbles upon it.

@cullenmcdermott
Copy link
Contributor Author

@spuder @metadave I've pushed a new commit that adds core/coreutils

@bookshelfdave
Copy link
Contributor

@cullenmcdermott great, ready for us to merge?

@cullenmcdermott
Copy link
Contributor Author

Yeah!

@bookshelfdave
Copy link
Contributor

@thesentinels r+

@thesentinels
Copy link
Contributor

📌 Commit d9af99a has been approved by metadave

@thesentinels
Copy link
Contributor

⌛ Testing commit d9af99a with merge d6b4aed...

thesentinels pushed a commit that referenced this pull request Jun 21, 2016
Pull request: #919
Approved by: metadave
thesentinels pushed a commit that referenced this pull request Jun 21, 2016
Pull request: #919
Approved by: metadave
thesentinels pushed a commit that referenced this pull request Jun 21, 2016
Pull request: #919
Approved by: metadave
thesentinels pushed a commit that referenced this pull request Jun 21, 2016
Pull request: #919
Approved by: metadave
@bookshelfdave
Copy link
Contributor

thanks @cullenmcdermott

built and pushed to the depot: https://app.habitat.sh/#/pkgs/core/ant/1.9.7/20160621210022

@thesentinels
Copy link
Contributor

☀️ Test successful - travis

@thesentinels thesentinels merged commit d9af99a into habitat-sh:master Jun 21, 2016
@cullenmcdermott cullenmcdermott deleted the add_ant_plan branch June 21, 2016 21:16
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.

5 participants