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

Spring Framework 3.0.0 binding should include Joda as a dependency in the POM [SPR-6512] #11178

Closed
spring-projects-issues opened this issue Dec 3, 2009 · 4 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Ben Alex opened SPR-6512 and commented

Spring Framework 3 binding infrastructure (specifically the org.springframework.format.datetime.joda package) has runtime dependencies on the Joda library for advanced date handling. It may therefore be useful if the following dependency was therefore added to the relevant POM:

<dependency>
<groupId>org.joda</groupId>
<artifactId>com.springsource.org.joda.time</artifactId>
<version>1.6.0</version>
</dependency>
A benefit of this is you specify the Joda version you've designed and tested the org.springframework.format.datetime.joda against, which will help ensure end user projects (which would rarely use Joda themselves and have a specific version preference) can receive the correct dependency in a transitive manner.


Affects: 3.0 RC3

@spring-projects-issues
Copy link
Collaborator Author

Martin Vanek commented

Could it be <optional>true</true> pls?

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Indeed, we can only really add it as an optional dependency... Otherwise we'd drag in JodaTime for any use of the spring context module.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Costin Leau commented

From what I can see, the RC3 artifacts do have the joda time dependency. I can see the following in the spring-context pom:

<dependency>
  <groupId>org.joda</groupId>
  <artifactId>com.springsource.org.joda.time</artifactId>
  <version>1.6.0</version>
  <optional>true</optional>
</dependency>

and the following in the pom of my local org.springframework.context pom:

<dependency>
  <groupId>org.joda</groupId>
  <artifactId>com.springsource.org.joda.time</artifactId>
  <version>1.6.0</version>
  <optional>true</optional>
</dependency>

Am I missing something?

@spring-projects-issues
Copy link
Collaborator Author

Ben Alex commented

I confirm Joda is registered as an optional dependency in the SFW 3.0.0.RC3 context project POM.

I didn't check the POM initially as I assumed SFW would have it registered as a normal (ie <optional>false</optional>) dependency and have caused it to be imported. I logged this ticket because it was not present in my classpath after importing the SFW libraries. I didn't check the POM for it being an optional dependency.

It's a separate debate whether it should be optional or not. I certainly agree it should be optional for the context project. But for a web project I'm not so sure optional is appropriate given you need Joda for the common use case of building a web app that includes one or more dates being bound. I've not got a strong view on this, though, so you can close this ticket without any changes to POMs if you wish.

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 GA milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants