Bukkit Maven sk89q's command framework - java

I am developing a bukkit plugin with maven as my dependency manager. I am trying to use sk89q's command framework. However, maven doesn't find the dependency. Here is my pom.xml:
<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>com.muukrls.minelol</groupId>
<artifactId>MineLoL</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>MineLoL</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>repo.oc.tc</id>
<url>https://repo.oc.tc/content/repositories/releases/</url>
</repository>
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.7.9-R0.1</version>
<scope>provided</scope>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>command-framework-core</artifactId>
<version>0.4</version>
</dependency>
</dependencies>
</project>
This is the stacktrace: What I think is the problem is that it is looking in the bukkit repo for the command framework. But how would I fix that
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethrea
ded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MineLoL 0.0.1
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.283 s
[INFO] Finished at: 2014-05-28T17:34:22+01:00
[INFO] Final Memory: 5M/115M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project MineLoL: Could not resolve dependencie
s for project com.muukrls.minelol:MineLoL:jar:0.0.1: Failed to collect dependenc
ies at com.sk89q:command-framework-core:jar:0.4: Failed to read artifact descrip
tor for com.sk89q:command-framework-core:jar:0.4: Failure to find com.sk89q:comm
and-framework-parent:pom:static in http://repo.bukkit.org/content/groups/public/
was cached in the local repository, resolution will not be reattempted until th
e update interval of bukkit-repo has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
n project MineLoL: Could not resolve dependencies for project com.muukrls.minelo
l:MineLoL:jar:0.0.1: Failed to collect dependencies at com.sk89q:command-framewo
rk-core:jar:0.4
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:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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 com.muukrls.minelol:MineLoL:jar:0.0.1: Failed to c
ollect dependencies at com.sk89q:command-framework-core:jar:0.4
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
efaultProjectDependenciesResolver.java:167)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
pendencies(LifecycleDependencyResolver.java:195)
... 22 more
Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed t
o collect dependencies at com.sk89q:command-framework-core:jar:0.4
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDe
pendencies(DefaultDependencyCollector.java:292)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDepen
dencies(DefaultRepositorySystem.java:317)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
efaultProjectDependenciesResolver.java:159)
... 23 more
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to
read artifact descriptor for com.sk89q:command-framework-core:jar:0.4
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:370)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(D
efaultDependencyCollector.java:461)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDe
pendencies(DefaultDependencyCollector.java:261)
... 25 more
Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Failure
to find com.sk89q:command-framework-parent:pom:static in http://repo.bukkit.org
/content/groups/public/ was cached in the local repository, resolution will not
be reattempted until the update interval of bukkit-repo has elapsed or updates a
re forced
at org.apache.maven.repository.internal.DefaultModelResolver.resolveMode
l(DefaultModelResolver.java:126)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExterna
lly(DefaultModelBuilder.java:817)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(Defaul
tModelBuilder.java:669)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultMode
lBuilder.java:307)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:361)
... 28 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to
find com.sk89q:command-framework-parent:pom:static in http://repo.bukkit.org/co
ntent/groups/public/ was cached in the local repository, resolution will not be
reattempted until the update interval of bukkit-repo 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.DefaultArtifactResolver.resolveArtif
act(DefaultArtifactResolver.java:239)
at org.apache.maven.repository.internal.DefaultModelResolver.resolveMode
l(DefaultModelResolver.java:122)
... 32 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to fin
d com.sk89q:command-framework-parent:pom:static in http://repo.bukkit.org/conten
t/groups/public/ was cached in the local repository, resolution will not be reat
tempted until the update interval of bukkit-repo has elapsed or updates are forc
ed
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)
... 35 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

The problem is that you are looking under the wrong repository. You are looking in the /releases directory, when you should be looking in the /public directory.
<repository>
<id>repo.oc.tc</id>
<url>https://repo.oc.tc/content/repositories/public/</url>
</repository>

Related

Sakai build error after following installation guide

I have setup my environment for Sakai 19.0 from source following the guide on https://confluence.sakaiproject.org/pages/viewpage.action?pageId=109772882.
However when I try to build the source as detailed in 4.0 of the guide I am getting an error. Below are the logs with debug switched on:
C:\Users\Chitova\Desktop\Projects\sakai\master>mvn clean install
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.sakaiproject:master:19.0 (C:\Users\Chitova\Desktop\Projects\sakai\master\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact org.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. and 'parent.relativePath' points at no local POM # line 5, column 11 -> [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
C:\Users\Chitova\Desktop\Projects\sakai\master>mvn clean install -X
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T19:29:23+02:00)
Maven home: C:\Users\Chitova\Desktop\Projects\apache-maven-3.2.5\bin\..
Java version: 1.8.0_111, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_111\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from C:\Users\Chitova\Desktop\Projects\apache-maven-3.2.5\bin\..\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\Chitova\.m2\settings.xml
[DEBUG] Using local repository at C:\Users\Chitova\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\Chitova\.m2\repository
[INFO] Scanning for projects...
[DEBUG] Using transporter WagonTransporter with priority -1.0 for http://repo1.maven.org/maven2
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom
[DEBUG] Writing tracking file C:\Users\Chitova\.m2\repository\org\sakaiproject\oss-parent\1\oss-parent-1.pom.lastUpdated
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not transfer artifact org.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. and 'parent.relativePath' points at no local POM # line 5, column 11
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:416)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:672)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:663)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:253)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR] The project org.sakaiproject:master:19.0 (C:\Users\Chitova\Desktop\Projects\sakai\master\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact org.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. and 'parent.relativePath' points at no local POM # line 5, column 11 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not transfer artifact org.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required.
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:195)
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:244)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:899)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:751)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:309)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:463)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:432)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:396)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:672)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:663)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:253)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required.
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:191)
... 22 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required.
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 26 more
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required.
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1039)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:977)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.java:560)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
at org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:404)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
... 31 more
[ERROR]
[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
C:\Users\Chitova\Desktop\Projects\sakai\master>
What could I be doing wrong?
On January 15, 2020 the Maven Central repository disabled access through HTTP (cf. Sonatype blog).
While recent version of Maven have the correct URL for Maven Central in their Super POM older ones might still use the HTTP URL. Upgrade your Maven installation or check whether your didn't override the Maven Central repository in your settings.xml file.
The repository configuration should look like this:
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

Deploying to New Internal Maven Repository

I have a completely empty file system set up as an internal Maven Repository.
I am trying to deploy to this Repository via SFTP.
This is the first jar that I am deploying to the Repository and as I understand it is is possible to point it at a blank writable directory and maven will build up all the correct files.
When running the deploy target I get the following errors:
[INFO] Downloading: scpexe://mvn.metcarob.com:7456/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml from/to ssh-repository (scpexe://mvn.metcarob.com:7456/public): Exit code: 1 - Connected to mvn.metcarob.com.
File "/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml" not found.
org.eclipse.aether.transfer.MetadataTransferException: Could not transfer metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml from/to ssh-repository (scpexe://mvn.metcarob.com:7456/public): Exit code: 1 - Connected to mvn.metcarob.com.
File "/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml" not found.
at org.eclipse.aether.connector.basic.MetadataTransportListener.transferFailed(MetadataTransportListener.java:43)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:222)
at org.eclipse.aether.internal.impl.DefaultDeployer.upload(DefaultDeployer.java:417)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:290)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:245)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:413)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:139)
at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy(AbstractDeployMojo.java:167)
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:157)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
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.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.wagon.TransferFailedException: Exit code: 1 - Connected to mvn.metcarob.com.
File "/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml" not found.
at org.apache.maven.wagon.providers.ssh.external.ScpExternalWagon.executeScpCommand(ScpExternalWagon.java:320)
at org.apache.maven.wagon.providers.ssh.external.ScpExternalWagon.get(ScpExternalWagon.java:444)
at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.java:560)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
at org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:404)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
... 32 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.058 s
[INFO] Finished at: 2016-07-16T16:25:36+01:00
[INFO] Final Memory: 24M/630M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project BobDiary: Failed to retrieve remote metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml: Could not transfer metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml from/to ssh-repository (scpexe://mvn.metcarob.com:7456/public): Exit code: 1 - Connected to mvn.metcarob.com.
[ERROR] File "/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml" not found.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project BobDiary: Failed to retrieve remote metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml: Could not transfer metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml from/to ssh-repository (scpexe://mvn.metcarob.com:7456/public): Exit code: 1 - Connected to mvn.metcarob.com.
File "/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml" not found.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
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.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to retrieve remote metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml: Could not transfer metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml from/to ssh-repository (scpexe://mvn.metcarob.com:7456/public): Exit code: 1 - Connected to mvn.metcarob.com.
File "/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml" not found.
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:193)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to retrieve remote metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml: Could not transfer metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml from/to ssh-repository (scpexe://mvn.metcarob.com:7456/public): Exit code: 1 - Connected to mvn.metcarob.com.
File "/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml" not found.
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:143)
at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy(AbstractDeployMojo.java:167)
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:157)
... 22 more
Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to retrieve remote metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml: Could not transfer metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml from/to ssh-repository (scpexe://mvn.metcarob.com:7456/public): Exit code: 1 - Connected to mvn.metcarob.com.
File "/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml" not found.
at org.eclipse.aether.internal.impl.DefaultDeployer.upload(DefaultDeployer.java:447)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:290)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:245)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:413)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:139)
... 24 more
Caused by: org.eclipse.aether.transfer.MetadataTransferException: Could not transfer metadata metcarob.com.BobDiary:BobDiary:0.0.1-SNAPSHOT/maven-metadata.xml from/to ssh-repository (scpexe://mvn.metcarob.com:7456/public): Exit code: 1 - Connected to mvn.metcarob.com.
File "/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml" not found.
at org.eclipse.aether.connector.basic.MetadataTransportListener.transferFailed(MetadataTransportListener.java:43)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:222)
at org.eclipse.aether.internal.impl.DefaultDeployer.upload(DefaultDeployer.java:417)
... 28 more
Caused by: org.apache.maven.wagon.TransferFailedException: Exit code: 1 - Connected to mvn.metcarob.com.
File "/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml" not found.
at org.apache.maven.wagon.providers.ssh.external.ScpExternalWagon.executeScpCommand(ScpExternalWagon.java:320)
at org.apache.maven.wagon.providers.ssh.external.ScpExternalWagon.get(ScpExternalWagon.java:444)
at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.java:560)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
at org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:404)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
... 32 more
[ERROR]
[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
The gist of the error message is:
File "/public/metcarob/com/BobDiary/BobDiary/0.0.1-SNAPSHOT/maven-metadata.xml" not found.
Of course this file isn't found. It is not in the repository as I am in the process of deploying it. I am expecting this process to create this file.
As this is the first time the jar is being deployed to any repository the file can no possibly exist.
The distribution part of my POM is:
<distributionManagement>
<repository>
<id>ssh-repository</id>
<name>ssh-repository</name>
<url>scpexe://mvn.metcarob.com:71234/public</url>
</repository>
</distributionManagement>
Are there any settings/methods that I have missed?
(I am running maven via eclipse m2e)
UPDATE:
Some extra information.
In my POM I have
<!-- Enabling the use of SSH -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>2.10</version>
</extension>
and my settings.xml is:
<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
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers>
<server>
<id>ssh-repository</id>
<username>maven_repo</username>
<configuration>
<sshExecutable>plink</sshExecutable>
<scpExecutable>sftp</scpExecutable>
<sshArgs></sshArgs>
<scpArgs>-o UserKnownHostsFile=/home/robert/.ssh/known_hosts</scpArgs>
</configuration>
<!-- <filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions> -->
</server>
</servers>
<mirrors/>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>
As far as I can see I have followed all the steps from http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html
It is possible to use a simple file system as a maven repository, no need to use a repository manager. I am using a amazon S3 and it works perfectly.
Additionally to the distributionManagement you have to declare a extension in maven, have a look at
deploy-ssh-external
One more thing :
In the stacktrace you are using
scpexe://mvn.metcarob.com:7456
in the pom you use a different port
scpexe://mvn.metcarob.com:71234
This might be a problem, also.

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

Jahia6.6 deployment error in maven-built module

I am trying to develop a template-set module for a Jahia site.
I used the step-by-step procedure described in the official documentation available here : http://www.jahia.com/cms/home/download/jahia-academy/documentation.default.html?displayTab=technical-documentation "Templating and Integration Guide".
Basically, it implies to use an maven archetype to initialize, build and deploy your project on the server. The two first steps are correctly done. It generates the module's skeleton and mandatory files. Then, I can build it to create a .war file.
mvn archetype:generate -DarchetypeCatalog=http://maven.jahia.org/maven2
>> [INFO] PROJECT GENERATED
mvn clean install
>> [INFO] BUILD SUCCESS
But an error occurs during the deployment.
mvn jahia:deploy
>> [INFO] BUILD FAILURE
>> [ERROR] Failed to execute goal org.jahia.server:maven-jahia-plugin:2.81:deploy (default-cli) on project test-template-set:
>> Error while validating deployers:Factory not initialized properly,
>> you must set the targetServerDirectory variable before calling getInstance ! -> [Help 1]
>> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
The provided link gives me a self explanatory conclusion :
Unlike many other errors, this exception is not generated by the Maven
core itself but by a plugin. The concrete meaning of the exception
depends on the plugin so please have a look at its documentation.
So after using a standard procedure described in the Jahia Documentation, the only piece of advice I could find is to have a closer look at it. Welcome to the catch-22 side of life.
I am using Jahia6.6.1.0 community distribution. I found no further clues in the Jahia fora.
I would like to know which step did I miss. Is this a common maven error ? Or is it just a Jahia mandatory file missing ?
A clue to find a "helloworld working module" would be great as well.
Here is the complete trace of the error :
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Test Cooptation template set 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-jahia-plugin:2.81:deploy (default-cli) # test-template-set ---
[INFO] Jahia project structure version is 2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.456s
[INFO] Finished at: Thu Apr 25 14:39:19 CEST 2013
[INFO] Final Memory: 12M/220M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jahia.server:maven-jahia-plugin:2.81:deploy (default-cli) on project test-template-set: Error while validating deployers:
Factory not initialized properly, you must set the targetServerDirectory variabl
e before calling getInstance ! -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jahia.server:maven-jahia-plugin:2.81:deploy (default-cli) on project test-template-set: Error while validating deployers
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error while validating deployers
at org.jahia.utils.maven.plugin.DeployMojo.doValidate(DeployMojo.java:129)
at org.jahia.utils.maven.plugin.AbstractManagementMojo.execute(AbstractManagementMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.RuntimeException: Factory not initialized properly, you must set the targetServerDirectory variable before calling getInstance !
at org.jahia.configuration.deployers.ServerDeploymentFactory.getInstance(ServerDeploymentFactory.java:74)
at org.jahia.utils.maven.plugin.DeployMojo.doValidate(DeployMojo.java:127)
... 22 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/MojoExecutionException
The Prerequisites - by Jahia mentions that we should at least adjust the target path to our Apache Tomcat application server and, in case you will build Jahia from sources code and deploy it, the DB connection settings.
The minimal settings.xml file for deploying Jahia on a Tomcat and using MySQL DBMS is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<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">
<localRepository>C:/development/m2repository</localRepository>
<servers>
<server>
<id>jahiaRepository</id>
<username>maven</username>
<privateKey>C:/putty/maven.jahia.org.private</privateKey>
</server>
</servers>
<profiles>
<profile>
<id>jahia-mysql</id>
<properties>
<jahia.configure.databaseType>mysql</jahia.configure.databaseType>
<jahia.configure.databaseUrl>jdbc:mysql://localhost/jahia?useUnicode=true&characterEncoding=UTF-8&useServerPrepStmts=false</jahia.configure.databaseUrl>
<jahia.configure.databaseUsername>root</jahia.configure.databaseUsername>
<jahia.configure.databasePassword>password</jahia.configure.databasePassword>
</properties>
</profile>
<profile>
<id>jahia-tomcat</id>
<properties>
<jahia.deploy.targetServerType>tomcat</jahia.deploy.targetServerType>
<jahia.deploy.targetServerDirectory>C:/development/apache-tomcat-6.0.32</jahia.deploy.targetServerDirectory>
<jahia.deploy.targetServerVersion>6</jahia.deploy.targetServerVersion>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>jahia-mysql</activeProfile>
<activeProfile>jahia-tomcat</activeProfile>
</activeProfiles>
<pluginGroups>
<pluginGroup>org.jahia.server</pluginGroup>
</pluginGroups>
</settings>
I hope this may help.

Maven GAE archetype not working

I'm trying to use google app engine for simple spring based application with maven. I have found that there is maven archetype avaible for that kind of web application (without spring, but this I can add on my own): Maven GAE.
So I used the following command:
mvn archetype:generate -DarchetypeGroupId=net.kindleit -DarchetypeArtifactId=gae-archetype-jsp -DgroupId=com.example -DartifactId=form -DarchetypeRepository=http://maven-gae-plugin.googlecode.com/svn/repository
However, when i tried to use "mvn gae:run" it doesn't work and I don't know how to solve this missing requirement:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.444s
[INFO] Finished at: Sat Mar 02 21:04:22 CET 2013
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.kindleit:maven-gae-plugin:0.9.5:run (default-cli) on project form: Execution default-cli of goal net.kindleit:maven-gae-plugin:0.9.5:run failed: Plugin net.kindleit:maven-gae-plugin:0.9.5 or one of its dependencies could not be resolved: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.5 (): Failed to read artifact descriptor for net.kindleit:gae-runtime:pom:1.7.5: Failure to find net.kindleit:maven-gae-parent:pom:0.9.6-SNAPSHOT in http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.dev.java.net has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.kindleit:maven-gae-plugin:0.9.5:run (default-cli) on project form: Execution default-cli of goal net.kindleit:maven-gae-plugin:0.9.5:run failed: Plugin net.kindleit:maven-gae-plugin:0.9.5 or one of its dependencies could not be resolved: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.5 ()
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
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.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal net.kindleit:maven-gae-plugin:0.9.5:run failed: Plugin net.kindleit:maven-gae-plugin:0.9.5 or one of its dependencies could not be resolved: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.5 ()
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:82)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin net.kindleit:maven-gae-plugin:0.9.5 or one of its dependencies could not be resolved: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.5 ()
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:211)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:353)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:321)
at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:175)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:78)
... 20 more
Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for net.kindleit:maven-gae-plugin:jar:0.9.5 ()
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:258)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:199)
... 24 more
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for net.kindleit:gae-runtime:pom:1.7.5
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:331)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:412)
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240)
... 26 more
Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Failure to find net.kindleit:maven-gae-parent:pom:0.9.6-SNAPSHOT in http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.dev.java.net has elapsed or updates are forced
at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:126)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:813)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:664)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:310)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:322)
... 29 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failure to find net.kindleit:maven-gae-parent:pom:0.9.6-SNAPSHOT in http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.dev.java.net has elapsed or updates are forced
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:122)
... 34 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to find net.kindleit:maven-gae-parent:pom:0.9.6-SNAPSHOT in http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.dev.java.net has elapsed or updates are forced
at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:230)
at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:204)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:427)
... 37 more
A can add that I tried to use diffrent versions of maven-gae-plugin but without success....
Same as here.
Can you try this?
<properties>
<gae.version>1.7.5</gae.version>
<gae-runtime.version>1.7.5.1</gae-runtime.version>
</properties>
<plugin>
<groupId>net.kindleit</groupId>
<artifactId>maven-gae-plugin</artifactId>
<version>${maven.gae.plugin.version}</version>
<configuration>
<unpackVersion>${gae.version}</unpackVersion>
<serverId>appengine.google.com</serverId>
<appDir>${webappDirectory}</appDir>
</configuration>
<dependencies>
<dependency>
<groupId>net.kindleit</groupId>
<artifactId>gae-runtime</artifactId>
<version>${gae-runtime.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>

Categories