mvn hpi:create gives error "org.apache.maven.plugins:maven-hpi-plugin' does not exist"

383 views
Skip to first unread message

deepali

unread,
Sep 14, 2011, 3:24:38 AM9/14/11
to Jenkins Developers
hi all,

I am new to jenkins. I want to create jenkins plugin for CI.

I am going through http://javaadventure.blogspot.com/2008/01/writing-hudson-plug-in-part-1.html
link for building jenkins plugin.

I got following message while setting up jenkins:

D:\javaadventure>mvn -e hpi:create
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'hpi'.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-hpi-plugin' does not
exist or
no valid version could be found
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin
'org.apache.m
aven.plugins:maven-hpi-plugin' does not exist or no valid version
could be found

at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Defa
ultLifecycleExecutor.java:1307)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor
(DefaultLifecycleExecutor.java:1546)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy
AggregationNeeds(DefaultLifecycleExecutor.java:406)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:137)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
345)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
132)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:290)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by:
org.apache.maven.plugin.version.PluginVersionNotFoundException: The p
lugin 'org.apache.maven.plugins:maven-hpi-plugin' does not exist or no
valid ver
sion could be found
at
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePl
uginVersion(DefaultPluginVersionManager.java:229)
at
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePl
uginVersion(DefaultPluginVersionManager.java:91)
at
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPlug
inManager.java:171)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Defa
ultLifecycleExecutor.java:1278)
... 14 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Sep 14 12:51:40 IST 2011
[INFO] Final Memory: 1M/4M
[INFO]
------------------------------------------------------------------------


My network does not use any proxy.
Maven version: apache-maven-2.0.11
JDK: jdk1.6.0

can someone help me te resolve the issue?

Thanks,
Deepali


Jerome Lacoste

unread,
Sep 14, 2011, 7:03:11 AM9/14/11
to jenkin...@googlegroups.com
Maven doesn't find the hpi-plugin using it's short name.

Read https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial

in particular Setting up environment "This will let you use short names of Jenkins Maven plugins (ie. hpi:create instead of org.jenkins-ci.tools:maven-hpi-plugin:1.61:create)."

Jerome

deepali

unread,
Sep 14, 2011, 7:58:11 AM9/14/11
to Jenkins Developers
Thanks Jerome, I made changes in settings.xml file as mentioned in
link u said.
I found settings.xml file in maven's conf directory and not in
USERPROFILE%\.m2\ directory. So i copied settings.xml from conf to .m2
location (Is this copying of file from one location to other, a good
solution?). Now its working fine.

Deepali

On Sep 14, 4:03 pm, Jerome Lacoste <jerome.laco...@gmail.com> wrote:
> Maven doesn't find the hpi-plugin using it's short name.
>
> Readhttps://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
Reply all
Reply to author
Forward
0 new messages