I have deployed a java package to Github packages successfully, I tried to consume it successfully as a dependency:
<dependency>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
but I can't resolve(fetch) it as a maven plugin like this:
<build>
<plugins>
<plugin>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>1.0.0-SNAPSHOT</version>
</plugin>
...
I am getting this error:
Plugin com.example:demo:1.0.0-SNAPSHOT or one of its dependencies could not be resolved:
Could not find artifact com.example:demo:1.0.0-SNAPSHOT -> [Help 1]
also the .m2/settings.xlm
is ready and works fine as I tested it by fetching the package as a dependency not plugin, and it contains:
<server>
<id>github</id>
<username>USER</username>
<password>PERSONAL_TOKEN_SCOPE_REPO_W_R_PACKAGES</password>
</server>
<profile>
<id>github</id>
<repositories>
<repository>
<id>github</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://maven.pkg.github.com/OWNER/REPO-NAME</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<updatePolicy>always</updatePolicy>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
Any Idea? Thanks in advance