code: static MavenArtifactInfo fromDependencyNode(final DependencyNode dependencyNode) {
          final Artifact artifact = dependencyNode.getDependency().getArtifact();
          final List<DependencyNode> children = dependencyNode.getChildren();
  
          // SHRINKRES-143 lets ignore invalid scope
          ScopeType scopeType = ScopeType.RUNTIME;
          try {
              scopeType = ScopeType.fromScopeType(dependencyNode.getDependency().getScope());
          } catch (IllegalArgumentException e) {
              // let scope be RUNTIME
              log.log(Level.WARNING, "Invalid scope {0} of retrieved dependency {1} will be replaced by <scope>runtime</scope>",
                      new Object[] { dependencyNode.getDependency().getScope(), dependencyNode.getDependency().getArtifact() });
          }
          final boolean optional = dependencyNode.getDependency().isOptional();
          return new MavenArtifactInfoImpl(artifact, scopeType, children, optional);
      }
docs: Creates MavenArtifactInfo based on DependencyNode.
  
  @param dependencyNode
  dependencyNode
  @return The new {@link MavenArtifactInfo> instance.