I am running into an issue while trying to run an mvn command.this is what I am doing:
enaxromac:ios enaxro$ mvn -f TTTTT/pom.xml
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.xxxxxx.xxxxxx.ios.xxxxxx:xxxx:2.0.0-SNAPSHOT (/Users/enaxro/projects/xxxxx/main/xxxxxx/xxx/xxxxxxx/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.xxxxx.xxxxx.ios:root:2.0.0-SNAPSHOT: Failure to find com.xxxxx.maven.parent:legacy:pom:1.0.11 in http://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 # com.xxxx.xxxxxx.ios:root:2.0.0-SNAPSHOT, /Users/enaxro/projects/xxxx/main/xxxxx/ios/pom.xml, line 3, 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
My setup is the following:
enaxromac:ios enaxro$ mvn --version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500)
Maven home: /usr/share/maven
Java version: 1.6.0_37, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"
Check your settings.xml file. It should be in
<Userdir>/.m2
directory alongside the repository directory. This is one of the major reasons why we get the non-resolvable parent error. Also, for other possible solutions, check out this post:
http://java.dzone.com/articles/mavens-non-resolvable-parent
Your parent Pom is being looked into the default maven repo.
You need to change your settings.xml and add the repo there.
Related
I'm getting the following errors when starting an app:
Error:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.091 s
[INFO] Finished at: 2019-11-29T09:36:53Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project dbproxy: Fatal error compiling: error: invalid target release: 13.0.1 -> [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/MojoExecutionException
Makefile:53: recipe for target '/root/hue/desktop/libs/librdbms/java-lib/dbproxy-1.0.jar' failed
make[2]: *** [/root/hue/desktop/libs/librdbms/java-lib/dbproxy-1.0.jar] Error 1
make[2]: Leaving directory '/root/hue/desktop/libs/librdbms'
Makefile:106: recipe for target '.recursive-env-install/libs/librdbms' failed
make[1]: *** [.recursive-env-install/libs/librdbms] Error 2
make[1]: Leaving directory '/root/hue/desktop'``
Makefile:148: recipe for target 'desktop' failed
make: *** [desktop] Error 2
mvn --version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 13.0.1, vendor: Oracle Corporation, runtime: /usr/local/java
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-52-generic", arch: "amd64", family: "unix"
openjdk 13.0.1 2019-10-15
OpenJDK Runtime Environment (build 13.0.1+9)
OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
Please help me to resolve the issue.
Your error says
Fatal error compiling: error: invalid target release: 13.0.1
You are using maven-compiler-plugin 3.0 however you need at least 3.8 to work with Java 13. This can be done with <plugin> tag, although you probably should consider updating Maven to 3.5:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>13</source>
<target>13</target>
</configuration>
</plugin>
Take a look at this article to see what else is needed to work with Java 13.
I have a large java project managed using maven.
We are using Maven 3 for management (specifically 3.6.0).
In the project, there is a sub=project with a runtime-v5.pom.xml.
In said pom, there is a version property
<properties>
<platform-v5.version>73.2.05</platform-v5.version>
</properties>
Which is used later in the file
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.company.thing.platform</groupId>
<artifactId>platform-parent</artifactId>
<version>${platform-v5.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.company.release</groupId>
<artifactId>platform-v5</artifactId>
<version>${platform-v5.version}</version>
<type>resolved-pom</type>
</dependency>
</dependencies>
</dependencyManagement>
My goal is to get maven to pull in the most recent version of platform and I don't want to update the version in this file every time. I thought that changing the specific version to a range would allow the project to always pull in the most recent version in accordance with the given range.
When the platform-v5.version is set to a specific existing version, it builds just fine, but when setting the version to a range such as [73.2.05,), I get errors such as
[INFO] Scanning for projects...
[INFO] Downloading from all_global_universal: https://nexus.company/platform-parent/%5B73.2.05,).pom
[ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact com.company.thing.platform:platform-parent:pom:[73.2.05,) in all_global_universal (https://nexus.company/content/groups/all_global_universal) # com.company:runtime-v5:[unknown-version], path/to/runtime-v5.pom.xml, line XX, column YY
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.company:runtime-v5:1.0.2 (path/to/runtime-v5.pom.xml) has 1 error
[ERROR] Non-resolvable import POM: Could not find artifact com.company.thing.platform:platform-parent:pom:[73.2.05,) in all_global_universal (https://nexus.company/content/groups/all_global_universal) # com.company:runtime-v5:[unknown-version], path/to/runtime-v5.pom.xml, line XX, column YY -> [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
Essentially, I want to know: Why can't you provide version ranges in the maven dependency management import scope?
While version ranges are not exactly deprecated, they are no longer considered a best practise. The modern way would be to run an appropriate update goal before the build so that the version numbers in the pom are the newest ones available.
This is a duplicate of Using maven dependency management import scope with version ranges
This Maven issue was resolved and will be released in Maven 4.0.0: https://issues.apache.org/jira/browse/MNG-4463
I tried to build LogicalDoc 6.7.1 with JDK 1.7, maven 3.0.3 and Ant 1.7
but it does not work and get these error , please help?
D:\maqtary\logicaldoc-6.7.1-src\build\poms>mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 09:31:09-0800)
Maven home: C:\Users\PC\Downloads\apache-maven-3.0.3
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_80\jre
Default locale: en_US, platform encoding: Cp1256
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
D:\maqtary\logicaldoc-6.7.1-src\build\poms>mvn install
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.logicaldoc:logicaldoc-parent-pom:62
(D:\maqtary\logicaldoc-6.7.1-src\build\poms\pom.xml) has 1 error
[ERROR] Unresolveable build extension: Error resolving version for plugin
'org.apache.maven.wagon:wagon-ssh' from the repositories [local
(C:\Users\PC\.m2\repository), central (http://repo1.maven.
org/maven2)]: Plugin not found in any plugin repository -> [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/PluginVersionResolutionException
D:\maqtary\logicaldoc-6.7.1-src\build\poms>
</code></pre>
As the error message states, your maven build is failing because something in D:\maqtary\logicaldoc-6.7.1-src\build\poms\pom.xml is telling it to use the maven plugin org.apache.maven.wagon:wagon-ssh, which doesn't exist in maven central repository, or your local repository, and thus the build fails.
It looks like said plugin can be found here
I have downloaded and imported all the tutorials available in the below git
https://github.com/opendaylight/coretutorials/tree/master/toaster
While doing a maven install i am getting the below issue
[INFO] Scanning for projects...
[INFO] Downloading: http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/odlparent/odlparent/1.6.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.opendaylight.odlparent:odlparent:1.6.0-SNAPSHOT/maven-metadata.xml from/to opendaylight-snapshot (http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/): connect timed out
[INFO] Downloading: http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/odlparent/odlparent/1.6.0-SNAPSHOT/odlparent-1.6.0-SNAPSHOT.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.opendaylight.toaster:toaster-parent:0.1.0-SNAPSHOT: Could not transfer artifact org.opendaylight.odlparent:odlparent:pom:1.6.0-SNAPSHOT from/to opendaylight-snapshot (http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/): connect timed out and 'parent.relativePath' points at no local POM # line 16, column 13
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.opendaylight.toaster:toaster-parent:0.1.0-SNAPSHOT (C:\Users\609620968\Documents\coretutorials\toaster\ch7-ToasterJMX\parent\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.opendaylight.toaster:toaster-parent:0.1.0-SNAPSHOT: Could not transfer artifact org.opendaylight.odlparent:odlparent:pom:1.6.0-SNAPSHOT from/to opendaylight-snapshot (http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/): connect timed out and 'parent.relativePath' points at no local POM # line 16, 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
Am i missing some thing?. it is not able to find the oldparent odlparentlite etc. is there a way to add this into my local maven.
The version specified for the artifact is wrong. Please check this link and correct the version.
I'm using https://github.com/webdevwilson/magento-java to connect to my store magento with JAVA for integration system. I installed Maven, openjdk-6-jdk, set up home for java, etc. My information is:
sudo java -version
java version "1.6.0_36"
OpenJDK Runtime Environment (IcedTea6 1.13.8) (6b36-1.13.8-0ubuntu1~14.04)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
sudo mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.6.0_36, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-43-generic", arch: "amd64", family: "unix"
And when i try in folder for package with contains POM.xml file:
sudo mvn package or sudo mvn install for compile the result is:
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.511s
[INFO] Finished at: Sun Aug 30 19:50:12 EDT 2015
[INFO] Final Memory: 12M/71M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project magento-ws-client: Compilation failure: Compilation failure:
[ERROR] /magento-java/src/main/java/com/magi/magento/service/BaseService.java:[27,34] cannot find symbol
[ERROR] symbol : method getMage_Api_Model_Server_V2_HandlerPort(java.net.URL)
[ERROR] location: interface com.magi.magento.ws.client.MagentoService
[ERROR] /magento-java/src/main/java/com/magi/magento/service/OrderService.java:[112,44] incompatible types
[ERROR] found : com.magi.magento.ws.client.SalesOrderListEntity[]
[ERROR] required: com.magi.magento.ws.client.SalesOrderEntity[]
[ERROR] -> [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/MojoFailureException
Attention for:
[ERROR] /magento-java/src/main/java/com/magi/magento/service/BaseService.java:[27,34] cannot find symbol
[ERROR] /magento-java/src/main/java/com/magi/magento/service/OrderService.java:[112,44] incompatible types
I have tried to CHANGE version of compiler maven in POM FILE here:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
But the error persists, what should I do? And yes, i tried every tip or link when searched in google, nothing solves. Thanks in advance.