[
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17847940#comment-17847940
]
ASF GitHub Bot commented on MDEP-799:
-------------------------------------
LogFlames commented on code in PR #391:
URL:
https://github.com/apache/maven-dependency-plugin/pull/391#discussion_r1607033643
##########
src/main/java/org/apache/maven/plugins/dependency/tree/JsonDependencyNodeVisitor.java:
##########
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugins.dependency.tree;
+
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.commons.lang3.StringUtils;
Review Comment:
I removed it and added manual checks for null and string repetition, wasn't
able to get `str.repeat(conut)` to work, guessing it also build to jdk8?
##########
src/main/java/org/apache/maven/plugins/dependency/tree/JsonDependencyNodeVisitor.java:
##########
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugins.dependency.tree;
+
+import java.io.Writer;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.commons.lang3.StringUtils;
Review Comment:
Thanks!
I removed it and added manual checks for null and string repetition, wasn't
able to get `str.repeat(conut)` to work, guessing it also build to jdk8?
> improve mvn dependency:tree - add optional JSON output of the results
> ---------------------------------------------------------------------
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
> Issue Type: New Feature
> Components: tree
> Reporter: Zhenxu Ke
> Priority: Major
>
> I'd like to add an output type JSON, will open a pull request soon
--
This message was sent by Atlassian Jira
(v8.20.10#820010)