Cannot run mvn scmp:...

42 views
Skip to first unread message

KbJ

unread,
May 3, 2017, 9:17:18 AM5/3/17
to scmmanager
Hello,

I am relatively new to Maven & I'm currently trying to develop my own plugin for scm manager. Unfortunately when trying to run "mvn scmp:package" (or scmp:run) Maven gives me an error because it's unable to find a plugin with prefix scmp.

[ERROR] No plugin found for prefix 'scmp' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\namehere\.m2\repository), maven.scm-manager.org (http://maven.scm-manager.org/nexus/content/groups/public), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

My pom is pretty much identical to the one used in scm-sample-hello.

What am I missing here?

Kind regards,
KbJ

Sebastian Sdorra

unread,
May 5, 2017, 2:56:41 AM5/5/17
to scmma...@googlegroups.com
Hi,
This sounds like the scm-maven-plugin is not configured or miss configured. The simplest way to start a plugin and to be sure it is correctly configured is to use the plugin archetype. With the following command, you can create the complete structure for your plugin:

mvn archetype:generate\
   -DarchetypeGroupId=sonia.scm.maven\
   -DarchetypeArtifactId=scm-plugin-archetype\
   -DarchetypeVersion=1.51\
   -DarchetypeRepository=http://maven.scm-manager.org/nexus/content/groups/public/

For more informations, please have a look at https://bitbucket.org/sdorra/scm-manager/wiki/howto-create-a-plugin

Sebastian

--
You received this message because you are subscribed to the Google Groups "scmmanager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scmmanager+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

KbJ

unread,
May 8, 2017, 10:14:31 AM5/8/17
to scmmanager
Hi Sebastian,

thanks for your reply. Unfortunately I can't seem to make that work either. When executing above command on an empty directory I get the following errors:

[WARNING] No archetype found in remote catalog. Defaulting to internal catalog
[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] Add a repsoitory with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
Downloading: https://repo.maven.apache.org/maven2/sonia/scm/maven/scm-plugin-archetype/1.51/scm-plugin-archetype-1.51.pom
[WARNING] The POM for sonia.scm.maven:scm-plugin-archetype:jar:1.51 is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/sonia/scm/maven/scm-plugin-archetype/1.51/scm-plugin-archetype-1.51.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: ...
[INFO] Finished at: ...
[INFO] Final Memory: ...
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: The desired archetype does not exist (sonia.scm.maven:scm-plugin-archetype:1.51) -> [Help 1]

[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Installing the plugin manually to my .m2 directory via "mvn install archetype:update-local-catalog" didn't solve the problem either.

KbJ

unread,
May 9, 2017, 4:07:15 AM5/9/17
to scmmanager
Hi Sebastian,

I was eventually able to resolve my issues after purging my .m2 repo and re-starting with a "clean slate". I guess my problem was my lacking Maven experience after all. Sorry to have bothered you and thank you for your support.

Cheers,
KbJ
Reply all
Reply to author
Forward
0 new messages