I was trying to use the github packages, I followed all the steps in their basic tutorial, but I can't deploy, I already looked on several sites to fix this, but none worked.
Error on deploy:
Failed to deploy artifacts: Could not find artifact
My settings.xml (is from github packages tutorial):
<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">
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/HenryFabio/maven-packages/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
<username>HenryFabio</username>
<password>my token =)</password>
</server>
</servers>
</settings>
My pom.xml (this is only a test project):
<?xml version="1.0" encoding="UTF-8"?>
<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.henryfabio</groupId>
<artifactId>github-packages</artifactId>
<version>1.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<distributionManagement>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/HenryFabio/maven-packages/</url>
</repository>
</distributionManagement>
</project>
stacktrace:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:
deploy (default-deploy) on project github-packages: Failed to deploy artifacts:
Could not find artifact com.henryfabio:github-packages:jar:1.0 in github (https:
//maven.pkg.github.com/HenryFabio/maven-packages/) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on proje
ct github-packages: Failed to deploy artifacts: Could not find artifact com.henr
yfabio:github-packages:jar:1.0 in github (https://maven.pkg.github.com/HenryFabi
o/maven-packages/)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreaded
Builder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleSt
arter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.jav
a:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessor
Impl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launche
r.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:2
25)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launc
her.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347
)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy arti
facts: Could not find artifact com.henryfabio:github-packages:jar:1.0 in github
(https://maven.pkg.github.com/HenryFabio/maven-packages/)
at org.apache.maven.plugin.deploy.DeployMojo.execute (DeployMojo.java:193)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBui
ldPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreaded
Builder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleSt
arter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.jav
a:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessor
Impl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launche
r.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:2
25)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launc
her.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347
)
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Faile
d to deploy artifacts: Could not find artifact com.henryfabio:github-packages:ja
r:1.0 in github (https://maven.pkg.github.com/HenryFabio/maven-packages/)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy (Defaul
tArtifactDeployer.java:146)
at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy (AbstractDeployM
ojo.java:167)
at org.apache.maven.plugin.deploy.DeployMojo.execute (DeployMojo.java:157)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBui
ldPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreaded
Builder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleSt
arter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.jav
a:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessor
Impl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launche
r.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:2
25)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launc
her.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347
)
Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy a
rtifacts: Could not find artifact com.henryfabio:github-packages:jar:1.0 in gith
ub (https://maven.pkg.github.com/HenryFabio/maven-packages/)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy (DefaultDeployer.
java:301)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy (DefaultDeployer.
java:213)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy (DefaultR
epositorySystem.java:386)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy (Defaul
tArtifactDeployer.java:142)
at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy (AbstractDeployM
ojo.java:167)
at org.apache.maven.plugin.deploy.DeployMojo.execute (DeployMojo.java:157)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBui
ldPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreaded
Builder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleSt
arter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.jav
a:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessor
Impl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launche
r.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:2
25)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launc
her.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347
)
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find
artifact com.henryfabio:github-packages:jar:1.0 in github (https://maven.pkg.gi
thub.com/HenryFabio/maven-packages/)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFail
ed (ArtifactTransportListener.java:48)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.ru
n (BasicRepositoryConnector.java:369)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.put (BasicRep
ositoryConnector.java:288)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy (DefaultDeployer.
java:295)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy (DefaultDeployer.
java:213)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy (DefaultR
epositorySystem.java:386)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy (Defaul
tArtifactDeployer.java:142)
at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy (AbstractDeployM
ojo.java:167)
at org.apache.maven.plugin.deploy.DeployMojo.execute (DeployMojo.java:157)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBui
ldPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347
)
-e
to the maven command and post the stacktrace to the question. – Photophobia