I'm trying to modularize a project that contains some no modularized dependencies, I tried to use the plugins but it is giving me a 401 error when trying to call the artifactory. My question is. Is it really necessary? should not it ready the local copy of the jar?
And last, there is any way around it?
plugins {
id 'com.jfrog.artifactory' version "4.17.2"
id "org.moditect.gradleplugin" version "1.0.0-rc3"
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '2.4.3'
id 'java-library'
id 'application'
}
...
artifactory {
...
}
dependencies {
...
implementation 'com.myapp:core-observability-spring:0.1.4'
...
}
moditect {
addDependenciesModuleInfo {
jdepsExtraArgs = ['-q']
modules {
module {
artifact "com.myapp:core-observability-spring:0.1.4"
moduleInfo {
name = 'com.myapp.core.observability'
}
}
}
}
}
...
Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to read artifact descriptor for com.myapp:core-observability-spring:jar:0.1.4
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:208)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
at org.moditect.gradleplugin.aether.DependencyResolver.getDependencies(DependencyResolver.groovy:66)
at org.moditect.gradleplugin.add.model.ModuleConfiguration.retrieveAetherDependencies(ModuleConfiguration.groovy:158)
at org.moditect.gradleplugin.add.model.ModuleConfiguration.getAetherDependencies(ModuleConfiguration.groovy:150)
at org.moditect.gradleplugin.add.model.ModuleConfiguration.updateFullConfiguration(ModuleConfiguration.groovy:162)
at org.moditect.gradleplugin.ModitectExtension$_retrieveArtifactsInfo_closure1.doCall(ModitectExtension.groovy:93)
at org.moditect.gradleplugin.ModitectExtension$_retrieveArtifactsInfo_closure1.call(ModitectExtension.groovy)
at org.moditect.gradleplugin.ModitectExtension.retrieveArtifactsInfo(ModitectExtension.groovy:92)
at org.moditect.gradleplugin.ModitectExtension.access$0(ModitectExtension.groovy)
at org.moditect.gradleplugin.ModitectExtension$_getArtifactsInfo_closure6.doCall(ModitectExtension.groovy:55)
at org.moditect.gradleplugin.ModitectExtension$_getArtifactsInfo_closure6.call(ModitectExtension.groovy)
at org.moditect.gradleplugin.ModitectExtension.getArtifactsInfo(ModitectExtension.groovy:55)
at org.moditect.gradleplugin.ModitectExtension_Decorated.getArtifactsInfo(Unknown Source)
at org.moditect.gradleplugin.generate.GenerateModuleInfoTask.generateModuleInfo(GenerateModuleInfoTask.groovy:106)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
... 91 more
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.myapp:core-observability-spring:jar:0.1.4
at org.moditect.gradleplugin.shadow.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
at org.moditect.gradleplugin.shadow.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:202)
... 109 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact com.myapp:core-observability-spring:pom:0.1.4 from/to artifactory-maven-resolver (https://artifactory.myrepo.com/artifactory/gradle-release): status code: 401, reason phrase: Unauthorized (401)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.moditect.gradleplugin.shadow.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
... 111 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.myapp:core-observability-spring:pom:0.1.4 from/to artifactory-maven-resolver (https://artifactory.myrepo.com/artifactory/gradle-release): status code: 401, reason phrase: Unauthorized (401)
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.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 114 more
Hi all,
I'm trying to modularize a project that contains some no modularized dependencies, I tried to use the plugins but it is giving me a 401 error when trying to call the artifactory. My question is. Is it really necessary? should not it ready the local copy of the jar?
And last, there is any way around it?