Snapcraft and Java - experimental

Ricardo Kirkner ricardo.kirkner at canonical.com
Wed Aug 5 15:50:12 UTC 2015


Just let me shout out a quick BRAVO to everyone involved in snapcraft.

I was starting to do some experiments with snappy and having some
issues with packaging (of course I didn't start with the hello world
example, but with something a bit more complex, so I expected to be
stuck for a while). It took some time to grasp the different aspects
involved in creating a more-complex-than hello-world type of snappy
app (and I'm still trying to fully understand several aspects of it).

Then came along the blog post (and video) about snapcraft and it
seemed oh, so easy (a big plus was the nice and catchy music ;-)) so
my hopes got all high. I tried it out and while it wasn't immediately
clear how to go beyond the provided examples, the potential was
immediately visible. I finally managed to work my way around the lack
of docs (or at least my failure at finding them) by looking at the
code and some trial and error.

Then I realized that instead of having to build my package by
compiling from source, I could just use one of the provided snapcraft
helpers and port the ubuntu package instead. With some more tries I
managed to build the snappy package successfully[0].

Thank you all for snapcraft, I believe this will make a huge
difference in adoption of snappy!

[0] still getting some errors (expected) but at least I now have a
workflow I can follow to iterate

On Wed, Aug 5, 2015 at 12:05 AM, Ricardo Salveti de Araujo
<ricardo.salveti at canonical.com> wrote:
> Also adding snappy-devel.
>
> We just merged quite a few useful merge requests today, including one
> that extends our current documentation for it.
>
> The project can be found at https://launchpad.net/snapcraft, and we
> also have one PPA at
> https://launchpad.net/~snappy-dev/+archive/ubuntu/snapcraft-daily that
> includes the latest Ubuntu packages for Snapcraft (in case you want to
> give it a try).
>
> Please check the following links for further information (we should
> have a page at https://developer.ubuntu.com/snappy soon as well):
> http://bazaar.launchpad.net/~snappy-dev/snapcraft/core/view/head:/README.md
> http://bazaar.launchpad.net/~snappy-dev/snapcraft/core/view/head:/docs/intro.md
> http://bazaar.launchpad.net/~snappy-dev/snapcraft/core/view/head:/docs/tutorial.md
>
> There are a few interesting examples already at
> http://bazaar.launchpad.net/~snappy-dev/snapcraft/core/files/head:/examples/.
> By calling snapcraft under an example folder you can get the feeling
> about what is happening underneath.
>
> We are also actively working on producing a container that will offer
> a snapcraft development environment by default (hopefully to be
> released over the next few days), so you can easily run snapcraft at
> your target.
>
> Enjoy!
>
> On Mon, Aug 3, 2015 at 10:45 PM, Mark Shuttleworth <mark at ubuntu.com> wrote:
>>
>> The two core ideas for snapcraft are:
>>
>> First, a universal meta-build system that allows you to pull together
>> wildly different types of source code and build your app together with
>> all its dependencies. So for example you might download and build the
>> javascript runtime you want, together with the JRE and various Java
>> files, adding in a bunch of python for a sub-command and Go for another.
>> snapcraft lets you define handlers for classes of content, and it comes
>> with handlers for common project types like "github automake projects"
>> or "go projects" or "apache maven projects". Each of these can have
>> completely different build systems or make files; the handler takes care
>> of all that.
>>
>> We know that most cool stuff is moving far faster than the packaging
>> system, so snapcraft is designed to work directly from source wherever
>> you need, handling every type of source project from github or
>> elsewhere, and then mix in debs where that makes sense. We took a lot of
>> inspiration from the catkin tools in the ROS project, and we're keen for
>> feedback from the widest audience. Just yesterday we had a good bug
>> report asking for a cleanroom build as well as cross-build support,
>> which is very useful insight.
>>
>> Second, in order to enable people to go faster, we want to have a
>> library of pre-defined upstream source "parts". In snapcraft you
>> describe each of these parts, defining which handler to use and any
>> parameters like the version control URL and tag to use. We figure it
>> would be most useful to have many of those defined in a shared space, as
>> parts that you can just invoke by name. So "libreadline" as a named part
>> in your snap would be the source equivalent of "apt-get install
>> libreadline-dev". This idea of an apt-like system for commonly shared
>> source parts is particularly cool.
>>
>> Happy snappying,
>> Mark
>>
>> On 03/08/15 10:12, Maarten Ectors wrote:
>>> Many developers are surprised to see how easy it is to create a hello world
>>> Snappy App. However when you go and create a complex application, packaging
>>> it as a Snap becomes harder. This is why we launched Snapcraft
>>> <https://launchpad.net/snapcraft>. Snapcraft allows anybody to create
>>> plugins to support their favourite programming language, platform,
>>> packaging solution, etc. Snapcraft is still experimental but with your help
>>> we can make it super easy for anybody to create snaps in any language and
>>> for any platform.
>>>
>>> As a preview here you can see how easy it is to package a JDK, Tomcat and
>>> your favourite war:
>>> https://insights.ubuntu.com/2015/08/03/java-on-snappy/
>>>
>>> If you like Snapcraft, please upvote the blog post on Hacker News:
>>> https://news.ycombinator.com/item?id=9994563
>>>
>>
>>
>>
>> --
>> snappy-app-devel mailing list
>> snappy-app-devel at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snappy-app-devel
>
>
>
> --
> Ricardo Salveti de Araujo
>
> --
> snappy-devel mailing list
> snappy-devel at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snappy-devel



More information about the snappy-app-devel mailing list