Maven errors when install on an Eclipse project - java

I'm trying to install maven on four projects. Let me explain the context :
I have a project (not mine), and I'm trying to run it but I have errors in the code and it's obviously maven errors. I have configured the Maven Environnement with this tuto : http://www.tutorialspoint.com/maven/maven_environment_setup.htm and it seems to work.
About the project, the entire project is dividing in four projects. I own only this four project, maybe they don't give me all the sources of the project (stupid) but why not.
So I'm trying to install maven in each projects and I have some errors, could you tell me what it means please ? And what should I do to resolve it ?
Text version :
C:\Users\Lison\workspace\Persyst_1.4>mvn clean install -U
[INFO] Scanning for projects...
Downloading:
https://repo.maven.apache.org/maven2/eu/akka/AkkaToulouseSuperPom/1
.0/AkkaToulouseSuperPom-1.0.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for fr.inra.grignon:persyst:1.0-SNAPSHOT: Coul
d not find artifact eu.akka:AkkaToulouseSuperPom:pom:1.0 in central (https://rep
o.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM #
line 6, column 10
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project fr.inra.grignon:persyst:1.0-SNAPSHOT (C:\Users\Lison\works
pace\Persyst_1.4\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for fr.inra.grignon:persyst:1.0-SNAPSHOT:
Could not find artifact eu.akka:AkkaToulouseSuperPom:pom:1.0 in central (https:/
/repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local P
OM # line 6, column 10 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableMo
delException
**EDIT : **
Project 1
>src
>compile
>pom.xml
Project 2
>src
>pom.xml
Project 3
>src
>pom.xml
Project 4
>src
>pom.xml

It is showing
Non-resolvable parent POM for fr.inra.grignon:persyst:1.0-snapshot
it means this indicates that maven did search locally for the parent pom, but found that it was not the correct pom or missing. if the project is multimodule it should have parent project.
Reference For multimodule Project you may check this link:
https://maven.apache.org/guides/mini/guide-multiple-modules.html

Related

Issue downloading one Maven dependency

I get this error when running mvn clean install:
[ERROR] Failed to execute goal on project Hian-Persistence-Direct: Could not resolve dependencies for project ue.hian:Hian-Persistence-Direct:jar:3.0: Failed to collect dependencies at com.ibatis:ibatis2:jar:2.3.0.677: Failed to read artifact descriptor for com.ibatis:ibatis2:jar:2.3.0.677: Could not transfer artifact com.ibatis:ibatis2:pom:2.3.0.677 from/to maven-public (https://binaries.me.com/artifactory/public-maven): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]
[ERROR]
[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]
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :Hian-Persistence-Direct
I'm running this in the command line. Is it possible that I don't have maven configured correctly? Failing that, how do I get the full path to the problem dependency? I'd like to check if I can reach it through the browser.
I had an incorrect password to the artifact in my settings.xml

Can't compile Artifactory 7.10.2

After JFrog released the source code for Artifactory 7.10.2, I tried to build it, without success.
The project seems to be a maven one (there is a pom.xml in the root project, so I guess so).
From the root of the project I gave the usual mvn package, but this resulted in an error:
$ mvn package
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.artifactory:artifactory-parent:7.10.2: Failure to find org.jfrog.common:jfrog-parent-pom:pom:7.10.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM # line 21, column 13
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.artifactory:artifactory-parent:7.10.2 (/tmp/jfrog-artifactory-7.10.2/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.artifactory:artifactory-parent:7.10.2: Failure to find org.jfrog.common:jfrog-parent-pom:pom:7.10.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM # line 21, column 13 -> [Help 2]
[ERROR]
[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]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
It seems that the project itself requires a local dependency, that it is not available to the tar.gz released though.
Looking at the 6.23.x source code there is a reference to artifactory-parent that is missing here, but I don't think it will compile using the old dependency.
Finally, I checked the build/ci folder, where there is a pipelines_build.sh script, but when launching it I have another error:
./pipelines_build.sh
./pipelines_build.sh: line 6: /tmp/build/ci/scripts/lib/buildInfoUtils.sh: No such file or directory
It seems that also here the tarball doesn't contain all the information in order to build the product.
For what it matters, I found the source code from this answer: Where is the Artifactory OSS source code located?
I'm doing something wrong? Can anyone help me building Artifactory?
You need to use JCenter not Maven central. Goto jcenter and download the settings.xml and then try again.

Cannot use lagom on IntelliJ for my Maven project

I started a new Maven project and try to get lagom to work on my Maven project. On my Run Configurations I have inputted lagom:runAll under Command Line. However, when I run my project I get the following error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.578 s
[INFO] Finished at: 2020-01-17T11:25:31+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'lagom' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/andrea/.m2/repository), spring-milestones (https://repo.spring.io/milestone), spring-snapshots (https://repo.spring.io/snapshot), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[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]
[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/NoPluginFoundForPrefixException
Does anyone understand why I am unable to spot lagom library? Thanks in advance for the help, cheers!
Problem is that Maven does not know anything about external plugins by default, and this extends to modules. Unless told so in the pom.xml (which implicitly implies any parent poms) a module has no knowledge of what happens in other modules.
Either you need to invoke lagom with the full artifact name or you need to configure lagom in your pom.xml (preferably using dependency management in the parent pom)

Maven "Non-resolvable parent POM" when pom is already in Maven Central

I have an open source project (https://github.com/mikera/vectorz) that uses a parent pom that is deployed on Maven Central (http://search.maven.org/#artifactdetails%7Cnet.mikera%7Cmikera-pom%7C0.2.0%7Cpom)
However I have started to get a strange error:
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project net.mikera:vectorz:0.39.1-SNAPSHOT (C:\Users\Mike\git\vect
orz\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not find artifact net.mikera:mikera
-pom:pom:0.2.0 in clojars.org (http://clojars.org/repo) and 'parent.relativePath
' points at wrong local POM # line 9, column 10 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableMo
delException
What could be causing this? Note that:
I'm 99% certain the parent pom has been successfully released on Central
clojars repo shouldn't even be required for the build
I'm running on Windows (though the issue seems to be affecting others on Linux too)
I have had projects like this working previously, however I recently upgraded to Maven 3.2.2 - could that be causing this error?
P.S. I tried checking my local .m2 repository and all it contains is a .lastUpdated file with the folloing content:
#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Mon Aug 11 13:23:30 SGT 2014
http\://repo.maven.apache.org/maven2/.lastUpdated=1407734610196
http\://clojars.org/repo/.lastUpdated=1407734609627
http\://clojars.org/repo/.error=
http\://repo.maven.apache.org/maven2/.error=
Any ideas how to resolve this?

'mvn install' does not work & shows error while attempting to download

I am using maven 3.0.2 version.
mvn --version works fine on command line but when I try
mvn install it does not work & shows following error.
Z:\dev\hector rantav>mvn install
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project me.prettyprint:hector:0.7.0-24-SNAPSHOT (Z:\dev\hector ran
tav\pom.xml) has 1 error
[ERROR] Unresolveable build extension: Plugin org.apache.maven.scm:maven-scm
-manager-plexus:1.3 or one of its dependencies could not be resolved: Could not
transfer artifact junit:junit:jar:3.8.2 from/to central (http://repo1.maven.org/
maven2): Error transferring file: repo1.maven.org: Unknown host repo1.maven.org
-> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
Please let me how I can fix this.
Proxy usage is a factor, hope this will help: Maven Guide to Using Proxies
If your proxy requires NTLM authentication, you'll also probably need cntlm
The http://repo1.maven.org/maven2/ repository is down quite often, so maybe you were just out of luck that time.

Categories