java.lang.NoClassDefFoundError: com/google/gson/Gson - java

I noticed a strange problem. I am able to run my test cases using Junit but when I am running using maven One of the test case is failing. It is complaining that Gson class def is not found.
I am able to see the Gson jar in Maven dependencies.
So I doubted that classpath is not including the Gson. So I ran maven with -X and noticed some clues.
[DEBUG] Could not find metadata com.example.libraries:Symbology:1.0.0-SNAPSHOT/maven-metadata.xml in local (C:\Users\ra\.m2\repository)
[DEBUG] Skipped remote update check for com.example.libraries:Symbology:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Could not find metadata com.example.libraries:Symbology:1.0.0-SNAPSHOT/maven-metadata.xml in local (C:\Users\ra\.m2\repository)
[DEBUG] Skipped remote update check for com.example.libraries:Symbology:1.0.0-SNAPSHOT/maven-metadata.xml, locally cached metadata up-to-date.
[WARNING] The POM for com.example.libraries:Symbology:jar:1.0.0-SNAPSHOT is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for com.example.libraries:Symbology:1.0.0-SNAPSHOT
[ERROR] 'dependencies.dependency.artifactId' for ::jar is missing. #
[ERROR] 'dependencies.dependency.groupId' for ::jar is missing. #
I have a project which depends on Symbology project and this in turn uses Gson.
But now from this log I am seeing transitive dependencies are not getting included. So Gson class is not being found.
Here is the Symbology pom:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.libraries</groupId>
<artifactId>Symbology</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Symbology</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
</dependencies>
Here is the Pom of my project which is calling symbology :
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.libraries</groupId>
<artifactId>FGF</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<distributionManagement>
<snapshotRepository>
<id>example.com</id>
<name>example.com-snapshots</name>
<url>http://example/artifactory/libs-snapshots-local</url>
</snapshotRepository>
</distributionManagement>
<name>FGF</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>com.example.libraries</groupId>
<artifactId>Category</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.example.libraries</groupId>
<artifactId>Time</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.example.libraries</groupId>
<artifactId>Display</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
**<dependency>
<groupId>com.example.libraries</groupId>
<artifactId>Symbology</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>**
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.0.BUILD-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.directory.studio</groupId>
<artifactId>org.apache.commons.lang</artifactId>
<version>2.6</version>
</dependency>
</dependencies>

Figured Out the Problem Finally after spending lot of time.
The problem is when I am pushing the symbology artifact to repository it is not pushing the pom into repository. So when I am using the symbology artifact as dependency my project is not able to know what are the transitive dependencies.
So I pushed my pom into repository along with jar and now it is able to get all the dependencies.
HURRAYYYYYYYYYYYYYYYYY!!!!!!!!!!!!!!!!!!

Related

Json webtoken dependency will not resolve in pom.xml

I am currently working on a Spring Project, which I am new to, and have no idea why this dependency I got from the maven repository will now resolve itself. I have tried to use both the separated dependency (jjwt-api, etc..) and the one pasted in my pom.xml below but it will not resolve. If anyone can help me figure this out that would great appreciated.
Spring v2.6.4
Java JDK 17
Error message: Dependency 'com.auth0:java-jwt:3.18.3' not found
l version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.legacy-banking</groupId>
<artifactId>legacyBankingAPI</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>legacyBankingAPI</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
---------THIS IS THE DEPENDENCY IN QUESTION BELOW---------------------------
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.18.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
The MvnRepository page says, it's in the central repo, and the central repo link to the pom.xml of the dependency also works: https://repo1.maven.org/maven2/com/auth0/java-jwt/3.18.3/java-jwt-3.18.3.pom
So did you maybe try to resolve it once when you were offline? Failed resolving also is cached in your local maven repo, so you might have to clean that up. You can try to use
mvn dependency:get -Dartifact=com.auth0:java-jwt:3.18.3
or you clean the cached "missing" dependency manually: go to your local maven repo (usually in ~/.m2/repository), descend to com/auth0/java-jwt and remove the folder 3.18.3 inside, then run your maven build again.
I just reloaded the pom.xml file and it the works.

Setting maven to have a framework and other projects that use it

I created a Maven project that i should use as a framework. This framework has some dependencies:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>SeleniumJavaFramework</groupId>
<artifactId>SeleniumJavaFramework</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>7</maven.compiler.source>
<maven.compiler.target>7</maven.compiler.target>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.0.0-alpha-6</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.1.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.aventstack/extentreports -->
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>4.1.6</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
</dependencies>
</project>
I'd like to create other Maven projects, separated from the framework project, that will have their own pom.xml with the framework dependency.
If possible, they should inherit dependencies from the framework project.
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>RicercaGoogle</groupId>
<artifactId>RicercaGoogle</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>TestOne</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>7</maven.compiler.source>
<maven.compiler.target>7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>SeleniumJavaFramework</groupId>
<artifactId>SeleniumJavaFramework</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>patofmyjar.jar</systemPath>
</dependency>
</dependencies>
</project>
Unfortunately I don't know where to start with the maven settings. I'm not even sure if the pom files are correct. I only know that i can't simply put the jar dependency into the test project and run it. Can you help me out?
Thank you
If you are working at single project, you can create a parent pom that include your TestOne app and Framework as two modules, so you'll have 3 poms (search for maven multimodule project). If your framework is a library for different projects, you need a repository (ie nexus), where your Framework can be deployed to. Then you can use it as a dependency in other projects (dependencies of Framework will be included automatically)
I suggest to follow the maven official guide for learning how inheritance works in maven and adapt this to your logic:
http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance
Problem was that my classes where in the wrong folders.
They were in src/test/java while they had to be in src/main/java.
Also in the test project pom i removed scope and systemPath as suggested by Andrew Fomin
<dependency>
<groupId>SeleniumJavaFramework</groupId>
<artifactId>SeleniumJavaFramework</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
I had an error
Missing artifact SeleniumJavaFramework:SeleniumJavaFramework:jar:0.1.1-SNAPSHOT
because, as you can see, version was wrong.
Thank you all

