Issue Details (XML | Word | Printable)

Key: SPR-1383
Type: Improvement Improvement
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Ben Hale
Reporter: Fabrizio Giustina
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Framework

add version number to jars and produce separate source jars for modules [build.xml patch]

Created: 15/Oct/05 09:24 AM   Updated: 18/Sep/07 10:09 AM   Resolved: 18/Sep/07 09:20 AM
Component/s: None
Affects Version/s: 1.2.5
Fix Version/s: 2.5 RC1

Time Tracking:
Not Specified

File Attachments: 1. File spring-buildxml-versioned-jars.diff (11 kB)

Issue Links:
Depends
 
Duplicate
 


 Description  « Hide

Actually jars generated by a binary builds don't have the version number in the name; the attached patch modify build.xml so that generated files are named with spring-{module}-{version}.jar.
That's the maven standard way of naming jars and makes also easier for users to keep track of versions they are using (at the moment the version is only specified in the manifest)... having the version number in the jar is a kind of standard after all.

The patch also adds a new "modulesources" target which generated source archives (spring-{module}-{version}-sources.jar) for each of the modules (at the moment only a single zip files is geneated). Note that the target is not included by default in standard builds.



Fabrizio Giustina added a comment - 15/Oct/05 09:24 AM

build.xml dill


Juergen Hoeller added a comment - 15/Oct/05 11:45 AM

Well, the jar file naming has been discussed numerous times over the past couple of years... We did decide against having the version number in the jar file names back then. For a further example, note that Hibernate still doesn't include the full version number in the default jar file name either; neither does Struts.

I know that Maven wants the version number in there. But on the other hand, that becomes a burden when updating jar files in CVS and/or in IDE classpath lists, given that the name changes all the time, even for point releases. So currently, people have to rename the jar files themselves when using them in Maven, which should be acceptable...

Juergen


Fabrizio Giustina added a comment - 16/Oct/05 03:57 AM

Sorry, I didn't know that this argument was already discussed in the past and you explicitely decided to not to have the version number in the file...
you are correct, there are other examples of distributions which don't include the version number in the jar, but they are IHMO a few exceptions, probably 99% of the distributions now do that (btw, also Struts is moving to maven, so it will have version numbers in jar names, see: http://svn.apache.org/builds/struts/maven/trunk/site-test/ )

Anyway, what about committing the changes in build.xml as separate ant targets (let's say "modulejars-versioned", "modulesources-versioned" or anything else) so that at least maven users can build their jars without having to rename them manually every time?

fabrizio


Carlos Sanchez added a comment - 19/Jun/06 05:37 PM

This is related to SPR-1484, for Maven support in Spring


Ben Hale added a comment - 18/Sep/07 09:20 AM

Per Juergen's comment, we're not going to version the JARs in the distributable. For Maven users, there is a `maveninstall` target that will properly install the JARs in a users local repository with the proper version numbers. As well, there will be a Maven nightly snapshot repository created for Spring.


Fabrizio Giustina added a comment - 18/Sep/07 10:02 AM

Hi Ben,
what about the generation of source jars? AFAIK that is still missing in the 'maveninstall' target and source jars are not available in the maven repository.
Ok for not versioning jars, but could you at least add the "modulesources" target to the build.xml?


Ben Hale added a comment - 18/Sep/07 10:09 AM

The sources are actually being created right now as part of the distributable for 2.5 and beyond. Check the 2.5-rc1-with-dependencies snapshots (http://static.springframework.org/downloads/nightly/snapshot-download.php?project=SPR). Note that this functionality isn't going to be backported.

Also, the maveninstall task does upload the sources as well.