Bug 1072427 - RfE: Leiningen 2.3.4 is available
Summary: RfE: Leiningen 2.3.4 is available
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: leiningen
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Orphan Owner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1084668
TreeView+ depends on / blocked
 
Reported: 2014-03-04 14:56 UTC by Jochen Schmitt
Modified: 2023-08-22 20:14 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-02-22 15:02:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
switch leiningen from plexus embed.Embedder to DefaultPlexusContainer (782 bytes, patch)
2014-09-26 18:35 UTC, Jason Montleon
no flags Details | Diff
updated patch with updated SHARE_JARS (2.29 KB, patch)
2014-09-26 18:37 UTC, Jason Montleon
no flags Details | Diff

Description Jochen Schmitt 2014-03-04 14:56:12 UTC
I have find out, that Leiningen 2.3.4 is available on github.com.

My first look on this release show me, that this release doesn't use maven as a buildsystem. Instead Leinigen is used to build Leinigen, os you may used the shipped jar file as a bootstrapping sources to buuild Leiningen.

Comment 1 Will Benton 2014-03-04 16:05:17 UTC
Can you use older releases of Leiningen 2 to build 2.3.4?  I think that going to lein2 in general is sensible, but a build that can only be bootstrapped from upstream binaries (like gradle) is less than ideal.

Comment 2 Jochen Schmitt 2014-03-04 20:30:08 UTC
i don't know if you an build Leiningen2 on base of the existing Leiningen pakage.

Comment 3 Jochen Schmitt 2014-03-04 20:33:56 UTC
I have try i shot test by calling lein uberjar in the Leiningen directory and have got
an ugly exception. So I think you have to make a bootstrapping package like
scala to fix this issue.

Comment 4 tcrawley 2014-06-02 13:29:42 UTC
It looks like the packaged lein 1.7.1 is unable to find a class. When I try to build leiningen-core from 2.3.4, it fails with:

Exception in thread "main" java.lang.ClassNotFoundException: org.codehaus.plexus.embed.Embedder (maven.clj:1)

If I use the official lein 1.7.1 uberjar-based release (which includes org.codehaus.plexus.embed.Embedder in the jar), it works. 

lein 1.7.1 depends on maven-ant-tasks 2.1.3, which depends on plexus-utils 1.5.15, both of which get embedded in the official uberjar. When I install lein on f20, it installs maven-ant-tasks 2.1.3 and plexus-utils 3.0.14. Unfortunately, org.codehaus.plexus.embed.Embedder was removed from plexus-utils sometime between 1.5.15 and 3.0.14. 

I know nothing about how rpms are built, but if you can downgrade plexus-utils to 1.5.15, you should be able to build lein 2.3.4 with lein 1.7.1. v2.3.4 no longer uses maven-ant-tasks, so this particular version difference shouldn't matter.

Comment 5 Jim Crossley 2014-06-02 13:37:09 UTC
FWIW, 2.4.0 is expected to land within a few weeks.

Comment 6 Gilles Dubreuil 2014-06-02 23:40:07 UTC
Toby and Jim,

Thanks for your help.

Looking forward to get Fedora maintainer help too.

Comment 7 Jason Montleon 2014-09-26 18:35:59 UTC
Created attachment 941682 [details]
switch leiningen from plexus embed.Embedder to DefaultPlexusContainer

Comment 8 Jason Montleon 2014-09-26 18:37:18 UTC
Created attachment 941683 [details]
updated patch with updated SHARE_JARS

Comment 9 Jason Montleon 2014-09-26 18:42:48 UTC
Leiningen 1.7 looks to be completely broken on Fedora 20. It relies on org.codehaus.plexus.embed.Embedder as mentioned above. I think I was able to properly switch it over to org.codehaus.plexus.DefaultPlexusContainer with the attached patch.

The next problem is that the patch that adds SHARE_JARS seem to be missing a number of jars for it to work properly on Fedora 20. I have updated the patch to the point where I get stuck on maven-ant-tasks which relies on org.codehaus.plexus.embed.Embedder itself.

I'm not having much luck rewriting maven-ant-tasks-2.1.3/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java to use DefaultPlexusContainer. I'm not sure if someone who actually knows what they're doing might be able to do that, else get Leiningen using aether-ant-tasks which I guess might be another option. I've had no luck on either front thus far with this though.