Spring Tool Suite- referencing projects

I come from a C#\Visual Studio background and can't wrap my head around how to reference project B from project A such that when I do a Maven build, it actually builds. Using Spring Tool Suite:
In Project A, Properties> Java Build Path > Projects, I've added Project B.
Project B builds via Maven just fine as a package.
Lovely, intellisense works and I'm happily coding along.
I go to do a Maven build on project A and get a whole bunch of [ERROR]: ...package [project B] does not exist.
I get that somehow i need to make Maven aware of project B's jar...but I don't understand how this works. I don't think i want to force the jar into my local Maven repo (if i do, then what happens when i use the company's maven repo?), i really just want to have maven pick up the .class files from project B's build and be on my merry way. What am I missing?
EDIT: adding poms:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.firm</groupId>
<artifactId>projectA</artifactId>
<packaging>jar</packaging>
<version>0.0.2-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.5.RELEASE</version>
</parent>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.13</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
POM 2:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.firm</groupId>
<artifactId>projectB</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.5.RELEASE</version>
</parent>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Once you build a project via maven it automatically being added to maven local repository and you can reference it from any maven project inside pom.xml.
Please attach pom files for both project.
Edit:
add this dependency to projectA pom.xml file:
<dependency>
<groupId>com.firm</groupId>
<artifactId>projectB</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

building dependencies for Apache Spark on Eclipse

I would like to use eclipse for an Apache Spark project, but building dependencies appears not to work. I keep getting
"Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor (execution: default-descriptor, phase: generate-resources)"
Following the directions on the Apache spark site, https://spark.apache.org/docs/latest/programming-guide.html
I am running CDH5 cluster. using maven. Here is my generated pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven- 4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.1.0</version>
<packaging>jar</packaging>
<name>spark-core_2.10</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
</dependency>
<repositories>
<repository>
<id>Cloudera repository</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
I am a new Maven/POM user. How do i solve this issue and stop getting errors in my java code?
The error message seems to be related to m2e plugin. Take a look https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html.
However the pom you expose is strange, the groupId and artifactId should be related to the path and name of your project, and not to the dependency that you try to use (in this case, spark-core_2.10).

I get "The build could not read 1 project" in maven build because undefined versions

I've a parent-pom and a integration-pom:
integration pom
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>example-model</artifactId>
</dependency>
</dependencies>
<parent>
<groupId>com.example</groupId>
<artifactId>example-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
parent pom
<modules>
<module>../example-business</module>
<module>../example-integration</module>
<module>../example-model</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20131018</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>example-model</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
Now when I will do a clean install on the parent, I get the following error:
[INFO] Scanning for projects...
Downloading: http://www.example.com/content/groups/mirror/com/example/example-parent/0.0.1-SNAPSHOT/maven-metadata.xml
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.example:example-integration:0.0.1-SNAPSHOT (D:\dev\workspaces\example-git\example\example-integration\pom.xml) has 3 errors
[ERROR] 'dependencies.dependency.version' for org.json:json:jar is missing. # line 22, column 15
[ERROR] 'dependencies.dependency.version' for commons-httpclient:commons-httpclient:jar is missing. # line 27, column 15
[ERROR] 'dependencies.dependency.version' for com.example:example-model:jar is missing. # line 32, column 15
But when I take a look to the Effective POM of the integration pom, there are the version written.
So why I can't build it?
Edit:
Here is a snip of the EFFECTIVE POM view:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20131018</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>example-model</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>example-integration</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>example-business</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20131018</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>example-model</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>example-business</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
The problem is to do with your project structure and how you have defined the parent in the child poms.
Your child modules are actually in folders that are one level up from where your parent pom resides rather than in the same level (judging from <module>../example-business</module>). When maven tries to build the child modules it can not find the parent pom as it is not available in the maven repository (it is currently in the process of building it so it has not yet been uploaded).
To fix this you simply need to change the parent definition in the child poms to define a real relativePath to the location of the parent pom so that maven can find it. So change it to be something like the following:
<parent>
<groupId>com.example</groupId>
<artifactId>example-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../name-of-folder-containing-parent-pom</relativePath>
</parent>
Obviously you'll need to change name-of-folder-containing-parent-pom to be whatever the folder is.
Check why parent dependency is not getting solved in your local.
You might be missing something in settings.xml which resides in c:Users/name/.m2
Check if the credentials are correct and you have added all the artifactory links in case if they are not public.
I had same issue, Please check actual folder name in file explorer it should match what u defined as module in pom. eclipse might be showing project name differently than actual project name in explorer.
I too had similar issue and is solved by adding missed close tag below
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jexl</artifactId>
<version>2.1.1</version>
<dependency>
Same resolved as below:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jexl</artifactId>
<version>2.1.1</version>
</dependency>

Categories