Merge lp://qastaging/~mterry/snapcraft/java-and-ant into lp://qastaging/~snappy-dev/snapcraft/core

Proposed by Michael Terry
Status: Merged
Approved by: Michael Vogt
Approved revision: 98
Merged at revision: 99
Proposed branch: lp://qastaging/~mterry/snapcraft/java-and-ant
Merge into: lp://qastaging/~snappy-dev/snapcraft/core
Prerequisite: lp://qastaging/~mterry/snapcraft/deb-symlinks
Diff against target: 256 lines (+175/-4)
12 files modified
examples/java-hello-world/Makefile (+7/-0)
examples/java-hello-world/build.xml (+39/-0)
examples/java-hello-world/meta/package.yaml (+6/-0)
examples/java-hello-world/meta/readme.md (+1/-0)
examples/java-hello-world/snapcraft.yaml (+9/-0)
examples/java-hello-world/src/oata/HelloWorld.java (+10/-0)
examples/java-hello-world/wrapper (+2/-0)
plugins/ant-project.yaml (+7/-0)
snapcraft/cmds.py (+1/-1)
snapcraft/plugin.py (+3/-3)
snapcraft/plugins/ant_project.py (+45/-0)
snapcraft/plugins/jdk.py (+45/-0)
To merge this branch: bzr merge lp://qastaging/~mterry/snapcraft/java-and-ant
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+265329@code.qastaging.launchpad.net

Commit message

Add a jdk plugin and an ant-project plugin that requires the jdk.

I use whichever version of openjdk is the default for the platform we're currently on (in keeping with our general choice of "snapcraft is running on the target platform").

I assume that ant will install jar files to target/ (seems to be a common convention, but isn't 100% followed, I don't think?). We can grow support for pointing out the install directory via a flag once we know more.

This isn't a very fancy plugin yet. It doesn't handle any dependencies specified by the ant build config. But it's a start.

Description of the change

Add a jdk plugin and an ant-project plugin that requires the jdk.

I use whichever version of openjdk is the default for the platform we're currently on (in keeping with our general choice of "snapcraft is running on the target platform").

I assume that ant will install jar files to target/ (seems to be a common convention, but isn't 100% followed, I don't think?). We can grow support for pointing out the install directory via a flag once we know more.

This isn't a very fancy plugin yet. It doesn't handle any dependencies specified by the ant build config. But it's a start.

I also start the convention that $SNAP_APP_PATH/jar is a suitable place for jar files. Loic and I thought it would be fine when we were talking about it in the context of his maven plugin [1]. But I'm open to alternatives (I think Ubuntu puts them in /usr/share/java).

Speaking of the maven plugin, we could update it to require the jdk too.

[1] https://code.launchpad.net/~lool/snapcraft/mvn-plugin/+merge/265117

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Nice work! Just one minor question inside, but no blocker.

review: Approve
Revision history for this message
Michael Terry (mterry) wrote :

You were right about cp -P! I had put it in there thinking it would fix another issue I was having (not realizing that -a covers it). But the other issue was something else and I never revisited adding that option. Good catch. :)

Fixed that, merged from trunk with no changes. I'll top-approve.

Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Michael Terry (mterry) wrote :

Ouch, Tarmac caught me skipping steps. :)

mvo give this a final look over.

Revision history for this message
Michael Vogt (mvo) wrote :

Looks great, thanks! The -P is super-minor but thanks for fixing it!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches