From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hilco Wijbenga Subject: Re: Help needed from Java developer to finish maven Date: Sun, 23 Apr 2017 11:43:43 -0700 Message-ID: References: <58F9E310.4070201@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2MUR-0007Pc-V7 for guix-devel@gnu.org; Sun, 23 Apr 2017 14:44:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2MUQ-0002cs-Ja for guix-devel@gnu.org; Sun, 23 Apr 2017 14:44:08 -0400 Received: from mail-yb0-x22e.google.com ([2607:f8b0:4002:c09::22e]:35584) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d2MUQ-0002cm-F6 for guix-devel@gnu.org; Sun, 23 Apr 2017 14:44:06 -0400 Received: by mail-yb0-x22e.google.com with SMTP id 6so54178706ybq.2 for ; Sun, 23 Apr 2017 11:44:04 -0700 (PDT) In-Reply-To: <58F9E310.4070201@crazy-compilers.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: guix-devel Hi Hartmut, On 21 April 2017 at 03:46, Hartmut Goebel wrote: > I'm seeking for help from some skilled Java developer. I nearly finished > bootstrapping maven: I made it to start up, but now fails with this > error message: > > org.apache.maven.InternalErrorException: Internal error: > com.google.inject.ProvisionException: Unable to provision, see the > following errors: > > 1) null returned by binding at org.eclipse.sisu.wire.LocatorWiring > but parameter 1 of > org.eclipse.aether.transport.wagon.WagonTransporterFactory.() is > not @Nullable > while locating org.eclipse.aether.transport.wagon.WagonConfigurator > for parameter 1 at > org.eclipse.aether.transport.wagon.WagonTransporterFactory.(Unknown Source) > while locating org.eclipse.aether.transport.wagon.WagonTransporterFactory > while locating java.lang.Object annotated with * > > I assume this means some meta-date file is missing in one of the jars > (like plexus/components.xml or sisu/javax.inject.Named), but I was not > able to find any missing file or data. may. > > Any tipps? (I've been lurking on this ML, I know very little about Guix or Guile. I had hoped to use Guix for my own packages in my $HOME but that seems difficult.) When the Maven devs want to cut a new release they run Maven's thousands of unit and integration tests before offering it to the community for a test drive. Only after all that is successful, is the new Maven release announced to the world. I had a look at maven-with-guix-versions.patch and I notice that you are changing various version numbers and replacing some JARs with other JARs. Why would you do that? Why do you expect the end result to work well? Or at all? How would anyone be able to trust this patched Maven? (BTW, Logback is an SLF4J implementation so your comment there makes no sense.) You obviously put a lot of effort into this so you must have had a good reason to make those changes. I'm guessing that you have a very different goal in mind than I think you do. :-) So what is that goal? What are you trying to achieve? I'll try to take a few guesses with comments/suggestions. 1. Offer Maven as a Guix package so one can easily install Maven and be productive as a Java dev * For this scenario you don't want to change Maven. You need to be able to trust your build tool. You need to be able to get support from the Maven community which is not going to happen if your Maven is patched and behaving abnormally. * I would suggest to take the tarball available at http://maven.apache.org/download.cgi and extract it "into" the Guix store. It comes with a bunch of JARs that you could replace with links to wherever they are in the Guix store. Each could be a separate package. There are also a couple of OS specific files for Jansi which you can probably treat the same as JARs (i.e. replace with a link to somewhere else). With that and $MAVEN_HOME/bin on $PATH, Maven should work. You now have one issue left: the $MAVEN_HOME/lib/ext directory. It should be possible for a dev to put Maven extensions in that directory (Maven will pick them up automatically when starting up). I don't know how one would handle that in Guix. 2. Offer JARs as Guix packages * Don't try to build the JAR, simply download it from Maven Central (for example) and make it available in the Guix store. * The POM (or one of its parents) has information like author(s), license, and web site. If it's not available there, use a default like http://www.gnu.org if the web site is missing. 3. Offer JARs as Guix packages by building them from source * I think this is what you are aiming for? I would suggest installing Maven as in (1) and then invoking the build with "-Dmaven.repo.local=/some/tmp/location" (or with "--settings /some/tmp/location/guix-settings.xml"). Ignoring all direct and transitive dependencies of this one JAR, you're done. (After the build, you can remove /some/tmp/location.) This should actually get you pretty far because tools that use JARs would have an explicit list of necessary JARs. (Maven is a good example, the lib directory contains everything that is needed.) I hope this is of use to you. If you have more questions, ask away. Cheers, Hilco