Daniel Pocock: Automatically building Java projects
Another of the GSoC project areas I have offered to mentor involves automatically and recursively building Java projects.
Why is this important?
Recently, I decided to start using travis-ci to automatically build some of my Java projects.
One of the projects, JMXetric, depends on another, gmetric4j. When travis-ci builds JMXetric, it needs to look in Maven repositories to find gmetric4j (and also remotetea / oncrpc.jar and junit). The alternative to fetching things from repositories is to stop using Maven and ship the binary JARs of dependencies in the JMXetric repository itself, which is not desirable for various reasons.
Therefore, I submitted gmetric4j into the Maven Central repository by using the Sonatype Nexus service. One discovery I made in this process disturbed me: Sonatype allows me to sign and upload my binary JAR, they don't build it from source themselves, so users of the JAR have no way to know that it really is built from the source I publish in Github.
In fact, as anybody who works with Java knows, there is no shortage of Java projects out there that have a mix of binary dependencies in their source tree, sometimes without any easy way to find the dependency sources. HermesJMS is one popular example that is crippled by the inclusion of some JARs that are binary-only.
No silver bullet, but there is hope
Although there are now tens of thousands of JAR libraries out there in repositories and projects that depend on them (and their transitive dependencies and build tools and such), there is some hope:
- Many JARs provide a -source JAR including source. This doesn't include all of the build artifacts of a true source package or source tarball, it just provides a subset of the source for use with a debugger.
- Many Maven pom.xml files now include metadata about where the source is located - example
- The data set:
- A database schema, tracking each binary artifact, the source repository location (e.g. Git or SVN URL), source tarball location, source JAR availability and dependency relationships (including versions)
- A local Maven repository - only containing JARs that we have built locally from some source
- A set of Git repositories to mirror the upstream repositories of projects that need to be tweaked.
- Tool set:
- A web interface or command line tool would be necessary for a user to kick-start the process by specifying some artifact they want to build
- There would need to be a script that tries to work out all the possible ways to get the source for an artifact (e.g. by looking for a Git URL in the pom.xml from the Maven Central repository). This script would be able to do other things, like identifying the existence of -source JARs which may or may not be sufficient to build the artifact.
- A script would need to be created for testing the artifact's source tarball or repository for binary artifacts (e.g. copies of junit.jar). Whenever such things were found, the script would mirror the repository into our local git and create a branch with binaries removed. A record of the binaries would be added to the local database so we can symlink them from a trusted source when building.
- A script would need to be created for testing whether the project includes a recognised build system (such as build.xml for ant or pom.xml for Maven). For projects without such artifacts, the script would need to generate a template build.xml and store it in a local clone of the repository
- Jenkins would be used to build the JARs. A script would need to be created to build the Jenkins job config file for the artifact, pointing Jenkins to the upstream Git or the local Git repository depending upon the situation.
- If the project is a Maven or Ivy project, then there are likely to be attempts to find dependencies during the build process. Running under Jenkins, these tools would be configured in such a way that they only look to the local repository and use dependencies that we have already built. If the build fails during dependency resolution, this is where the recursive process would kick off: the attempt to find each missing dependency would be logged to a queue, and the requests in this queue would each be handled by restarting the whole process again at the beginning. Each of these requests would also be logged to the database.
- Sometimes, the system would be unable to proceed (e.g. because there are no clues about source locations in a given pom.xml). A user interface would need to be constructed to show a list of artifacts with exceptions and allow the user to manually locate the source and supply the URLs. The system would then continue iterating with this new data.
- Reporting: we already know that for some JARs, we will simply fail to make any progress and we are not going to lose any sleep over that. The important thing is to provide accurate reports to help people make decisions that may involve working around those JARs in future:
- For what percentage of projects could we determine the license from the pom.xml? Reports on licensing: can we spot any license mismatch in the dependency hierarchy?
- Tools: which build tools in the chain of dependencies don't provide any source code? Are they optional tools (such as code quality analysis) that we can skip in the build process (e.g. by producing a mock version of the tool or plugin)?
- Which non-free/sourceless JARs are most widely depended upon by other projects in the free Java eco-system? Can we make a list of the top 10 or 20?
- Abandonware: can we detect JARs that haven't been updated for an extended period of time, with no activity in the source repository? For these projects in particular, it is a really good idea to make backups of the source repositories (or mirrors of their web sites and source download directories) in case they disappear altogether.
First step will be getting a NetBSD ISO image for installation
purpose. It can be downloaded from
As a sidenote, despite the use of
Only the end closing the connection first will reach the
It should be noted that when a connection is reused, the TWRecycled
counter is increased (despite its name).
Did you ever want to be able to tag your files, and use the tags to query
and select the files you want? For many sorts of files we use, this is clearly
better than being locked into a single hierarchial view of nested directories.
This is the 2nd point release of OpenStack Havana (this is the name of the current stable release of OpenStack). It was out on Thursday (US time), and I uploaded it on Friday (Chinese time). Unfortunately, I realized that the latest python-keystoneclient didn t support the token and endpoint command line options, effectively breaking Keystone itself, and all automated endpoint registration in all core packages. So after fixing Keystone and openstack-pkg-tools, I had to re-upload a 2nd Debian release.
However, after this glitch, the packages passed successfully our CI testing suite: my friends at eNovance and I run the tempest functional test suite each time there s this kind of major update, so that we can validate the packages are working as expected. And all went well after the new keystone command line options were fixed in the postinst scripts.
As a side note, I fail to see consistency on deprecating these interfaces. While we still have the old glance index thing in the Glance client (this is really old), keystoneclient just broke backward compatibility, when keystone is quite recent. So, it looks to me that it wasn t a great idea to just remove token and endpoint this way (though I can understand the need of consistency). Hopefully, this will all be fixed anyway, when we move to the unified python-openstackclient command lines instead of per-project clients.
I realized today that the pkg-openstack team now
After so many attempts to have my shiny Movistar Peru (Internet M vil) 3G ZTE MF193 modem to work out-of-the-box in Debian jessie (unstable) with NetworkManager, the word frustration was hitting on my head. Even trying to do
I have always loved
I want Zoe to do one "extra curricular" activity per term this year. Something
dance-related, something gymnastics-related and maybe some other form of sport
(I'm thinking soccer). My girlfriend and I were wandering through
This is something different. It is something special. She is something special. I don't even remember how I stumbled upon her, actually. I think it was some suggested video somehow.
I feel deeply sorry for those who don't understand German. But that's the way it is, the text is in German. And it's touching. Take your time, listen to it in a relaxed environment, when you don't have any distraction.



The decision on which init system to use has plagued Debian for a
fairly long time now. We've had people talking about it as early as
debconf11 in Banja Luka, and we still haven't got a
decision. Instead, the decision has been going round in circles, in a
typical bikeshed fashion.
Originally, my opinion on the subject was "sysv-rc is good enough for
everyone, and it's portable, which other alternatives aren't".
By now, however, I've become convinced that the first part of that
statement isn't true, and that as a result a switch of a default init
system is indeed appropriate; that we should indeed switch to "something
else", at least for our Linux ports.
Once I came to that conclusion, my opinion on what, exactly, we
should use turned out to be nonexistent. That is, I don't care. Anything
will be fine.
What is bothering me, though, is that things keep dragging on and on
and on and on and on and on and on, ad infinitum.
We should just pick one and be done with it, dammit. The
fact that sysv-rc is replaced by "something else" does not mean people
must stop using sysv init scripts. Even if the maintainer of
some random package "foo" refuses to accept patches to support sysv-rc
for his package, there's nothing stopping anyone from providing a
package "sysv-support" containing init scripts (and nothing else) for
sysv-rc.
The same goes for a hypothetical upstart-support or systemd-support
package, of course: if you want to continue living in the stone age and
keep using sysv-rc forever, then there is nothing stopping
you. Even if we decide to use something else for our Linux
ports.
Ideally the non-Linux ports would move to something more modern too;
but there really really really isn't any reason why it would be
a problem if they didn't.
Can we stop painting the bikeshed now? If we don't, soon we'll have
to call it "hunk of paint with some bikes inside" rather than
"bikeshed".
Thanks.
First row (nice projects), from left to right:
A new major release 0.4.0 of