[go: up one dir, main page]

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

Allow multiple artifacts upload - specifically maven/gradle style jar files with classifiers #47

Open
ali-thd opened this issue May 6, 2020 · 0 comments

Comments

@ali-thd
Copy link
ali-thd commented May 6, 2020

Problem:

The flow tool prohibits uploading of multiple artifacts that are created during the build process. Under specific cases uploading multiple artifacts should be allowed.

A single build of a maven/gradle project can produce multiple jar files. It is very common for the source files and the javadocs to be packaged as jar files and uploaded to a maven repository. These jar files include a classifier after the version number. The main application/library jar file does not does not contain a classifier. An example can be found here: Central Repository - Spring Core.

spring-core-5.2.6.RELEASE-javadoc.jar
spring-core-5.2.6.RELEASE-sources.jar
spring-core-5.2.6.RELEASE.jar
...

The classifier can be any arbitrary string.

Proposal:

Update the logic for publishing build artifacts for java projects to include all files that specify a classifier along with the file with no classifier. The list of classifiers that should be published should be added to buildConfig.json at artifactoryConfig.artifact(ory?)Classifiers. The artifact that gets deployed should be the file that contains no classifiers. The check for a single artifact for deployment can still be done, but after the files with classifiers have been filtered out.

Example buildConfig.json:

{
  "projectInfo": {
    "name": "proj1",
    "language": "java",
    "versionStrategy": "...."
  },
  "artifactoryConfig": {
    "artifactoryDomain": "https://.....",
    "artifactoryRepoKey": ".....",
    "artifactoryRepoKeySnapshot": ".....",
    "artifactoryGroup": "com/example/org",
    "artifactClassifiers": ["sources", "javadocs", "stubs"], <<-- Newly added config
    "artifactType": "jar"
  },
....
}

List of files published:

  • proj1-{version}.jar
  • proj1-{version}-sources.jar
  • proj1-{version}-javadocs.jar
  • proj1-{version}-stubs.jar

The file that is deployed:

  • proj1-{version}.jar

Pattern for filenames (for each classifier, when classifier(s) provided):
"{projectInfo.name}-{version}{'-' + classifier}.{artifactoryConfig.artifactType}"

Pattern for filename when classifiers not provided (existing logic):
"{projectInfo.name}-{version}.{artifactoryConfig.artifactType}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants