HA3: Maven dependency problems

0 votes
asked Nov 30, 2019 in SWSV by kecskemetyo (26 points)  

I am trying to set up the environment for the Home Assigntment. I'm using the SWSV image on the NIIF Cloud. I was following the steps written in the Project updates and environment issue but when I need to copy and rename the pom file I'm getting an error because the file and even the folder do not exist.

cp: cannot stat '4.1.3/core-4.1.3.pom': No such file or directory

My output for Java version:

java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (Zulu (build 1.8.0_232-b18)
OpenJDK 64-Bit Server VM (Zulu (build 25.232-b18, mixed mode)

What should I do?

commented Nov 30, 2019 by micskeiz (2,873 points)  
what was the output of mvn compile?

what is the content of ~/.m2/repository/eu/arrowhead/core
commented Dec 1, 2019 by kecskemetyo (26 points)  
cloud@cloud-5625:~/code/swsv-ha-2019-milegyenacsapatnev/src/arrowhead-java8$ cd orchestrator/
cloud@cloud-5625:~/code/swsv-ha-2019-milegyenacsapatnev/src/arrowhead-java8/orchestrator$ mvn compile
[INFO] Scanning for projects...
[INFO] ----------------< eu.arrowhead:arrowhead-orchestrator >-----------------
[INFO] Building Arrowhead Orchestrator 4.1.3
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/eu/arrowhead/arrowhead-core-common/4.1.3/arrowhead-core-common-4.1.3.pom
[WARNING] The POM for eu.arrowhead:arrowhead-core-common:jar:4.1.3 is missing, no dependency information available
Downloading from central: https://repo.maven.apache.org/maven2/eu/arrowhead/arrowhead-core-common/4.1.3/arrowhead-core-common-4.1.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.938 s
[INFO] Finished at: 2019-12-01T13:19:37+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project arrowhead-orchestrator: Could not resolve dependencies for project eu.arrowhead:arrowhead-orchestrator:jar:4.1.3: Could not find artifact eu.arrowhead:arrowhead-core-common:jar:4.1.3 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
cloud@cloud-5625:~/code/swsv-ha-2019-milegyenacsapatnev/src/arrowhead-java8/orchestrator$ pushd ~/.m2/repository
~/.m2/repository ~/code/swsv-ha-2019-milegyenacsapatnev/src/arrowhead-java8/orchestrator
cloud@cloud-5625:~/.m2/repository$ cd eu/arrowhead/core
bash: cd: eu/arrowhead/core: No such file or directory
cloud@cloud-5625:~/.m2/repository$ cd eu/arrowhead
cloud@cloud-5625:~/.m2/repository/eu/arrowhead$ ls
cloud@cloud-5625:~/.m2/repository/eu/arrowhead$$ arrowhead-core-common/4.1.3/
cloud@cloud-5625:~/.m2/repository/eu/arrowhead/arrowhead-core-common/4.1.3$ ls
arrowhead-core-common-4.1.3.jar.lastUpdated  arrowhead-core-common-4.1.3.pom.lastUpdated

I tried to delete the whole .m2 folder and restart the process but it did not help. When I first tried there was a core folder in ~/.m2/repository/eu/arrowhead but after serveral tryings it not created anymore.
commented Dec 1, 2019 by micskeiz (2,873 points)  
Try to first compile from the src/arrowhead-java folder.

If you merged the updates successfully, there should be a pom.xml there, and the project should compile from there.
commented Dec 3, 2019 by micskeiz (2,873 points)  
Was it successful?

1 Answer

+2 votes
answered Dec 3, 2019 by micskeiz (2,873 points)  
selected Dec 3, 2019 by kecskemetyo
Best answer

Before any commands, first install the project into the local Maven repository with

mvn install -DskipTests

After that there will be a core folder with the main pom.