Skip to content

Commit

Permalink
Merge branch 'main' into eks-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Apr 25, 2023
2 parents ac4e25c + 5f6ccee commit f3ef17a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/@aws-cdk-testing/cli-integ/lib/staging/maven.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-console */
import * as path from 'path';
import { pathExists } from 'fs-extra';
import { LoginInformation } from './codeartifact';
import { parallelShell } from './parallel-shell';
import { UsageDir } from './usage-dir';
Expand Down Expand Up @@ -29,15 +30,18 @@ export async function uploadJavaPackages(packages: string[], login: LoginInforma
await parallelShell(packages, async (pkg, output) => {
console.log(`⏳ ${pkg}`);

const sourcesFile = pkg.replace(/.pom$/, '-sources.jar');
const javadocFile = pkg.replace(/.pom$/, '-javadoc.jar');

await shell(['mvn',
`--settings=${settingsFile(usageDir)}`,
'org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy-file',
`-Durl=${login.mavenEndpoint}`,
'-DrepositoryId=codeartifact',
`-DpomFile=${pkg}`,
`-Dfile=${pkg.replace(/.pom$/, '.jar')}`,
`-Dsources=${pkg.replace(/.pom$/, '-sources.jar')}`,
`-Djavadoc=${pkg.replace(/.pom$/, '-javadoc.jar')}`], {
...await pathExists(sourcesFile) ? [`-Dsources=${sourcesFile}`] : [],
...await pathExists(javadocFile) ? [`-Djavadoc=${javadocFile}`] : []], {
output,
modEnv: {
// Do not try to JIT the Maven binary
Expand Down

0 comments on commit f3ef17a

Please sign in to comment.