aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

Java: unable to import "autoscaling" dependency

Open andybirenzi opened this issue 6 years ago • 3 comments

In the documentation (https://docs.aws.amazon.com/cdk/api/latest/docs/aws-autoscaling-readme.html) they documented how to use the autoscaling but when I add it to pom.xml, I get an error. Following is the synthax :

<dependency>
            <groupId>software.amazon.awscdk</groupId>
            <artifactId>autoscaling</artifactId>
            <version>1.19.0</version>
</dependency>

Reproduction Steps

Error Log

Environment

  • CLI Version :
  • Framework Version:
  • OS :
  • Language :

Other


This is :bug: Bug Report

andybirenzi avatar Dec 19 '19 19:12 andybirenzi

Hi @andybirenzi, thanks for submitting a bug report. Can you fill out the template above so that we can understand the issue better. Thank you!

SomayaB avatar Dec 20 '19 00:12 SomayaB

Reproduction Steps: add following dependency to your pom.xml file

<dependency>
            <groupId>software.amazon.awscdk</groupId>
            <artifactId>autoscaling</artifactId>
            <version>1.19.0</version>
</dependency>

Error Log:

The container 'Maven Dependencies' references non existing library 'XXXXX\.m2\repository\software\amazon\awscdk\AutoScaling\1.19.0\autoscaling-1.19.0.jar'

Environment: DEV CLI Version: CDK 11.19.0 Framework Version: OS: Windows Language: Java

andybirenzi avatar Dec 20 '19 14:12 andybirenzi

It definitely exists: https://search.maven.org/artifact/software.amazon.awscdk/autoscaling/1.19.0/jar

I don't know why you are getting this error, but it seems to be something on your machine, and not a problem with the CDK. It might be a Maven bug caused by you being on Windows, I see an uppercase character Autoscaling in the path you pasted.

Try deleting the entire Maven directory .m2 and then try it again. Otherwise ask for support on the Maven forum.

rix0rrr avatar Dec 23 '19 09:12 rix0rrr