Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Gradle task for building zip with dependencies [SPR-6575] #11241

Closed
spring-projects-issues opened this issue Dec 17, 2009 · 24 comments
Closed
Labels
has: votes-jira Issues migrated from JIRA with more than 10 votes at the time of import type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Dec 17, 2009

Keith Donald opened SPR-6575 and commented

Several classes of users would benefit from a -with-dependencies.zip download in addition to the regular spring-framework download:

  1. Those who do not yet use automated dependency management tool such as Maven or Ivy
  2. Those behind corporate firewalls that cannot access remote repositories such as Maven Central or the EBR

Spring Web Flow, also using the "Spring Build" Ant+Ivy-based build system, originally published one .zip without dependencies, but added back a -with-dependencies.zip after user demand. To make it work, we added a few customizations to the package-top-level.xml fragment here: https://src.springframework.org/svn/spring-webflow/branches/spring-webflow-2.0-maintenance/build-spring-webflow/package-top-level.xml


Affects: 3.0 GA

Issue Links:

Referenced from: commits 5fe0804, e5bbec7

27 votes, 18 watchers

@spring-projects-issues
Copy link
Collaborator Author

Marcel Overdijk commented

+1 Reason as explained above. Hope this with-dependencies.zip also contains docs.

@spring-projects-issues
Copy link
Collaborator Author

Robert Pond commented

+1. I am on a closed network so I can't access the maven repositories or download dependencies on my own and transfer them over. I have always used the zip with dependencies because Spring is already an approved software package that is brought onto the closed system.

@spring-projects-issues
Copy link
Collaborator Author

Ronald R. DiFrango commented

+1 I am behind corporate firewalls that cannot access remote repositories such as Maven Central or the EBR.

@spring-projects-issues
Copy link
Collaborator Author

Anthony Falabella commented

My team doesn't use Maven or Ivy, we're behind a firewall, and Spring is already an approved software package. The firm I work for is one of the top financial firms and we have hundreds of developers actively using Spring.

Having been the first person to have Spring approved for use in our company, I know first-hand how difficult it is to get our review board to approve a third-party library. To then have to do the same for many of the third-party libraries Spring used to bundle is an extremely lengthy process and quite frankly some of those libraries may never be approved on their own.

That being said by no longer offering the "-with-dependencies.zip" file it will certainly hinder the adoption of the new release in our company.

Please consider offering this zip to the user community.

@spring-projects-issues
Copy link
Collaborator Author

Marcel Overdijk commented

Also e.g. including com.springsource.javax.inject-0.9.0.PFD.jar (I don't know if it's the latest version though)

@spring-projects-issues
Copy link
Collaborator Author

David Victor commented

Have also had to use the with deps distro before due to corporate network environment.
It's a nice to have.

@spring-projects-issues
Copy link
Collaborator Author

Andrew Fink commented

+1 for with-dependencies.zip

@spring-projects-issues
Copy link
Collaborator Author

Steve Bossie commented

I work in a large IT services and application development firm with hundreds of developers using Spring, which is an approved software package. It is difficult to get our review board to approve third-party libraries. Requesting separate approval for the third-party libraries on which Spring depends would be an extremely lengthy process. The bundle solves this problem. Bottom line: We might not be able to upgrade to 3.0 without the "-with-dependencies.zip" bundle.

@spring-projects-issues
Copy link
Collaborator Author

William Bailey commented

My reasons are the same as many others. I am in an environment where Maven is not being used and Ant build scripts are the norm. Tracking down each individual dependency individually is too time consuming and error prone so I will just not be able to use Spring 3 regrettably. I am currently in the process of downloading the older 2.5.6 release for this very reason.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

