|
|
@ -37,12 +37,17 @@ pipeline {
|
|
|
|
filesByGlob = findFiles(glob: "target/*.${pom.packaging}");
|
|
|
|
filesByGlob = findFiles(glob: "target/*.${pom.packaging}");
|
|
|
|
|
|
|
|
|
|
|
|
echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}"
|
|
|
|
echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}"
|
|
|
|
|
|
|
|
echo "${filesByGlob[1].name} ${filesByGlob[1].path} ${filesByGlob[1].directory} ${filesByGlob[1].length} ${filesByGlob[1].lastModified}"
|
|
|
|
|
|
|
|
echo "${filesByGlob[2].name} ${filesByGlob[2].path} ${filesByGlob[2].directory} ${filesByGlob[2].length} ${filesByGlob[2].lastModified}"
|
|
|
|
|
|
|
|
|
|
|
|
artifactPath = filesByGlob[0].path;
|
|
|
|
javadocsArtifact = filesByGlob[0].path;
|
|
|
|
artifactExists = fileExists artifactPath;
|
|
|
|
jarWithSourcesArtifact = filesByGlob[1].path;
|
|
|
|
|
|
|
|
jarArtifact = filesByGlob[2].path;
|
|
|
|
|
|
|
|
|
|
|
|
if (artifactExists) {
|
|
|
|
if (fileExists(javadocsArtifact) && fileExists(jarWithSourcesArtifact) && fileExists(jarArtifact)) {
|
|
|
|
echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
|
|
|
|
echo "*** File: ${javadocsArtifact}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
|
|
|
|
|
|
|
|
echo "*** File: ${jarWithSourcesArtifact}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
|
|
|
|
|
|
|
|
echo "*** File: ${jarArtifact}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
|
|
|
|
|
|
|
|
|
|
|
|
nexusArtifactUploader(
|
|
|
|
nexusArtifactUploader(
|
|
|
|
nexusVersion: NEXUS_VERSION,
|
|
|
|
nexusVersion: NEXUS_VERSION,
|
|
|
@ -53,19 +58,14 @@ pipeline {
|
|
|
|
repository: NEXUS_REPOSITORY,
|
|
|
|
repository: NEXUS_REPOSITORY,
|
|
|
|
credentialsId: NEXUS_CREDENTIAL_ID,
|
|
|
|
credentialsId: NEXUS_CREDENTIAL_ID,
|
|
|
|
artifacts: [
|
|
|
|
artifacts: [
|
|
|
|
[artifactId: pom.artifactId,
|
|
|
|
[artifactId: pom.artifactId, classifier: 'core', file: jarArtifact, type: pom.packaging],
|
|
|
|
classifier: '',
|
|
|
|
[artifactId: pom.artifactId, classifier: 'javadocs', file: javadocsArtifact, type: pom.packaging],
|
|
|
|
file: artifactPath,
|
|
|
|
[artifactId: pom.artifactId, classifier: 'sources', file: jarWithSourcesArtifact, type: pom.packaging],
|
|
|
|
type: pom.packaging],
|
|
|
|
[artifactId: pom.artifactId, classifier: '', file: "pom.xml", type: "pom"]
|
|
|
|
|
|
|
|
|
|
|
|
[artifactId: pom.artifactId,
|
|
|
|
|
|
|
|
classifier: '',
|
|
|
|
|
|
|
|
file: "pom.xml",
|
|
|
|
|
|
|
|
type: "pom"]
|
|
|
|
|
|
|
|
]
|
|
|
|
]
|
|
|
|
)
|
|
|
|
)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
error "*** File: ${artifactPath}, could not be found";
|
|
|
|
error "*** Files could not be found";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|