You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are storing some of our built java apps in AWS CodeArtifact and normal maven build (mvn install) is able to fetch those dependencies from the CodeArtifact. However in post build steps the license-maven-plugin fails to do so. I get the following error from the post build (redacted sensitive information):
Failed to execute goal org.codehaus.mojo:license-maven-plugin:2.0.0:add-third-party (default-cli) on project <project_name>: could not execute goal AddThirdPartyMojo for reason : ArtifactResolutionException: Unable to locate third party descriptor: Could not transfer artifact <artifact_name> from/to <aws_domain>-<aws_repo> (<aws_codeartifact_url>): Transfer failed for <aws_codeartifact_url>/<artifact_name>-third-party.properties 400 Bad Request -> [Help 1]
Some previous debugging on the CodeArtifact authentication taught me that HTTP 400 means that the request to the CodeArtifact didn't include auth token that is needed (document about the token). Basic usage of CodeArtifact with Maven build can be found here (basically store the auth token in env variable and in settings.xml give that varible's name to Maven). I would assume that currently the license plugin won't for some reason include the auth token to the CodeArtifact request, CodeArtifact returns HTTP 400 and plugin won't know how to handle that (related to this issue). Is there some way to configure license plugin to use that same authentication method as the mvn install uses? Or am I on a completely wrong track here?
The text was updated successfully, but these errors were encountered:
We are storing some of our built java apps in AWS CodeArtifact and normal maven build (mvn install) is able to fetch those dependencies from the CodeArtifact. However in post build steps the license-maven-plugin fails to do so. I get the following error from the post build (redacted sensitive information):
Failed to execute goal org.codehaus.mojo:license-maven-plugin:2.0.0:add-third-party (default-cli) on project <project_name>: could not execute goal AddThirdPartyMojo for reason : ArtifactResolutionException: Unable to locate third party descriptor: Could not transfer artifact <artifact_name> from/to <aws_domain>-<aws_repo> (<aws_codeartifact_url>): Transfer failed for <aws_codeartifact_url>/<artifact_name>-third-party.properties 400 Bad Request -> [Help 1]
Some previous debugging on the CodeArtifact authentication taught me that HTTP 400 means that the request to the CodeArtifact didn't include auth token that is needed (document about the token). Basic usage of CodeArtifact with Maven build can be found here (basically store the auth token in env variable and in settings.xml give that varible's name to Maven). I would assume that currently the license plugin won't for some reason include the auth token to the CodeArtifact request, CodeArtifact returns HTTP 400 and plugin won't know how to handle that (related to this issue). Is there some way to configure license plugin to use that same authentication method as the mvn install uses? Or am I on a completely wrong track here?
The text was updated successfully, but these errors were encountered: