Clojure

sources jar has bad versions.properties resource

Details

  • Type: Defect Defect
  • Status: Reopened Reopened
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.4, Release 1.5
  • Fix Version/s: Release 1.6, Release 1.7
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code
  • Approval:
    Vetted

Description

The "sources" jar (at least since Clojure 1.4 and including 1.5 RC) has a bad version.properties file in it. The resource clojure/version.properties is literally:

version=${version}

The regular Clojure jar has the correct version string in that resource.

I came across a problem when I was experimenting with the sources jar (as used by IDEs). I naively added the sources jar to my classpath, and Clojure died on start up. The bad clojure/versions.properties file was found first, which led to a parse error as the clojure version was being set.

Solution: patch leaves version.properties file out of sources JAR, where it causes problems for tools.

Activity

Hide
Steve Miner added a comment -

Notes from the dev mailing list:

The "sources" JAR is generated by another Maven plugin, configured here:
https://github.com/clojure/clojure/blob/clojure-1.5.0-RC15/pom.xml#L169-L181

The simplest solution might be to just exclude the file from the sources jar. It looks like maven-source-plugin has an excludes option which would do the trick:

http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html#excludes

Show
Steve Miner added a comment - Notes from the dev mailing list: The "sources" JAR is generated by another Maven plugin, configured here: https://github.com/clojure/clojure/blob/clojure-1.5.0-RC15/pom.xml#L169-L181 The simplest solution might be to just exclude the file from the sources jar. It looks like maven-source-plugin has an excludes option which would do the trick: http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html#excludes
Stuart Sierra made changes -
Field Original Value New Value
Assignee Stuart Sierra [ stuart.sierra ]
Stuart Sierra made changes -
Patch Code [ 10001 ]
Approval Vetted [ 10003 ]
Attachment 0001-CLJ-1161-Remove-version.properties-from-sources-JAR.patch [ 11861 ]
Labels patch
Stuart Halloway made changes -
Approval Vetted [ 10003 ] Triaged [ 10120 ]
Rich Hickey made changes -
Approval Triaged [ 10120 ] Vetted [ 10003 ]
Rich Hickey made changes -
Fix Version/s Release 1.6 [ 10157 ]
Fix Version/s Release 1.5 [ 10150 ]
Stuart Halloway made changes -
Assignee Stuart Sierra [ stuart.sierra ] Stuart Halloway [ stu ]
Stuart Halloway made changes -
Approval Vetted [ 10003 ] Screened [ 10004 ]
Description The "sources" jar (at least since Clojure 1.4 and including 1.5 RC) has a bad version.properties file in it. The resource clojure/version.properties is literally:

version=${version}

The regular Clojure jar has the correct version string in that resource.

I came across a problem when I was experimenting with the sources jar (as used by IDEs). I naively added the sources jar to my classpath, and Clojure died on start up. The bad clojure/versions.properties file was found first, which led to a parse error as the clojure version was being set.
Summary: patch leaves version.properties file out of sources JAR, where it causes problems for tools.

The "sources" jar (at least since Clojure 1.4 and including 1.5 RC) has a bad version.properties file in it. The resource clojure/version.properties is literally:

version=${version}

The regular Clojure jar has the correct version string in that resource.

I came across a problem when I was experimenting with the sources jar (as used by IDEs). I naively added the sources jar to my classpath, and Clojure died on start up. The bad clojure/versions.properties file was found first, which led to a parse error as the clojure version was being set.
Alex Miller made changes -
Description Summary: patch leaves version.properties file out of sources JAR, where it causes problems for tools.

The "sources" jar (at least since Clojure 1.4 and including 1.5 RC) has a bad version.properties file in it. The resource clojure/version.properties is literally:

version=${version}

The regular Clojure jar has the correct version string in that resource.

I came across a problem when I was experimenting with the sources jar (as used by IDEs). I naively added the sources jar to my classpath, and Clojure died on start up. The bad clojure/versions.properties file was found first, which led to a parse error as the clojure version was being set.
The "sources" jar (at least since Clojure 1.4 and including 1.5 RC) has a bad version.properties file in it. The resource clojure/version.properties is literally:

{code}
version=${version}
{code}

The regular Clojure jar has the correct version string in that resource.

I came across a problem when I was experimenting with the sources jar (as used by IDEs). I naively added the sources jar to my classpath, and Clojure died on start up. The bad clojure/versions.properties file was found first, which led to a parse error as the clojure version was being set.

*Solution:* patch leaves version.properties file out of sources JAR, where it causes problems for tools.
Rich Hickey made changes -
Approval Screened [ 10004 ] Ok [ 10007 ]
Stuart Halloway made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]
Hide
Jeff Valk added a comment -

This issue is marked closed, but I'm still seeing it: the clojure-1.6.0-sources.jar, clojure-1.5.1-sources.jar, etc on Maven Central still contain the bad version.properties files. More specifically, it looks like the fix has been applied to builds in the SNAPSHOTS repository, but not to RELEASES.

Fix applied: https://oss.sonatype.org/content/repositories/snapshots/org/clojure/clojure/
Not fixed: https://oss.sonatype.org/content/repositories/releases/org/clojure/clojure/

Show
Jeff Valk added a comment - This issue is marked closed, but I'm still seeing it: the clojure-1.6.0-sources.jar, clojure-1.5.1-sources.jar, etc on Maven Central still contain the bad version.properties files. More specifically, it looks like the fix has been applied to builds in the SNAPSHOTS repository, but not to RELEASES. Fix applied: https://oss.sonatype.org/content/repositories/snapshots/org/clojure/clojure/ Not fixed: https://oss.sonatype.org/content/repositories/releases/org/clojure/clojure/
Alex Miller made changes -
Approval Ok [ 10007 ] Vetted [ 10003 ]
Status Closed [ 6 ] Reopened [ 4 ]
Resolution Completed [ 1 ]
Alex Miller made changes -
Labels patch
Alex Miller made changes -
Fix Version/s Release 1.5 [ 10150 ]
Fix Version/s Release 1.7 [ 10250 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: