Maven Cannot Resolve Local Dependency - java

I have a maven project with an in-project repository with an external jar file.
I used the install command to install the jar file into the in-porject repository
and when I checked in the repository the jar file was installed
i also added the dependency configuration in the pom file.
But when I run the mvn compile file.
I get the error that mvn cannot resolve the dependency
this is the Pom snippet:
<repository>
<id>repo</id>
<releases>
<enabled>true</enabled>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>file://${project.basedir}/repo</url>
</repository>
this is the dependency in POM
<dependency>
<groupId>Com.RubineEngine.GesturePoints</groupId>
<artifactId>Com-RubineEngine-GesturePoints</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
this is the error message :
[INFO] Final Memory: 6M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project com-boundingbox-box: Could not resolve
dependencies for project com.boundingbox.box:com-boundingbox-box:jar:1.0-SNAPSH
OT: Could not find artifact Com.RubineEngine.GesturePoints:Com-RubineEngine-Gest
urePoints:jar:1.0-SNAPSHOT -> [Help 1]
[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/DependencyReso
lutionException
Does anybody have any suggestion about this error.
this is the error message after using the U and X switches
[DEBUG] =======================================================================
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for file://C:\U
sers\FAISAL\Desktop\disaster\com-initialtheta-theta/repo
Downloading: file://C:\Users\FAISAL\Desktop\disaster\com-initialtheta-theta/repo
/Com/RubineEngine/GesturePoints/Com-RubineEngine-GesturePoints/1.0-SNAPSHOT/mave
n-metadata.xml
[DEBUG] Writing resolution tracking file C:\Users\FAISAL\.m2\repository\Com\Rubi
neEngine\GesturePoints\Com-RubineEngine-GesturePoints\1.0-SNAPSHOT\resolver-stat
us.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo
.typesafe.com/typesafe/releases/
Downloading: http://repo.typesafe.com/typesafe/releases/Com/RubineEngine/Gesture
Points/Com-RubineEngine-GesturePoints/1.0-SNAPSHOT/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:\Users\FAISAL\.m2\repository\Com\Rubi
neEngine\GesturePoints\Com-RubineEngine-GesturePoints\1.0-SNAPSHOT\resolver-stat
us.properties
[DEBUG] Could not find metadata Com.RubineEngine.GesturePoints:Com-RubineEngine-
GesturePoints:1.0-SNAPSHOT/maven-metadata.xml in typesafe (http://repo.typesafe.
com/typesafe/releases/)
[DEBUG] Could not find metadata Com.RubineEngine.GesturePoints:Com-RubineEngine-
GesturePoints:1.0-SNAPSHOT/maven-metadata.xml in lib (file://C:\Users\FAISAL\Des
ktop\disaster\com-initialtheta-theta/repo)
[DEBUG] Skipped remote update check for Com.RubineEngine.GesturePoints:Com-Rubin
eEngine-GesturePoints:1.0-SNAPSHOT/maven-metadata.xml, already updated during th
is session.
[DEBUG] Failure to find Com.RubineEngine.GesturePoints:Com-RubineEngine-GestureP
oints:1.0-SNAPSHOT/maven-metadata.xml in http://repo.typesafe.com/typesafe/relea
ses/ was cached in the local repository, resolution will not be reattempted unti
l the update interval of typesafe has elapsed or updates are forced
[DEBUG] Skipped remote update check for Com.RubineEngine.GesturePoints:Com-Rubin
eEngine-GesturePoints:1.0-SNAPSHOT/maven-metadata.xml, already updated during th
is session.
[DEBUG] Failure to find Com.RubineEngine.GesturePoints:Com-RubineEngine-GestureP
oints:1.0-SNAPSHOT/maven-metadata.xml in file://C:\Users\FAISAL\Desktop\disaster
\com-initialtheta-theta/repo was cached in the local repository, resolution will
not be reattempted until the update interval of lib has elapsed or updates are
forced
Looks like the system is getting confuse between two repositories.

Check, if the groupId/artifactId are set correctly in the pom file of the libs in your project's repository (i.e. ${project.baseDir}\repo\Com....\1.0-SNAPSHOT\Com-RubineEngine-GesturePoints.pom)
To get rid of "resolution will not be reattempted until the update interval of lib has elapsed or updates are forced" error you need to delete the folders from your local repository (usually ~/.m2), i.e. ~/.m2/Com/RubineEngine.

Try changing snapshots enabled to true.
<snapshots>
<enabled>true</enabled>
</snapshots>

Related

Not able to upload artifacts to Nexus from the same machine using mvn clean deploy, works fine from my local Windows 10 machine

Java 11
I have a very basic Spring Boot application that I would like to build and deploy the artifacts on a Nexus sever.
mvn clean deploy (from my local Win 10 machine - WORKS !!!)
mvn clean deploy (from Nexus machine - FAILS ????)
mvn clean deploy (from Jenkins - FAILS ????)
When I run mvn clean deploy command from my local Win 10 machine all the artifacts get deployed successfully on remote Nexus server and I can even see and browse them.
But when I clone the project and run mvn clean deploy on the very same machine where both Nexus and Jenkins (Ubuntu box) are installed it gives me Not authorized error.
I have already copied over BOTH settings.xml and settings-security.xml from my local Windows machine to Ubuntu (~/.m2) where Nexus is installed.
I have disabled the firewalls as well just to be sure that no ports are blocked.
I am confused how the artifacts are getting copied over from a remote machine but not from the same machine.
pom.xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<addResources>true</addResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>my-maven-snapshots</id>
<url>http://my-nexus-server/nexus/repository/maven-snapshots/</url>
</snapshotRepository>
<repository>
<id>my-maven-releases</id>
<url>http://my-nexus-server/nexus/repository/maven-releases/</url>
</repository>
</distributionManagement>
<scm>
<connection>scm:git:https://johndoe#bitbucket.org/johndoe/todo.git</connection>
<url>https://johndoe#bitbucket.org/johndoe/todo</url>
<developerConnection>scm:git:https://johndoe#bitbucket.org/johndoe/todo.git</developerConnection>
<tag>HEAD</tag>
</scm>
Error (Nexus is installed on this machine):
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # todo ---
[INFO] Installing /home/admin/cloned-apps/todo/pom.xml to /home/admin/.m2/repository/com/example/todo/0.0.2-SNAPSHOT/todo-0.0.2-SNAPSHOT.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) # todo ---
Downloading from my-maven-snapshots: http://my-nexus-server/nexus/repository/maven-snapshots/com/example/todo/0.0.2-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata com.example:todo:0.0.2-SNAPSHOT/maven-metadata.xml from/to my-maven-snapshots (http://my-nexus-server/nexus/repository/maven-snapshots/): Not authorized , ReasonPhrase:Unauthorized.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for todo 0.0.2-SNAPSHOT:
[INFO]
[INFO] todo ............................................... FAILURE [ 4.622 s]
[INFO] todo-webapp ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.973 s
[INFO] Finished at: 2020-04-16T02:39:48Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project todo: Failed to retrieve remote metadata com.example:todo:0.0.2-SNAPSHOT /maven-metadata.xml: Could not transfer metadata com.example:todo:0.0.2-SNAPSHOT/maven-metadata.xml from/to my-maven-snapshots (http://my-nexus-server/nexus/repository/maven-snapshots/ ): 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/MojoExecutionException
mvn clean deploy (from Nexus machine - FAILS ????)
Are you sure you're running mvn clean deploy from the same user under whose $HOME/.m2 directory you've copied the settings.xml and settings-security.xml files?
Also, did you try adding the password directly to settings.xml to rule out issues (if any) with settings-security.xml?
P.S: Avoid running mvn commands with sudo privilege.

How do I stop online searching by maven connectors?

How do I stop the online searching by maven m2e connectors for the dependencies when I have already overridden the functionality for them to have local library instead of central by pom file by giving url like :
<repository>
<id>central</id>
<url>file://${basedir}/library</url>
</repository>
My all other files get downloaded(I mean copied) from the library which exists at local except some which I have not included in the library. Is there any way that connector too only search for the local library. My log is something like below.
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------
[INFO] Total time: 5.413 s
[INFO] Finished at: 2017-09-18T15:22:36-05:00
[INFO] Final Memory: 12M/125M
[INFO] ------------------------------------------------------------------
------
[ERROR] Failed to execute goal on project myproject: Could not resolve
dependencies for project com.company.product:myproject:jar:1.0: Failed to
collect dependencies at org.glassfish.jersey.media:jersey-media-json-
jackson:jar:2.19 -> com.fasterxml.jackson.jaxrs:jackson-jaxrs-
base:jar:2.5.1 -> com.fasterxml.jackson.core:jackson-core:jar:2.5.1:
Failed to read artifact descriptor for
com.fasterxml.jackson.core:jackson-core:jar:2.5.1: Could not transfer
artifact com.fasterxml.jackson.core:jackson-core:pom:2.5.1 from/to
release.maven.java.net (https://maven.java.net/content/groups/public):
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target -> [Help 1]
[ERROR]
Here I am running package as a goal. I can provide more details if you ask.
Quite simple, ask your central repository to get redirected to local repository in your settings.xml file. Example given below. Let me know if further help required.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
...
<mirrors>
<mirror>
<id>central-repo</id>
<name>Local repo</name>
<url>http://<localhost>/central</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
...
</settings>
You can try -o option (offline).
Example command line:
mvn clean package -o

maven settings.xml properties are not seen in pom

i have in settings.xml following config
<profile>
<properties>
<nexus.host>http://localhost:8081/nexus/content/repositories</nexus.host>
</properties>
</profile>
this profile is set as active.
its used in distribution management section of pom
<distributionManagement>
<snapshotRepository>
<id>my-snapshots</id>
<name>my snapshots</name>
<url>${nexus.path}/snapshots</url>
</snapshotRepository>
<repository>
<id>my-releases</id>
<name>my releases</name>
<url>${nexus.path}/releases</url>
</repository>
</distributionManagement>
this works when i run it on local machine, but when the job is executed on jenkins it fails with
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Failure to transfer
com.myapp:sample:pom:1.1.0 from ${nexus.path}/releases was cached in
the local repository, resolution will not be reattempted until the
update interval of my-releases has elapsed or updates are forced.
Original error: Could not transfer artifact com.myapp:sample:pom:1.1.0
from/to my-releases (${nexus.path}/releases): Cannot access
${nexus.path}/releases with type default using the available connector
factories: WagonRepositoryConnectorFactory and 'parent.relativePath'
points at wrong local POM # line 3, column 13
unable to identify the cause of the error
I had the same issue in the past. To resolve this in Jenkins you will need to set the Maven argument so it can find the location of your settings.xml.
You will need to have the settings.xml in the application resources so Jenkins can find it.
To set the argument(In Jenkins, it should be under Goals and options):
-s src/main/resources/settings.xml
However in my instance the Jenkins administrators provided a separate version of maven so the application will have the needed settings.xml and there was no need to provide our own custom settings.xml.
On a side note, you might want to contact the Jenkins Administrators to ensure that they have implemented the proper configurations so Jenkins will be able to deploy the produced artifacts to the repository under the id you have specified.

Hudson Maven ${basedir} can't find dependency

I have a created a maven repo in a directory called lib in the base of my project.
I can use maven to build this project and fetch dependencies from the repo in the lib directory. When I try to build this project with Hudson, Hudson can not find the dependencies in the lib repo.
Here are the relevant parts of the project pom:
<dependency>
<groupId>manitou</groupId>
<artifactId>manitou.cxf.jar</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>ErpClientsLibRepo</id>
<url>file://${basedir}/lib</url>
</repository>
</repositories>
Here are the errors from Maven when ran from Hudson:
[INFO] o.h.m.e.h.MavenExecutionResultHandler - Build failed with exception(s)
[INFO] o.h.m.e.h.MavenExecutionResultHandler - [1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project DigabitERPClients: Could not resolve dependencies for project com.digabit:DigabitERPClients:jar:1.2.0: Failure to find manitou:manitou.cxf.jar:jar:1.0.0 in file:///opt/eng/hudson/jobs/20-DigabitJParent/workspace/DigabitErpClients/lib was cached in the local repository, resolution will not be reattempted until the update interval of ErpClientsLibRepo has elapsed or updates are forced
[DEBUG] Closing connection to remote
[ERROR] Failed to execute goal on project DigabitERPClients: Could not resolve dependencies for project com.digabit:DigabitERPClients:jar:1.2.0: Failure to find manitou:manitou.cxf.jar:jar:1.0.0 in file:///opt/eng/hudson/jobs/20-DigabitJParent/workspace/DigabitErpClients/lib was cached in the local repository, resolution will not be reattempted until the update interval of ErpClientsLibRepo has elapsed or updates are forced -> [Help 1]
Here is a dir listing at the path Maven (As ran by Hudson) seems to be looking at:
[root#vail lib]# cd /opt/eng/hudson/jobs/20-DigabitJParent/workspace/DigabitErpClients/lib
[root#vail lib]# ls
manitou
[root#vail lib]# ls manitou/
manitou.cxf.jar
[root#vail lib]#
Any ideas what I'm doing wrong? Thanks
I went into the hudson project and forced maven to update, now the build works :S

Maven Failed to Find dependency

I am using Maven Version 3.1.1. And I am trying to compile with dependency springs-ws. I see that this should exist in Maven via the following sites:
Maven Repository
Maven Search
Here is the Stack Trace from a "mvn compile -e":
>mvn compile -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Test 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.233s
[INFO] Finished at: Tue Dec 10 13:44:36 CST 2013
[INFO] Final Memory: 6M/122M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Test: Could not resolve depe
ndencies for project Test:Test:jar:1.0.0: Failure to find org.spri
ngframework.ws:spring-ws:jar:2.1.4.RELEASE in http://repo.maven.apache.org/maven
2 was cached in the local repository, resolution will not be reattempted until t
he update interval of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
n project Test: Could not resolve dependencies for project Test:Co
rrectAddress:jar:1.0.0: Failure to find org.springframework.ws:spring-ws:jar:2.1
.4.RELEASE in http://repo.maven.apache.org/maven2 was cached in the local reposi
tory, resolution will not be reattempted until the update interval of central ha
s elapsed or updates are forced
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
pendencies(LifecycleDependencyResolver.java:220)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resol
veProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAr
eResolved(MojoExecutor.java:257)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not res
olve dependencies for project Test:Test:jar:1.0.0: Failure to find
org.springframework.ws:spring-ws:jar:2.1.4.RELEASE in http://repo.maven.apache.
org/maven2 was cached in the local repository, resolution will not be reattempte
d until the update interval of central has elapsed or updates are forced
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
efaultProjectDependenciesResolver.java:198)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
pendencies(LifecycleDependencyResolver.java:195)
... 22 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failure
to find org.springframework.ws:spring-ws:jar:2.1.4.RELEASE in http://repo.maven.
apache.org/maven2 was cached in the local repository, resolution will not be rea
ttempted until the update interval of central has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDepen
dencies(DefaultRepositorySystem.java:384)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
efaultProjectDependenciesResolver.java:192)
... 23 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to
find org.springframework.ws:spring-ws:jar:2.1.4.RELEASE in http://repo.maven.ap
ache.org/maven2 was cached in the local repository, resolution will not be reatt
empted until the update interval of central has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(Defa
ultArtifactResolver.java:459)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtif
acts(DefaultArtifactResolver.java:262)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDepen
dencies(DefaultRepositorySystem.java:367)
... 24 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to fin
d org.springframework.ws:spring-ws:jar:2.1.4.RELEASE in http://repo.maven.apache
.org/maven2 was cached in the local repository, resolution will not be reattempt
ed until the update interval of central has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newExcepti
on(DefaultUpdateCheckManager.java:232)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtif
act(DefaultUpdateCheckManager.java:206)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownlo
ads(DefaultArtifactResolver.java:599)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownl
oads(DefaultArtifactResolver.java:518)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(Defa
ultArtifactResolver.java:436)
... 26 more
[ERROR]
[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/DependencyReso
lutionException
Please let me know if I should post any other information to help. Any help is greatly appreciated.
UPDATE:
<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>Test</groupId>
<artifactId>Test</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws</artifactId>
<version>2.1.4.RELEASE</version>
</dependency>
</dependencies>
</project>
UPDATE 2:
After deleting the existing repository, and rerunning mvn compile. I still get the error.
[ERROR] Failed to execute goal on project Test: Could not resolve depe
ndencies for project Test:Test:jar:1.0.0: Could not find artifact
org.springframework.ws:spring-ws:jar:2.1.4.RELEASE in central (http://repo.maven
.apache.org/maven2), try downloading from http://www.springsource.com/download/c
ommunity?project=Spring%20Web%20Services -> [Help 1]
Looking at The Central Repository
If you do a search for spring-ws you'll see that there is only a pom file available for download for what you precisely specified in your pom.xml.
Looks like you might want to use spring-ws-core like so:
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
<version>2.1.4.RELEASE</version>
</dependency>
I don't know if there's a more "regular" way to do this: go to your local maven repository, cd to the directory where that dependency is supposed to be and delete all files (you could even delete the whole org/sprimgframework/ws) then relaunch mvn. It will try to reload all missing dependency.
Look for your settings.xml file which is what maven uses to find your repositories. See what repo it's pointing to and examine that repo to make sure the jars you want exist there.
For example
<profiles>
<profile>
<id>default</id>
<repositories>
<repository>
<id>smss-group-m2</id>
<url>http://repo.mycompany.net/nexus/content/groups/smss-group-m2/</url>
<releases>
<updatePolicy>always</updatePolicy>
</releases>
<repository>
</repository>
</profile>
</profiles>
In the settings.xml file make sure you paste same url of nexus or jfrog repo when you login, whatever url appear on top paste that same
ex:https://artifactory.xxxx/artifactory/webapp/#/home

Categories