William, note that you can easily add third-party jars from the 2.5.6 distribution and run Spring 3.0 against them. There are only very few cases where Spring 3.0 requires a newer version of a dependency, such as Tiles (where it's 2.1 instead of 2.0 now), Hessian (where it's 3.2 or above now), and JUnit (where it's 4.5 or above now). In most cases, we keep supporting a range of older versions: in particular for existing apps where you can simply drop in new Spring jars and keep using your existing libraries as-is. This is very much an intended and supported use of Spring 3.0 too.

Steve, this should also be relevant for you: If you're using Spring 2.5 already, simply keep using your existing library versions and update to the Spring 3.0 frameworks jars only. This should work just fine for a start and is fully supported, with very few exceptions such as the ones listed above (which should be easy enough to resolve manually if necessary).

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Marcel Overdijk commented

@Juergen Hoeller: Using libs from 2.5.x release this is a good workaround for people who can't download or get approval of 3th party downloads.
But it doesn't take away the fact that a -with-dependencies.zip would be very useful (also for in the future; 3th party libs will get updated one day).

@spring-projects-issues
Copy link
Collaborator Author

Andrew Fink commented

@Juergen Hoeller: You can't use Spring 3.0 just as drop-in replacement. Old Spring.jar 2.5 contains org.aopalliance package but 3.0 jars not! You must aopalliance.jar and put it in classpath.

@spring-projects-issues
Copy link
Collaborator Author

matthew commented

I am also on a closed network and very eager to upgrade to the latest spring. I will probably try the 2.5.6 dependencies with the above mentioned additions but would really appreciate a with-dependencies.zip. If anyone finds any other dependencies that also need to be upgraded from 2.5.6 can they please post them here also.

@spring-projects-issues
Copy link
Collaborator Author

Keith Donald commented

The dependent libraries Spring 3.0.x builds against are now shipped in a with-dependencies .zip distribution. This distribution should become available in the next nightly build, will be available in the upcoming 3.0.1 release, and will continue to be available in future 3.0.x releases.

The with-dependencies.zip distribution puts the dependencies in the "projects/ivy-cache" sub-directory of the distribution. This directory is a local Ivy repository, which means dependencies are organized by their organization and artifact identifiers; for example, "org.hibernate". Binary and source jars are included for each dependency.

Note: artifact ids and jar file names adhere to naming conventions established by the "Enterprise Bundle Repository" (EBR), which is the Maven/Ivy repository Spring itself builds against. Practically speaking, this means each dependency and any of its transitives are OSGi-compatible artifacts.

More information on EBR artifact naming conventions can be found at http://www.springsource.com/repository/app/faq and http://blog.springsource.com/2009/12/02/obtaining-spring-3-artifacts-with-maven.

Nightly builds can be found at http://static.springsource.org/downloads/nightly/snapshot-download.php?project=SPR.

@spring-projects-issues
Copy link
Collaborator Author

Rob Fisher commented

I am using JTA with Hibernate configured with Spring.

The amount of issues I have upgrading to Spring 3.0 was a nightmare.

I upgraded to build spring-framework-3.0.0.M3 to be exact and started my server.

I first got this error:

[#|2010-02-11T21:29:50.171-0500|SEVERE|glassfish|javax.enterprise.system.container.web|_ThreadID=15;_ThreadName=Thread-5;|WebModule[/NaturalEarth]PWC1275: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodIntercepto

I discovered I needed aopalliance-alpha1.jar and then got this error:

[#|2010-02-11T22:04:16.687-0500|SEVERE|glassfish|org.springframework.web.context.ContextLoader|_ThreadID=15;_ThreadName=Thread-5;|Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySqlDataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice

I discovered I further needed aopalliance.jar.

Now I get this error:

SEVERE: Error:/nException:/nBean named 'org.springframework.transaction.interceptor.TransactionInterceptor#0' must be of type [org.aopalliance.aop.Advice], but was actually of type [org.springframework.transaction.interceptor.TransactionInterceptor]

So I get 3.0.1.CI-578-with-dependencies from your nightly builds and I get DAO jar(s) are missing.

I had to rollback to 2.5 again.

This is how I have my applicationContext.xml set up for transactions:

<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>

<tx:annotation-driven transaction-manager="transactionManager"/>

Perhaps I have it wrong?
Or should I be using HibernateTransactionManager instead and abort on JTA?

@spring-projects-issues
Copy link
Collaborator Author

Rob Fisher commented

Ok solved the problem.
I appears that aopalliance-alpha1.jar and aopalliance.jar both have the interceptor folder in it with conflicting classes. If you change the order of the way in which your jars are loaded, load aopalliance.jar first because there is something wrong with the interceptor classes in aopalliance-alpha1.jar which causes the "SEVERE: Error:/nException:/nBean named 'org.springframework.transaction.interceptor.TransactionInterceptor#0' must be of type [org.aopalliance.aop.Advice], but was actually of type [org.springframework.transaction.interceptor.TransactionInterceptor]" error!

Keith you guys got to get Spring 3 with dependencies jar together because currently it is mess. You can't expect everyone to know how to use Maven either.
It's things like these that drive companies to go with .Net which I hate to see.
;)

@spring-projects-issues
Copy link
Collaborator Author

aravind yarram commented

The -with-dependencies.zip is not available for 3.0.5.RELEASE. We need this pls.

@spring-projects-issues
Copy link
Collaborator Author

Vanessa Williams commented

We don't use Maven and never will. Nor Ivy. Right now, using Spring 3.0 is an un-atainable dream. Please provide a -with-dependencies download or we're shut out. Thanks.

@spring-projects-issues
Copy link
Collaborator Author

Anthony Falabella commented

They've added dependencies for some of the versions but not all of them. Look at 3.0.1.RELEASE-A and 3.0.2.RELEASE. They should be pretty much current for 3.0.5 (careful though as 3.0.2 doesn't seem to have all the libs that 3.0.1 has - we combined the two for our needs).

@spring-projects-issues
Copy link
Collaborator Author

Idle commented

Spring Framework 3.0.2.RELEASE was the last release where the -dependencies.zip was released.
It would be of great help if you guys please bundle every framework with all the dependencies.
Not everyone uses Maven [the HELL]. So, it will be quite helpful if you can bundle everything together when you release a framework.

Please!!!!

@spring-projects-issues
Copy link
Collaborator Author

Chris Beams commented

We are currently looking into re-introducing the -with-dependencies zip for public download in future releases of the framework. In the meantime, please keep in mind that you can build the framework from a tag (e.g. spring-framework-3.0.6.RELEASE) and generate the -with-dependencies.zip locally.

Instructions for building the framework can be found here: http://blog.springsource.com/2009/03/03/building-spring-3/

In step 2 of the instructions, replace the ant command with ant clean-integration jar package. When the build completes, you'll find the -with-dependencies.zip under the build-spring-framework/target/artifacts directory.

Our apologies for the inconvenience.

@spring-projects-issues
Copy link
Collaborator Author

Idle commented

Thanks Chris.
Hope to see -with-dependencies zip real soon with the release of next version of framework.

Also, thanks for the link for steps on building the framework from the source.

@spring-projects-issues
Copy link
Collaborator Author

Chris Beams commented

commit e5bbec7e2b322f280cffc540d3419baefd29d187
Author: Chris Beams <cbeams@vmware.com>
Date:   Tue Jun 19 16:00:22 2012 +0200

    Add Gradle task for building zip with dependencies
    
    Some Spring Framework users and teams cannot use transitive dependency
    management tools like Maven, Gradle and Ivy. For them, a `distZip` task
    has been added to allow for creating a Spring Framework distribution
    from source that includes all optional and required runtime
    dependencies for all modules of the framework.
    
    This 'dist-with-deps' zip is not published to the SpringSource
    repository nor to the SpringSource community download page. It is
    strictly an optional task introduced as a convenience to the users
    mentioned above.
    
    Detailed instructions for building this zip locally have been added to
    the wiki and the README has been updated with a link to that new doc.
    
    Issue: SPR-6575
$ git remote show springsource | grep Fetch
  Fetch URL: git@github.com:SpringSource/spring-framework.wiki.git

$ git log -1
commit 0e3ddf0487f7ea5c66bd54e3396e0828954052f4
Author: Chris Beams <cbeams@vmware.com>
Date:   Tue Jun 19 07:34:31 2012 -0700

    Add 'Building a distribution with dependencies' page
    
     - Add page with instructions for building 'dist-with-deps' zip
     - Link to that page from the 'Downloading Spring artifacts' page
     - Link to that page from the 'Home' page
    
    Issue: SPR-6575

https://github.com/SpringSource/spring-framework/wiki/Building-a-distribution-with-dependencies

@spring-projects-issues
Copy link
Collaborator Author

Chris Beams commented

Updated issue Summary, Type and Component to reflect actual implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has: votes-jira Issues migrated from JIRA with more than 10 votes at the time of import type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant