I am new to deploying maven projects and I think I am having exactly the same problem described in Failed to deploy artifacts
but the answer in that post does not help in my case.
The full error stacktrace is shown below. I have made sure the following is correct in my configuration:
I can use user credentials to log into oss.sonatype.org
User credentials are set up in settings.xml
User credentials are shown as expected when running "mvn help:effective-settings"
Snapshot server ID in pom file ("snapshot") matches server id in settings xml, server id output from "mvn help:effective-settings"
Using maven 4.0.0
Any advice highly appreciated!
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1
.6.2:deploy (injected-nexus-deploy) on project jate: Failed to deploy artifacts:
Could not transfer artifact uk.ac.shef.dcs.oak:jate:jar:2.0Alpha-20140810.08063
8-1 from/to ossrh (https://oss.sonatype.org/content/repositories/snapshots): Acc
ess denied to: https://oss.sonatype.org/content/repositories/snapshots/uk/ac/she
f/dcs/oak/jate/2.0Alpha-SNAPSHOT/jate-2.0Alpha-20140810.080638-1.jar, ReasonPhra
se: Forbidden. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.sonatype.plugins:nexus-staging-maven-plugin:1.6.2:deploy (injected-nexus-depl
oy) on project jate: Failed to deploy artifacts: Could not transfer artifact uk.
ac.shef.dcs.oak:jate:jar:2.0Alpha-20140810.080638-1 from/to ossrh (https://oss.s
onatype.org/content/repositories/snapshots): Access denied to: https://oss.sonat
ype.org/content/repositories/snapshots/uk/ac/shef/dcs/oak/jate/2.0Alpha-SNAPSHOT
/jate-2.0Alpha-20140810.080638-1.jar, ReasonPhrase: Forbidden.
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.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: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: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:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy arti
facts: Could not transfer artifact uk.ac.shef.dcs.oak:jate:jar:2.0Alpha-20140810
.080638-1 from/to ossrh (https://oss.sonatype.org/content/repositories/snapshots
): Access denied to: https://oss.sonatype.org/content/repositories/snapshots/uk/
ac/shef/dcs/oak/jate/2.0Alpha-SNAPSHOT/jate-2.0Alpha-20140810.080638-1.jar, Reas
onPhrase: Forbidden.
at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute(DeployMojo
.java:216)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
... 19 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Faile
d to deploy artifacts: Could not transfer artifact uk.ac.shef.dcs.oak:jate:jar:2
.0Alpha-20140810.080638-1 from/to ossrh (https://oss.sonatype.org/content/reposi
tories/snapshots): Access denied to: https://oss.sonatype.org/content/repositori
es/snapshots/uk/ac/shef/dcs/oak/jate/2.0Alpha-SNAPSHOT/jate-2.0Alpha-20140810.08
0638-1.jar, ReasonPhrase: Forbidden.
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Def
aultArtifactDeployer.java:141)
at org.sonatype.nexus.maven.staging.deploy.strategy.AbstractDeployStrate
gy.deployUp(AbstractDeployStrategy.java:202)
at org.sonatype.nexus.maven.staging.deploy.strategy.DeferredDeployStrate
gy.finalizeDeploy(DeferredDeployStrategy.java:86)
at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute(DeployMojo
.java:213)
... 21 more
Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy
artifacts: Could not transfer artifact uk.ac.shef.dcs.oak:jate:jar:2.0Alpha-2014
0810.080638-1 from/to ossrh (https://oss.sonatype.org/content/repositories/snaps
hots): Access denied to: https://oss.sonatype.org/content/repositories/snapshots
/uk/ac/shef/dcs/oak/jate/2.0Alpha-SNAPSHOT/jate-2.0Alpha-20140810.080638-1.jar,
ReasonPhrase: Forbidden.
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeplo
yer.java:280)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeplo
yer.java:211)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(Defa
ultRepositorySystem.java:443)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(Def
aultArtifactDeployer.java:137)
... 24 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not tra
nsfer artifact uk.ac.shef.dcs.oak:jate:jar:2.0Alpha-20140810.080638-1 from/to os
srh (https://oss.sonatype.org/content/repositories/snapshots): Access denied to:
https://oss.sonatype.org/content/repositories/snapshots/uk/ac/shef/dcs/oak/jate
/2.0Alpha-SNAPSHOT/jate-2.0Alpha-20140810.080638-1.jar, ReasonPhrase: Forbidden.
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(W
agonRepositoryConnector.java:951)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(W
agonRepositoryConnector.java:941)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.
run(WagonRepositoryConnector.java:837)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(Wago
nRepositoryConnector.java:467)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeplo
yer.java:274)
... 27 more
Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Access d
enied to: https://oss.sonatype.org/content/repositories/snapshots/uk/ac/shef/dcs
/oak/jate/2.0Alpha-SNAPSHOT/jate-2.0Alpha-20140810.080638-1.jar, ReasonPhrase: F
orbidden.
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(Abstr
actHttpClientWagon.java:618)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(Abstr
actHttpClientWagon.java:524)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(Abstr
actHttpClientWagon.java:505)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(Abstr
actHttpClientWagon.java:485)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.
run(WagonRepositoryConnector.java:811)
... 29 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/MojoExecutionE
xception
Sorry, I just realized I made a silly mistake, the group id in my project pom file and the one on the sonatype repository did not match. Simple to fix but a stupid mistake.
Related
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>
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.
I downloaded Jetty source and tried to run the following maven command:
mvn clean compile site -DskipTests -e
But the problem is that the maven-site-plugin doesn't work. I use Maven 3.0.5 (tried also with latest) and maven-site-plugin 3.3.
The error looks like this:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project jetty-project: failed to get report for org.apache.maven.plugins:maven-javadoc-plugin: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.2:copy-dependencies (copy-lib-deps) on project jetty-ant: Error copying artifact from /jetty/jetty-io/target/classes to /jetty/jetty-ant/target/test-lib/jetty-io-9.1.3-SNAPSHOT.jar: /jetty/jetty-io/target/classes (Is a directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project jetty-project: failed to get report for org.apache.maven.plugins:maven-javadoc-plugin
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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: failed to get report for org.apache.maven.plugins:maven-javadoc-plugin
at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildMavenReports(DefaultMavenReportExecutor.java:159)
at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getReports(AbstractSiteRenderingMojo.java:235)
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:121)
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: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.2:copy-dependencies (copy-lib-deps) on project jetty-ant: Error copying artifact from /jetty/jetty-io/target/classes to /jetty/jetty-ant/target/test-lib/jetty-io-9.1.3-SNAPSHOT.jar
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.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeForkedExecutions(DefaultLifecycleExecutor.java:173)
at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildReportPlugin(DefaultMavenReportExecutor.java:273)
at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildMavenReports(DefaultMavenReportExecutor.java:154)
... 23 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Error copying artifact from /jetty/jetty-io/target/classes to /jetty/jetty-ant/target/test-lib/jetty-io-9.1.3-SNAPSHOT.jar
at org.apache.maven.plugin.dependency.AbstractDependencyMojo.copyFile(AbstractDependencyMojo.java:194)
at org.apache.maven.plugin.dependency.CopyDependenciesMojo.copyArtifact(CopyDependenciesMojo.java:199)
at org.apache.maven.plugin.dependency.CopyDependenciesMojo.execute(CopyDependenciesMojo.java:90)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 29 more
Caused by: java.io.FileNotFoundException: /jetty/jetty-io/target/classes (Is a directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.codehaus.plexus.util.io.FileInputStreamFacade.getInputStream(FileInputStreamFacade.java:78)
at org.codehaus.plexus.util.FileUtils.copyStreamToFile(FileUtils.java:1024)
at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:932)
at org.apache.maven.plugin.dependency.AbstractDependencyMojo.copyFile(AbstractDependencyMojo.java:189)
... 33 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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
The plugin configuration looks like this:
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<executions>
<execution>
<id>attach-descriptor</id>
<goals>
<goal>attach-descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
So it looks like the maven-site-plugin seems to have still some bug in it where it doesn't work with Maven 3. Does anyone know any workaround for this?
please try package instead of compile
explanation:
Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.2:copy-dependencies (copy-lib-deps) on project jetty-ant: Error copying artifact from /jetty/jetty-io/target/classes to /jetty/jetty-ant/target/test-lib/jetty-io-9.1.3-SNAPSHOT.jar
the artifact is not yet packaged, since you only compiled it, so m-dependency-p:copy-dependencies is failing when trying to copy a jar on a path that represents a directory
when you'll run package phase, the jar will be here, so no problem any more
I'm trying to use the jpa-ddl-maven-plugin as described here but I'm getting a the below error using Apache Maven 3.0.3. Any ideas where I've gone wrong?
my pom.xml:
<plugin>
<groupId>it.linksmt.tooling</groupId>
<artifactId>maven-jpa-ddl-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<extensions>true</extensions>
<configuration>
<targetDbPlatform>OraclePlatform</targetDbPlatform>
<persistenceUnitName>test-entity-api</persistenceUnitName>
<persistenceUnitFile>META-INF/persistence.xml</persistenceUnitFile>
</configuration>
</plugin>
settings.xml:
<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">
<pluginGroups>
<pluginGroup>it.linksmt.tooling</pluginGroup>
</pluginGroups>
</settings>
Error:
WARNING] The POM for it.linksmt.tooling:maven-jpa-ddl-plugin:jar:1.0.0-SNAPSHOT is missing, no dependency information available
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.test.sample:sample-api:1.0.0-SNAPSHOT (/project/pom.xml) has 1 error
[ERROR] Unresolveable build extension: Plugin it.linksmt.tooling:maven-jpa-ddl-plugin:1.0.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact it.linksmt.tooling:maven-jpa-ddl-plugin:jar:1.0.0-SNAPSHOT -> [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/PluginResolutionException
mvn clean install -e output:
ERROR]
[ERROR] The project com.test:sample:sample-api:1.0.0-SNAPSHOT (/project/pom.xml) has 1 error
[ERROR] Unresolveable build extension: Plugin it.linksmt.tooling:maven-jpa-ddl-plugin:1.0.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact it.linksmt.tooling:maven-jpa-ddl-plugin:jar:1.0.0-SNAPSHOT -> [Help 2]
org.apache.maven.plugin.PluginResolutionException: Plugin it.linksmt.tooling:maven-jpa-ddl-plugin:1.0.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact it.linksmt.tooling:maven-jpa-ddl-plugin:jar:1.0.0-SNAPSHOT
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:215)
at org.apache.maven.project.DefaultProjectBuildingHelper.resolveExtensionArtifacts(DefaultProjectBuildingHelper.java:377)
at org.apache.maven.project.DefaultProjectBuildingHelper.createProjectRealm(DefaultProjectBuildingHelper.java:237)
at org.apache.maven.project.DefaultModelBuildingListener.buildExtensionsAssembled(DefaultModelBuildingListener.java:106)
at org.apache.maven.model.building.ModelBuildingEventCatapult$1.fire(ModelBuildingEventCatapult.java:43)
at org.apache.maven.model.building.DefaultModelBuilder.fireEvent(DefaultModelBuilder.java:1041)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:391)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:374)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:536)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:542)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:542)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:328)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:632)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:581)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:233)
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.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact it.linksmt.tooling:maven-jpa-ddl-plugin:jar:1.0.0-SNAPSHOT
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:541)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:395)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:207)
... 26 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact it.linksmt.tooling:maven-jpa-ddl-plugin:jar:1.0.0-SNAPSHOT
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:531)
... 29 more
You are trying to use a SNAPSHOT version of the plugin, which will not be found in Maven's default repository - Maven Central.
Looking at the plugin Google code page, it seems that it is currently in beta and has no release version.
You have a couple of options for resolving this plugin:
build it from the source as described here and install it to your local Maven repository. This will be useful only on your machine.
build the plugin and deploy it to a repository manager such as Artifactory. This will help you sharing the plugin with other team members/CI server.
Resolve the plugin from this repository. Notice, I found it by searching Google, but have no idea who is managing it. You will have to define a new repository for this.
I have created tomcat project by Eclipse means. I selected tomcat archetype at archetype selection stage. It crated 6 directories for a project, including "-api", "-api-impl" and etc.
Now how can I run something?
At the command line I can issue
mvn tomcat6:run
or
mvn tomcat7:run
and it will run.
How to do the same from within eclipse?
UPDATE
Probably this command is equivalent to ->Debug As... and entering "tomcat6:run" into "goals". But in this case I get errors like
Downloading: http://repo.maven.apache.org/maven2/org/apache/tomcat/maven/tomcat6-maven-plugin/2.1/tomcat6-maven-plugin-2.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.tomcat.maven:tomcat6-maven-plugin:2.1: Plugin org.apache.tomcat.maven:tomcat6-maven-plugin:2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.tomcat.maven:tomcat6-maven-plugin:jar:2.1
UPDATE 2
If I set debug output, I get "connection refused" exceptions:
[DEBUG] Resolving plugin prefix tomcat6 from [org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo.maven.apache.org/maven2
Downloading: http://repo.maven.apache.org/maven2/org/apache/tomcat/maven/tomcat6-maven-plugin/2.1/tomcat6-maven-plugin-2.1.pom
[DEBUG] Writing resolution tracking file D:\Users\Dims\Design\!Lib\!m2\repository\org\apache\tomcat\maven\tomcat6-maven-plugin\2.1\tomcat6-maven-plugin-2.1.pom.lastUpdated
[WARNING] Failed to retrieve plugin descriptor for org.apache.tomcat.maven:tomcat6-maven-plugin:2.1: Plugin org.apache.tomcat.maven:tomcat6-maven-plugin:2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.tomcat.maven:tomcat6-maven-plugin:jar:2.1
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.tomcat.maven:tomcat6-maven-plugin:2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.tomcat.maven:tomcat6-maven-plugin:jar:2.1
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:129)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
at org.apache.maven.plugin.DefaultBuildPluginManager.loadPlugin(DefaultBuildPluginManager.java:59)
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolveFromProject(DefaultPluginPrefixResolver.java:139)
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolveFromProject(DefaultPluginPrefixResolver.java:122)
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:86)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:262)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:222)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:98)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
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.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.tomcat.maven:tomcat6-maven-plugin:jar:2.1
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:279)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:115)
... 23 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.apache.tomcat.maven:tomcat6-maven-plugin:pom:2.1 from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused
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.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
... 26 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.apache.tomcat.maven:tomcat6-maven-plugin:pom:2.1 from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.maven.wagon.TransferFailedException: Connection to http://repo.maven.apache.org refused
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:799)
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.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:601)
... 4 more
Caused by: org.apache.maven.wagon.providers.http.httpclient.conn.HttpHostConnectException: Connection to http://repo.maven.apache.org refused
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:158)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:674)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:793)
... 8 more
Caused by: java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at org.apache.maven.wagon.providers.http.httpclient.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
... 16 more
SOLUTION
Antivirus' firewall was preventing eclipse from accessing web. So, running goal from within eclipse was failing.
This tutorial should help you set up Tomcat with Eclipse. However above commands are Maven. There is Maven plugin for Eclipse but there are number of complains. So if Tomcat on Eclipse on your mind use first link, if Maven is priority get the plugin