You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Robert Munteanu (Jira)" <ji...@apache.org> on 2019/09/13 15:48:00 UTC
[jira] [Commented] (JCRVLT-369) Include package name in error
message when dependencies are not satisfied
[ https://issues.apache.org/jira/browse/JCRVLT-369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16929308#comment-16929308 ]
Robert Munteanu commented on JCRVLT-369:
----------------------------------------
Here's a trivial patch which fixes the problem:
{noformat}
Index: vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/registry/impl/ExecutionPlanBuilderImpl.java
===================================================================
--- vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/registry/impl/ExecutionPlanBuilderImpl.java (revision 1866899)
+++ vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/registry/impl/ExecutionPlanBuilderImpl.java (working copy)
@@ -254,7 +254,7 @@
resolved.add(id);
DependencyReport report = registry.analyzeDependencies(id, false);
if (report.getUnresolvedDependencies().length > 0) {
- throw new DependencyException("Package has unresolved dependencies: " + Dependency.toString(report.getUnresolvedDependencies()));
+ throw new DependencyException("Package " + id + " has unresolved dependencies: " + Dependency.toString(report.getUnresolvedDependencies()));
}
for (PackageId depId: report.getResolvedDependencies()) {
// if the package task is already present, continue resolution
@@ -371,4 +371,4 @@
return packages;
}
}
-}
\ No newline at end of file
+}
{noformat}
[~tripod], [~kwin] - WDYT?
> Include package name in error message when dependencies are not satisfied
> -------------------------------------------------------------------------
>
> Key: JCRVLT-369
> URL: https://issues.apache.org/jira/browse/JCRVLT-369
> Project: Jackrabbit FileVault
> Issue Type: Improvement
> Components: Packaging
> Affects Versions: 3.4.0
> Reporter: Robert Munteanu
> Priority: Major
>
> The Sling Feature Launcher installs packages in batches. When a missing dependency is encountered, the error message does not specify which package failed to install, which makes it quite hard to debug the problem.
> {noformat}[ERROR] Error while assembling launcher: Package has unresolved dependencies: day/cq610/social/enablement:cq-social-enablement-pkg:1.1.0
> shaded.org.apache.jackrabbit.vault.packaging.DependencyException: Package has unresolved dependencies: day/cq610/social/enablement:cq-social-enablement-pkg:1.1.0
> at shaded.org.apache.jackrabbit.vault.packaging.registry.impl.ExecutionPlanBuilderImpl.resolveInstall(ExecutionPlanBuilderImpl.java:257)
> at shaded.org.apache.jackrabbit.vault.packaging.registry.impl.ExecutionPlanBuilderImpl.validate(ExecutionPlanBuilderImpl.java:239)
> at org.apache.sling.feature.extension.content.ContentHandler.buildExecutionPlan(ContentHandler.java:79)
> at org.apache.sling.feature.extension.content.ContentHandler.handle(ContentHandler.java:121)
> at org.apache.sling.feature.launcher.impl.FeatureProcessor.prepareLauncher(FeatureProcessor.java:159)
> at org.apache.sling.feature.launcher.impl.Main.main(Main.java:250){noformat}
> It would be very useful to include the information in the error message.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)