Comment 10 Jason Montleon 2014-09-30 16:27:09 UTC
On Fedora 19 with leiningen 1.7 installed I am able to do the following to get 2.5.0 built: 
git clone https://github.com/technomancy/leiningen.git; cd leiningen/; git checkout stable; cd leiningen-core; lein uberjar; lein classpath > .lein-bootstrap; cd ..; bin/lein uberjar

On Fedora 20 the best I can get is git clone https://github.com/technomancy/leiningen.git; cd leiningen/; git checkout stable; cp bin/lein ~/bin; cd leiningen-core; lein bootstrap; cd ..; bin/lein uberjar

This is pulling leiningen-2.5.0-standalone.jar to start though, so less ideal. I don't see this with the Fedora 19 process outlined above. A resultant 2.5.0 fc19 rpm could probably be used to get a fc20 rpm built. A quick grep of 2.5.0 code shows that it doesn't appear to rely on plexus embed.Embedder anymore and now uses DefaultPlexusContainer.

The problem where it pulls down a bunch of jar files still exists either way.

Comment 11 Will Benton 2014-10-02 21:05:04 UTC
Jason, thanks for taking a look at this.  The immediate issue with going to lein 2 is that we'd need to get a bootstrap exception for the package.  The secondary issues will revolve around getting the lein build to work with xmvn (and with current libraries as packaged in Fedora).

Are there other projects you'd like to package for Fedora that would need lein to build?

Comment 12 Jason Montleon 2014-10-03 14:24:00 UTC
Will, I'm not sure I understand why we need a bootstrap exception if we can build 2.5.0 with 1.7.1, which is built from source.

The second issue is a big one of course. I wonder if something like this leiningen plugin for maven could be used to get this to work? 
https://github.com/abailly/lein-maven-plugin. I am planning to play around with it a bit to see if I can get it to work.

And the end goal is puppetdb, but I think between the two there are 300-500 jars; maybe on the lower end, regardless packaging is likely to take a lot of work.

Comment 13 Jason Montleon 2014-10-03 16:46:26 UTC
I managed to get Leiningen 2.5.0 built with 1.7.1 wrapped in maven using
lein-maven-plugin like so:

rm -rf leiningen ~/.lein; git clone
https://github.com/technomancy/leiningen.git; cd leiningen/; git
checkout stable; cd leiningen-core; rm -f pom.xml; cp
~/leiningen-core-maven-pom.xml pom.xml; ln -sf /bin/lein lein; mkdir
self-installs; touch self-installs/leiningen-1.7.1-standalone.jar; mvn
site; mvn compile; lein classpath > .lein-bootstrap; cd ..; ln -sf
bin/lein lein; mkdir self-installs; touch
self-installs/leiningen-2.5.0-standalone.jar cp
~/leiningen-maven-pom.xml ./pom.xml; export PATH=bin:$PATH; hash -d
lein; mvn site; mvn compile

Broken down there are source, a patched pom.xml to use the plugin, touch
a couple files so the plugin doesn't download anything and then maven
site; maven compile; maven compile basically just running lein uberjar.
That gets up leiningen-core-2.5.0-standalone.jar.

To bootstrap leiningen proper we'd probably need to include or make
available the resulting core jar, the generated (and probably modified)
.lein-bootstrap from running lein classpath > .lein-bootstrap, the
generated and modified pom.xml from running lein pom (again edited to
use the plugin), and a some linking and touching of files to prevent
attempted downloaded.

I don't think there is actually anything that couldn't be included as
patches/source so that we could get to just running mvn compile. That
means though having leiningen and lein-maven-plugin packaged and
available to maven. I'm not sure if that is viable...

This is more or less what's being added to the poms.
<plugin>
    <groupId>foldlabs</groupId>
    <artifactId>lein-maven-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
    <executions>
      <execution>
        <goals>
          <goal>lein</goal>
        </goals>
        <configuration>
          <environment>
            <PORT>4242</PORT>
          </environment>
          <targets>
            <target>uberjar</target>
          </targets>
          <leinVersion>2.5.0</leinVersion>
        </configuration>
      </execution>
    </executions>
  </plugin>

Comment 14 Fedora Admin XMLRPC Client 2014-11-20 17:21:53 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 15 Ewoud Kohl van Wijngaarden 2020-02-22 15:02:40 UTC
The package was retired in Fedora 22: https://bugzilla.redhat.com/show_bug.cgi?id=1105981#c6 and https://bugzilla.redhat.com/show_bug.cgi?id=1151781#c2


Note You need to log in before you can comment on or make changes to this bug.