Artifact (PackagingElementResolvingContext context) { PackagingElementPath path = this; while (path != EMPTY) { final PackagingElement<?> element = path.myLastElement; if (element instanceof ArtifactPackagingElement) { return ((ArtifactPackagingElement)element).findArtifact(context); } path = path.myParentPath; } return null; }