[ https://issues.apache.org/jira/browse/CXF-7764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Freeman Fang resolved CXF-7764. ------------------------------- Resolution: Not A Problem > java2swagger doesn't use correct filenames when attaching output files to > maven repository > ------------------------------------------------------------------------------------------ > > Key: CXF-7764 > URL: https://issues.apache.org/jira/browse/CXF-7764 > Project: CXF > Issue Type: Bug > Affects Versions: 3.2.4 > Reporter: Rune Vikestad > Assignee: Freeman Fang > Priority: Blocker > Labels: maven > > I've got a projects using org.apache.cxf.cxf-java2swagger-plugin 3.2.4 in a > module named *foo-app* with two different executions; each configured to scan > a different set of packages and output the result to two different files; > *payments.json* and *accounts.json*. > This works well as I can find both these files generated as expected in my > target directory. However, I've also set *attachSwagger* to *true*, and as > such I'd expect to find both payments.json and accounts.json in my local > Maven repository. > Instead I only find a single file, *foo-app.json*, which when opened contains > the generated Swagger definition of the execution defined last in foo's > pom.xml. > I didn't even notice this before trying to deploy to a different environment > in Jenkins, as I've always just looked in my target directory, and ignored > the local Maven repository; > {code:java} > Deploying the main artifact foo-app-0.6.5.json > Uploading: > https://nexus.vikestad.io/nexus/content/repositories/releases/io/vikestad/test/foo-app/0.6.5/foo-app-0.6.5.json > Uploaded: > https://nexus.vikestad.io/nexus/content/repositories/releases/io/vikestad/test/foo-app/0.6.5/foo-app-0.6.5.json > (14 KB at 747.7 KB/sec) > Deploying the main artifact foo-app-0.6.5.json > Uploading: > https://nexus.vikestad.io/nexus/content/repositories/releases/io/vikestad/test/foo-app/0.6.5/foo-app-0.6.5.json > ERROR: Failed to deploy artifacts: Could not transfer artifact > io.vikestad.test:foo-app:json:0.6.5 from/to edb.releaseRepository > (https://nexus.vikestad.io/nexus/content/repositories/releases/): Failed to > transfer file: > https://nexus.vikestad.io/nexus/content/repositories/releases/io/vikestad/test/foo-app/0.6.5/foo-app-0.6.5.json. > Return code is: 400, ReasonPhrase: Repository does not allow updating > assets: releases. > org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to > deploy artifacts: Could not transfer artifact > io.vikestad.test:foo-app:json:0.6.5 from/to edb.releaseRepository > (https://nexus.vikestad.io/nexus/content/repositories/releases/): Failed to > transfer file: > https://nexus.vikestad.io/nexus/content/repositories/releases/io/vikestad/test/foo-app/0.6.5/foo-app-0.6.5.json. > Return code is: 400, ReasonPhrase: Repository does not allow updating > assets: releases. > at > org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:143) > at > hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:208) > at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:176) > at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) > at > hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) > at > hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) > at > hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1073) > at > hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) > at hudson.model.Run.execute(Run.java:1749) > at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) > at hudson.model.ResourceController.execute(ResourceController.java:97) > at hudson.model.Executor.run(Executor.java:421) > Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to > deploy artifacts: Could not transfer artifact > io.vikestad.test:foo-app:json:0.6.5 from/to edb.releaseRepository > (https://nexus.vikestad.io/nexus/content/repositories/releases/): Failed to > transfer file: > https://nexus.vikestad.io/nexus/content/repositories/releases/io/vikestad/test/foo-app/0.6.5/foo-app-0.6.5.json. > Return code is: 400, ReasonPhrase: Repository does not allow updating > assets: releases. > at > org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:317) > at > org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:245) > at > org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:420) > at > org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:139) > ... 11 more > Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not > transfer artifact io.vikestad.test:foo-app:json:0.6.5 from/to > edb.releaseRepository > (https://nexus.vikestad.io/nexus/content/repositories/releases/): Failed to > transfer file: > https://nexus.vikestad.io/nexus/content/repositories/releases/io/vikestad/test/foo-app/0.6.5/foo-app-0.6.5.json. > Return code is: 400, ReasonPhrase: Repository does not allow updating > assets: releases. > at > org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43) > at > org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355) > at > org.eclipse.aether.connector.basic.BasicRepositoryConnector.put(BasicRepositoryConnector.java:274) > at > org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:311) > ... 14 more > Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer > file: > https://nexus.vikestad.io/nexus/content/repositories/releases/io/vikestad/test/foo-app/0.6.5/foo-app-0.6.5.json. > Return code is: 400, ReasonPhrase: Repository does not allow updating > assets: releases. > at > org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:635) > at > org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:557) > at > org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:539) > at > org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:533) > at > org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:513) > at > org.eclipse.aether.transport.wagon.WagonTransporter$PutTaskRunner.run(WagonTransporter.java:644) > at > org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427) > at > org.eclipse.aether.transport.wagon.WagonTransporter.put(WagonTransporter.java:410) > at > org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRunner.runTask(BasicRepositoryConnector.java:510) > at > org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350) > ... 16 more > [INFO] Deployment failed after 8.2 sec{code} > > I've tried playing around with different <outputFile> and <outputFileName> > values, to but no avail. > Which is why I'm here today with a bug report, hoping it's an actual issue or > if there exists some undocumented way to get around this. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)