I am kind of new to maven. And I watched a couple youtube videos to start with a quick maven archetype in VS code. I am working with python and java which requires me to use common code editors. But as of now I am working on java seperately to merge the files later.
Basically none of my import org.<dependency>
are getting imported although there doesnt seem to be any syntax error with my pom.xml configured without vulnerabilities.
When I tried building pom.xml it did give me a build success message followed by a few warnings
[WARNING]
[WARNING] Plugin validation issues were detected in 5 plugin(s)
[WARNING]
[WARNING] * org.apache.maven.plugins:maven-compiler-plugin:3.8.0
[WARNING] * org.apache.maven.plugins:maven-jar-plugin:3.0.2
[WARNING] * org.apache.maven.plugins:maven-resources-plugin:3.0.2
[WARNING] * org.apache.maven.plugins:maven-clean-plugin:3.1.0
[WARNING] * org.apache.maven.plugins:maven-surefire-plugin:2.22.1
[WARNING]
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
I managed to resolve all pom.xml and syntactical errors, but none of the packages got imported from pom.xml
error: package org.json does not exist
This is a sample of what I am getting. I did verify that my java projects > maven dependencies > json-<version>.jar had indeed downloaded org.json. Similarly for every other library I tried to importI tried commands like
mvn clean package
,mvn install
but didnt seem to work. I even installed maven wrapper and tried the same commands (usingmvnw
) but to no avail.Then I tried
mvn install -Dmaven.plugin.validation=VERBOSE
command but theplugin.validation=VERBOSE
was not recognized. So I tried adding groupId and configuartions to the plugins to no avail.
It does seem to work for my partner in his machine and even on my own machine in netbeans. But since I should later integrate it with some python code and the time required to learn IDEs is preventing me from making a switch.
Also this is my complete error for cd "c:\folder\loaction\" ; if ($?) { javac NLUConverter.java } ; if ($?) { java NLUConverter }
NLUConverter.java:11: error: package org.json does not exist
import org.json.JSONObject;
^
NLUConverter.java:12: error: package org.yaml.snakeyaml does not exist
import org.yaml.snakeyaml.DumperOptions;
^
NLUConverter.java:13: error: package org.yaml.snakeyaml does not exist
import org.yaml.snakeyaml.Yaml;
^
NLUConverter.java:57: error: cannot find symbol
Yaml yamlParser = new Yaml();
^
symbol: class Yaml
location: class NLUConverter
NLUConverter.java:57: error: cannot find symbol
Yaml yamlParser = new Yaml();
^
symbol: class Yaml
location: class NLUConverter
NLUConverter.java:59: error: cannot find symbol
return new JSONObject(data).toString();
^
symbol: class JSONObject
location: class NLUConverter
NLUConverter.java:69: error: cannot find symbol
JSONObject jsonObject = new JSONObject(json);
^
symbol: class JSONObject
location: class NLUConverter
NLUConverter.java:69: error: cannot find symbol
JSONObject jsonObject = new JSONObject(json);
^
symbol: class JSONObject
location: class NLUConverter
NLUConverter.java:72: error: cannot find symbol
DumperOptions options = new DumperOptions();
^
symbol: class DumperOptions
location: class NLUConverter
NLUConverter.java:72: error: cannot find symbol
DumperOptions options = new DumperOptions();
^
symbol: class DumperOptions
location: class NLUConverter
NLUConverter.java:73: error: package DumperOptions does not exist
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
^
NLUConverter.java:76: error: cannot find symbol
Yaml yaml = new Yaml(options);
^
symbol: class Yaml
location: class NLUConverter
NLUConverter.java:76: error: cannot find symbol
Yaml yaml = new Yaml(options);
^
symbol: class Yaml
location: class NLUConverter
13 errors