Skip to content

Include all source artifacts in published sources jars [SPR-12085] #16701

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

Closed
7 tasks done
spring-projects-issues opened this issue Aug 15, 2014 · 6 comments
Closed
7 tasks done
Assignees
Labels
status: backported An issue that has been backported to maintenance branches type: task A general task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Aug 15, 2014

Sam Brannen opened SPR-12085 and commented

Status Quo

For example, in 4.1 RC2, the META-INF/spring.factories file is present in spring-test-4.1.0.RC2.jar, but it is not present in spring-test-4.1.0.RC2-sources.jar. The same is true for the spring-beans module.

Further analysis reveals that only Java and AspectJ source code are included in the current 'sources' jars.

Deliverables

  1. Ensure that META-INF/spring.factories is included in published 'sources' archives across the framework.
    • This currently is known to affect spring-beans and spring-test.
  2. Ensure that the following file types are also included in published 'sources' archives:
    • Groovy source code
    • Properties files
    • XML files
    • META-INF/services/*
    • mime.types

Affects: 3.2.10, 4.0.6, 4.1 RC2

Issue Links:

Backported to: 4.0.7, 3.2.11

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

Fixed as described in the comments for GitHub commit 9ea646e:

Include all source artifacts in published sources jars

This commit updates the Gradle build to ensure that the following are
including in published 'sources' jars.

  • Java source code (previously supported)
  • AspectJ source code (previously supported)
  • META-INF/spring.factories
  • META-INF/services/*
  • Java Properties files
  • XML files
  • MIME types files (mime.types)

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Aug 15, 2014

Sam Brannen commented

FYI: I opened #16702 to address the outstanding issue regarding Groovy source code.

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

Reopened for backporting.

@spring-projects-issues
Copy link
Collaborator Author

Stéphane Nicoll commented

Is there a reason to do that with a lengthy list of includes vs. a smart exclude? What files could be present in src/main/xyz that we do not want in the generated source archive exactly?

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

That's a valid question. To be honest, the current style of explicitly including things is simply based on the "status quo" (i.e., how it was done in the past).

As for what could possibly be present in src/main/\* that we wouldn't want in the sources JARs, I don't know. I just looked, and I can't foresee anything causing any issues. So I'll simplify the current configuration in build.gradle and just include everything by default.

Cheers,

Sam

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

This issue has been addressed as described in the comments for GitHub commits 07629a3 (4.1.0), a52ff46 (4.0.7), and 3b64db1 (3.2.11):

Include ALL source artifacts in published sources jars

This commit updates the Gradle build to ensure that all source
artifacts are including in published 'sources' jars.

To achieve this, we are now assembling 'sources' jars from
'sourceSets.main.allSource' and not explicitly including or excluding
anything by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported An issue that has been backported to maintenance branches type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants