{"record":{"id":"51195d06a0270f83","repo":"apache/maven","slug":"the-pom-for-is-invalid-transitive-dependencies","errorCode":null,"errorMessage":"The POM for {} is invalid, transitive dependencies (if any) will not be available: {}","messagePattern":"The POM for (.+?) is invalid, transitive dependencies \\(if any\\) will not be available: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"impl/maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java","lineNumber":93,"sourceCode":"            errorType = \" is inaccessible\";\n        }\n\n        String msg = \"\";\n        if (exception != null) {\n            msg = \": \" + exception.getMessage();\n        }\n\n        if (logger.isDebugEnabled()) {\n            logger.warn(\"The metadata {} {}{}\", metadata, errorType, msg, exception);\n        } else {\n            logger.warn(\"The metadata {} {}{}\", metadata, errorType, msg);\n        }\n    }\n\n    @Override\n    public void artifactDescriptorInvalid(RepositoryEvent event) {\n        // The exception stack trace is not really interesting here\n        logger.warn(\n                \"The POM for {} is invalid, transitive dependencies (if any) will not be available: {}\",\n                event.getArtifact(),\n                event.getException().getMessage());\n    }\n\n    @Override\n    public void artifactDescriptorMissing(RepositoryEvent event) {\n        logger.warn(\"The POM for {} is missing, no dependency information available\", event.getArtifact());\n    }\n}\n","sourceCodeStart":75,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-core/src/main/java/org/apache/maven/internal/aether/LoggingRepositoryListener.java#L75-L104","documentation":"artifactDescriptorInvalid: while reading the dependency descriptor (POM) of a resolved artifact, the POM parsed but failed model validation. Maven keeps the artifact on the classpath but discards its dependency information, so transitive dependencies of that artifact silently disappear - usually surfacing later as NoClassDefFoundError/ClassNotFoundException at compile or runtime.","triggerScenarios":"A dependency's POM is malformed: invalid XML, references a parent that cannot be resolved, uses duplicate/invalid elements. The warn text carries the artifact coordinates plus the validation exception's getMessage().","commonSituations":"Third-party artifacts published with broken POMs; parent POMs that were never deployed alongside the child; a repository proxy mangling files; mixed old jvyaml/velocity-style POMs that fail newer model validation rules.","solutions":["Run mvn dependency:tree -e -X to see the exact validation problem for the named artifact","If you own the producer: fix its POM (often a missing parent or invalid elements), run mvn validate there, and redeploy","Delete the cached copy in ~/.m2/repository and re-download in case a mirror corrupted it","If the producer cannot be fixed: pin the dependency and explicitly declare the transitive dependencies you actually need"],"exampleFix":"<!-- before: relying on broken POM's missing transitive info -->\n<dependency>\n  <groupId>com.thirdparty</groupId>\n  <artifactId>lib</artifactId>\n  <version>1.2.3</version>\n</dependency>\n<!-- after: declare what the invalid POM would have provided -->\n<dependency>\n  <groupId>com.thirdparty</groupId>\n  <artifactId>lib</artifactId>\n  <version>1.2.3</version>\n</dependency>\n<dependency>\n  <groupId>com.google.guava</groupId>\n  <artifactId>guava</artifactId>\n  <version>32.1.3-jre</version>\n</dependency>","handlingStrategy":"fallback","validationCode":"// embedder/Resolver users: validate the descriptor eagerly with a listener\ncollector.setArtifactDescriptorPolicy((session, policy, e) -> {\n    LOGGER.warn(\"Invalid POM for {}; declaring explicit deps as fallback\", e.getArtifact());\n    return true; // continue, but log/handle explicitly\n});","typeGuard":null,"tryCatchPattern":"try {\n    resolved = system.resolveDependencies(session, request);\n} catch (DependencyResolutionException e) {\n    if (e.getCause() instanceof ArtifactDescriptorException) {\n        // invalid POM: fall back to treating the artifact as dependency-less\n        // and add its transitive deps explicitly\n    } else { throw e; }\n}","preventionTips":["Run mvn validate on producer projects before deploying","Add dependency:analyze to CI to catch silently-dropped transitive deps early","Always deploy parent POMs together with child artifacts","Beware artifacts whose only validation failure surfaces as missing classes at runtime"],"tags":["resolver","invalid-pom","transitive-dependencies","artifact-descriptor"],"backgroundTag":"invalid-pom-validation","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}