spring-attic / aws-maven

Apache License 2.0
214 stars 174 forks source link

joda-time not found warning #51

Open vguna opened 7 years ago

vguna commented 7 years ago

Hi.

I'm successfully using the aws extension - thanks for that! However what bothers me is, when I add my s3 repository as <pluginRepository> as well, the build starts with a warning:

me:somedir me$ mvn clean install -DskipTests

[INFO] Scanning for projects...
[WARNING] Could not transfer metadata joda-time:joda-time/maven-metadata.xml from/to aws-releases (s3://myrepo/releases): Cannot access s3://myrepo/releases with type default using the available connector factories: BasicRepositoryConnectorFactory
[WARNING] Could not transfer metadata joda-time:joda-time/maven-metadata.xml from/to aws-snapshots (s3://myrepo/snapshots): Cannot access s3://myrepo/snapshots with type default using the available connector factories: BasicRepositoryConnectorFactory
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
...

Is this a chicken/egg problem? I think it's the aws extension itself that needs joda-time, right? So during init of the extension, it can't access the configured plugin repository due to the not-yet-initialized extension :)?

I'm guessing it since I reduced my pom to only contain the extension and some properties/repo definitions. Can this message somehow be suppressed?

tmoschou commented 6 years ago

This was annoying me too. It looks like org.springframework.build:aws-maven:5.0.0.RELEASE depends on com.amazonaws:aws-java-sdk:1.7.1 which depends on joda-time:joda-time of version [2.2,) Since its a wild card version, it needs to de extra stuff like download maven-metadata.xml from every repo to find the latest version from what I can recall, even if the plugin repo is annotated with <updatePolicy>never</updatePolicy>. I suspect the solution would be to pin the version of joda-time in org.springframework.build:aws-maven

moleksyuk commented 6 years ago

@vguna @tmoschou Try our fork. It doesn't have such problem anymore.

<dependency>
    <groupId>com.github.platform-team</groupId>
    <artifactId>aws-maven</artifactId>
    <version>6.0.0</version>
</dependency>