While building my project I am getting unknown host exception while downloading the org.opensaml:opensaml:jar:2.6.6 jar.
I am using below dependencies in my project. And error I was receiving is as below.
<dependency>
<groupId>org.springframework.security.extensions</groupId>
<artifactId>spring-security-saml2-core</artifactId>
<version>1.0.10.RELEASE</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>2.6.1</version>
</dependency>
Error:
Could not resolve dependencies for project security:jar:1.0.0: Failed to collect dependencies at org.springframework.security.extensions:spring-security-saml2-core:jar:1.0.10.RELEASE -> org.opensaml:opensaml:jar:2.6.6: Failed to read artifact descriptor for org.opensaml:opensaml:jar:2.6.6: Could not transfer artifact org.opensaml:opensaml:pom:2.6.6 from/to central (https://repo.maven.apache.org/maven2/): transfer failed for https://repo.maven.apache.org/maven2/org/opensaml/opensaml/2.6.6/opensaml-2.6.6.pom: Unknown host No such host is known (repo.maven.apache.org) -> [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
Related
I need two dependencies from the same organization, but it seems the link to their source is broken.
First: https://mvnrepository.com/artifact/org.moxieapps.gwt/uploader
Second: https://mvnrepository.com/artifact/org.moxieapps.gwt/highcharts
<dependency>
<groupId>org.moxieapps.gwt</groupId>
<artifactId>uploader</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.moxieapps.gwt</groupId>
<artifactId>highcharts</artifactId>
<version>1.7.0</version>
</dependency>
[ERROR] Failed to execute goal on project ctap-web: Could not resolve dependencies
for project com.test:test-web:war:1.0.0-SNAPSHOT: The following artifacts could
not be resolved: org.moxieapps.gwt:uploader:jar:1.1.0,
org.moxieapps.gwt:highcharts:jar:1.7.0: Could not find artifact
org.moxieapps.gwt:uploader:jar:1.1.0 in central
(https://repo.maven.apache.org/maven2) -> [Help 1]
[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
I've downloaded the source from Sourceforge and placed it in .m2/repository/org/moxieapps/gwt/ but Maven still tries to download it from the central repo.
The jar org.moxieapps.gwt:uploader:jar:1.1.0 is not in MavenCentral, which you can see here:
https://search.maven.org/search?q=g:org.moxieapps.gwt%20AND%20a:uploader
Note that mvnrepository (the links you provided) have nothing to do with MavenCentral.
I am trying to schedule my project on Maven. It uses Apache POI. Project works fine on my Laptop but it fails to compile Maven on Jenkins that is on a remote machine in our office. The error I face is:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile** (default-testCompile) on project GunAV-test-automation: Compilation failure: Compilation failure:
[ERROR] /C:/Program Files (x86)/Jenkins/workspace/Mytest/-42/src/test/java/utilities/ReadExcel.java:[11,37] **package org.apache.poi.xssf.usermodel does not exist**
[ERROR] /C:/Program Files (x86)/Jenkins/workspace/Mytest/-42/src/test/java/utilities/ReadExcel.java:[12,37] package org.apache.poi.xssf.usermodel does not exist**
[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
How could I fix this issue?
To fix a compilation error
package org.apache.poi.xssf.usermodel does not exist
you should add a poi-ooxml maven dependency:
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
This dependency contains org.apache.poi.xssf.usermodel package.
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
This is just a demo project downloaded from : https://start.spring.io/
I am very new to this and don't know how to proceed
The Build error that I am getting.
[INFO] Scanning for projects...
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.0.4.RELEASE/spring-boot-starter-parent-2.0.4.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from/to central (https://repo.maven.apache.org/maven2): Unrecognized SSL message, plaintext connection? and 'parent.relativePath' points at no local POM # line 14, column 10
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.example:demo:0.0.1-SNAPSHOT (C:\Users\U660221\Downloads\demo\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from/to central (https://repo.maven.apache.org/maven2): Unrecognized SSL message, plaintext connection? and 'parent.relativePath' points at no local POM # line 14, column 10 -> [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
You can use a tag in your POM like this :
<parent>
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<version>1.5.7.RELEASE</version>
<relativePath/>
</parent>
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.