You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendell Beckwith <We...@intervoice.com> on 2005/08/29 23:04:50 UTC

How to install a plugin for m2?

I have been trying to piece together the exact steps required to
compile,install and test a java-based helloworld type plugin and it
still fails miserable.  I'm currently using 2.0-alpha-3.  The plugin
builds and installs fine, but I get the following:
 
E:\dev\workspace\maven-myhello-plugin>m2 clean:clean install
[WARNING] DEPRECATED: Please specify the local repository as:
 
<settings>
    <localRepository>E:/dev/maven-repo</localRepository>
    ...
</settings>
 
[INFO]
------------------------------------------------------------------------
-
---
[INFO] Building My Hello Plugin
[INFO]
------------------------------------------------------------------------
-
---
[INFO] maven-clean-plugin: resolved to version 2.0-alpha-3 from local
repository
 
[INFO] [clean:clean]
[INFO] Deleting directory E:\dev\workspace\maven-myhello-plugin\target
[INFO] maven-plugin-plugin: resolved to version 2.0-alpha-3 from local
repository
[INFO] maven-resources-plugin: resolved to version 2.0-alpha-3 from
local repository
[INFO] maven-compiler-plugin: resolved to version 2.0-alpha-3 from local
repository
[INFO] maven-surefire-plugin: resolved to version 2.0-alpha-3 from local
repository
[INFO] maven-jar-plugin: resolved to version 2.0-alpha-3 from local
repository
[INFO] maven-install-plugin: resolved to version 2.0-alpha-3 from local
repository
[INFO] [plugin:descriptor]
[INFO] [resources:resources]
[INFO] [compiler:compile]
Compiling 1 source file to
E:\dev\workspace\maven-myhello-plugin\target\classes
[INFO] [resources:testResources]
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Setting reports dir:
E:\dev\workspace\maven-myhello-plugin\target/surefire-reports
 
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no test to run.
 
Results :
[surefire] Tests run: 0, Failures: 0, Errors: 0
 
[INFO] [jar:jar]
[INFO] Building jar:
E:\dev\workspace\maven-myhello-plugin\target\maven-myhello-plugin-1.0-SN
APSHOT.jar
[INFO] [install:install]
[INFO] Installing
E:\dev\workspace\maven-myhello-plugin\target\maven-myhello-plugin-1.0-SN
APSHOT.jar to
E:\dev\maven-repo\com\myhello\maven\plugins\maven-myhello-plugin\1.0-SNA
PSHOT\maven-myhello-plugin-1.0-SNAPSHOT.jar
[INFO]
------------------------------------------------------------------------
-
---
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
-
---
[INFO] Total time: 4 seconds
[INFO] Finished at: Mon Aug 29 15:31:43 CDT 2005
[INFO] Final Memory: 3M/7M
[INFO]
------------------------------------------------------------------------
-
---
 
E:\dev\workspace\maven-myhello-plugin>
 
 
 

Now if I try to execute maven I get the following error:
 
E:\dev\workspace\runtime>m2 -e myhello:hello
+ Error stacktraces are turned on.
[WARNING] DEPRECATED: Please specify the local repository as:
 
<settings>
    <localRepository>E:/dev/maven-repo</localRepository>
    ...
</settings>
 
[INFO]
------------------------------------------------------------------------
-
---
[INFO] Building Runtime
[INFO]
------------------------------------------------------------------------
-
---
[INFO] maven-myhello-plugin: checking for updates from central-plugins
[INFO] Retrieving release information for maven-myhello-plugin
FATAL ERROR: Error executing Maven for a project
Error stacktrace:
org.apache.maven.reactor.ReactorException: Error executing project
within the re
actor
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:190)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:269)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
 
        at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: Error
resolving plugin version
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(De
faultLifecycleExecutor.java:537)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:149)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:133)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:103)
        at
org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:261)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:180)
        ... 9 more
Caused by:
org.apache.maven.plugin.version.PluginVersionResolutionException: Error
resolving version for 'org.apache.maven.plugins:maven-myhello-plugin':
Cannot resolve RELEASE version of this plugin.
        at
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolveRelea
seVersion(DefaultPluginVersionManager.java:570)
        at
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePlugi
nVersion(DefaultPluginVersionManager.java:130)
        at
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginM
anager.java:192)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(De
faultLifecycleExecutor.java:528)
        ... 14 more
Caused by:
org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable
to find release for artifact
org.apache.maven.plugins:maven-myhello-plugin:maven-plugin:RELEASE
  org.apache.maven.plugins:maven-myhello-plugin:RELEASE:maven-plugin
 
from the specified remote repositories:
  http://repo1.maven.org/maven2/plugins
<http://repo1.maven.org/maven2/plugins> 
        at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:88)
        at
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolveRe
leaseVersion(DefaultPluginVersionManager.java:566)
        ... 17 more
Caused by:
org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
: Unable to find release for artifact
org.apache.maven.plugins:maven-myhello-plug
in:maven-plugin:RELEASE
        at
org.apache.maven.artifact.transform.ReleaseArtifactTransformation.ret
rieveFromRemoteRepository(ReleaseArtifactTransformation.java:86)
        at
org.apache.maven.artifact.transform.AbstractVersionTransformation.res
olveVersion(AbstractVersionTransformation.java:104)
        at
org.apache.maven.artifact.transform.ReleaseArtifactTransformation.tra
nsformForResolve(ReleaseArtifactTransformation.java:51)
        at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:84)
        ... 18 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable
to locat
e resource in repository
        at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
ata(LightweightHttpWagon.java:81)
        at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:70)
        at
org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(D
efaultWagonManager.java:310)
        at
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMeta
data(DefaultWagonManager.java:242)
        at
org.apache.maven.artifact.metadata.AbstractVersionArtifactMetadata.re
trieveFromRemoteRepository(AbstractVersionArtifactMetadata.java:94)
        at
org.apache.maven.artifact.transform.ReleaseArtifactTransformation.ret
rieveFromRemoteRepository(ReleaseArtifactTransformation.java:80)
        ... 21 more
Caused by: java.io.FileNotFoundException:
http://www.ibiblio.org/maven2/plugins/
<http://www.ibiblio.org/maven2/plugins/> 
org/apache/maven/plugins/maven-myhello-plugin/maven-myhello-plugin-RELEA
SE.version
.txt
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1147)
        at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
ata(LightweightHttpWagon.java:71)
        ... 26 more
 
E:\dev\workspace\runtime>

 
 
From the list I assume i need to execute the install like the
following,"m2 -DupdateReleaseInfo=true clean:clean install", to get the
realese information added to my local repo.  Nonetheless, m2 still tries
to look up  the release info online., I was hoping to wait for the 1st
beta, but I kinda need to get started on the real plugin and I wanted to
be sure I had the development cycle down.  So what's the magic word to
get this to work.
 
 
Wendell beckwith
 

This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are the intended recipient, you must treat the information in confidence and in accordance with all laws related to the privacy and confidentiality of such information.  If you are not the intended recipient or their designee, please notify the sender immediately by return e-mail and delete all copies of this email, including all attachments.

Re: How to install a plugin for m2?

Posted by Brett Porter <br...@gmail.com>.
If you are using a group ID other than org.apache.maven.plugins (as you 
should), you must do one of 3 things:
- add the group to the search list in settings.xml (beta-1 only - see 
http://jira.codehaus.org/browse/MNG-377)
- add the plugin to the list of build plugins in the current POM
- use the fully qualified goal name on the command line 
(groupId:artifactId:version:goal - version is optional if you want the 
latest release)

Hope this helps,
Brett

On 8/30/05, Wendell Beckwith <We...@intervoice.com> wrote:
> 
> I have been trying to piece together the exact steps required to
> compile,install and test a java-based helloworld type plugin and it
> still fails miserable. I'm currently using 2.0-alpha-3. The plugin
> builds and installs fine, but I get the following:
> 
> E:\dev\workspace\maven-myhello-plugin>m2 clean:clean install
> [WARNING] DEPRECATED: Please specify the local repository as:
> 
> <settings>
> <localRepository>E:/dev/maven-repo</localRepository>
> ...
> </settings>
> 
> [INFO]
> ------------------------------------------------------------------------
> -
> ---
> [INFO] Building My Hello Plugin
> [INFO]
> ------------------------------------------------------------------------
> -
> ---
> [INFO] maven-clean-plugin: resolved to version 2.0-alpha-3 from local
> repository
> 
> [INFO] [clean:clean]
> [INFO] Deleting directory E:\dev\workspace\maven-myhello-plugin\target
> [INFO] maven-plugin-plugin: resolved to version 2.0-alpha-3 from local
> repository
> [INFO] maven-resources-plugin: resolved to version 2.0-alpha-3 from
> local repository
> [INFO] maven-compiler-plugin: resolved to version 2.0-alpha-3 from local
> repository
> [INFO] maven-surefire-plugin: resolved to version 2.0-alpha-3 from local
> repository
> [INFO] maven-jar-plugin: resolved to version 2.0-alpha-3 from local
> repository
> [INFO] maven-install-plugin: resolved to version 2.0-alpha-3 from local
> repository
> [INFO] [plugin:descriptor]
> [INFO] [resources:resources]
> [INFO] [compiler:compile]
> Compiling 1 source file to
> E:\dev\workspace\maven-myhello-plugin\target\classes
> [INFO] [resources:testResources]
> [INFO] [compiler:testCompile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [surefire:test]
> [INFO] Setting reports dir:
> E:\dev\workspace\maven-myhello-plugin\target/surefire-reports
> 
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no test to run.
> 
> Results :
> [surefire] Tests run: 0, Failures: 0, Errors: 0
> 
> [INFO] [jar:jar]
> [INFO] Building jar:
> E:\dev\workspace\maven-myhello-plugin\target\maven-myhello-plugin-1.0-SN
> APSHOT.jar
> [INFO] [install:install]
> [INFO] Installing
> E:\dev\workspace\maven-myhello-plugin\target\maven-myhello-plugin-1.0-SN
> APSHOT.jar to
> E:\dev\maven-repo\com\myhello\maven\plugins\maven-myhello-plugin\1.0-SNA
> PSHOT\maven-myhello-plugin-1.0-SNAPSHOT.jar
> [INFO]
> ------------------------------------------------------------------------
> -
> ---
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> -
> ---
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Mon Aug 29 15:31:43 CDT 2005
> [INFO] Final Memory: 3M/7M
> [INFO]
> ------------------------------------------------------------------------
> -
> ---
> 
> E:\dev\workspace\maven-myhello-plugin>
> 
> 
> 
> 
> Now if I try to execute maven I get the following error:
> 
> E:\dev\workspace\runtime>m2 -e myhello:hello
> + Error stacktraces are turned on.
> [WARNING] DEPRECATED: Please specify the local repository as:
> 
> <settings>
> <localRepository>E:/dev/maven-repo</localRepository>
> ...
> </settings>
> 
> [INFO]
> ------------------------------------------------------------------------
> -
> ---
> [INFO] Building Runtime
> [INFO]
> ------------------------------------------------------------------------
> -
> ---
> [INFO] maven-myhello-plugin: checking for updates from central-plugins
> [INFO] Retrieving release information for maven-myhello-plugin
> FATAL ERROR: Error executing Maven for a project
> Error stacktrace:
> org.apache.maven.reactor.ReactorException: Error executing project
> within the re
> actor
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:190)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:269)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
> 
> at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
> Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: Error
> resolving plugin version
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(De
> faultLifecycleExecutor.java:537)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:149)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
> ifecycleExecutor.java:133)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
> ycleExecutor.java:103)
> at
> org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:261)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:180)
> ... 9 more
> Caused by:
> org.apache.maven.plugin.version.PluginVersionResolutionException: Error
> resolving version for 'org.apache.maven.plugins:maven-myhello-plugin':
> Cannot resolve RELEASE version of this plugin.
> at
> org.apache.maven.plugin.version.DefaultPluginVersionManager.resolveRelea
> seVersion(DefaultPluginVersionManager.java:570)
> at
> org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePlugi
> nVersion(DefaultPluginVersionManager.java:130)
> at
> org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginM
> anager.java:192)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(De
> faultLifecycleExecutor.java:528)
> ... 14 more
> Caused by:
> org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable
> to find release for artifact
> org.apache.maven.plugins:maven-myhello-plugin:maven-plugin:RELEASE
> org.apache.maven.plugins:maven-myhello-plugin:RELEASE:maven-plugin
> 
> from the specified remote repositories:
> http://repo1.maven.org/maven2/plugins
> <http://repo1.maven.org/maven2/plugins>
> at
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
> faultArtifactResolver.java:88)
> at
> org.apache.maven.plugin.version.DefaultPluginVersionManager.resolveRe
> leaseVersion(DefaultPluginVersionManager.java:566)
> ... 17 more
> Caused by:
> org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
> : Unable to find release for artifact
> org.apache.maven.plugins:maven-myhello-plug
> in:maven-plugin:RELEASE
> at
> org.apache.maven.artifact.transform.ReleaseArtifactTransformation.ret
> rieveFromRemoteRepository(ReleaseArtifactTransformation.java:86)
> at
> org.apache.maven.artifact.transform.AbstractVersionTransformation.res
> olveVersion(AbstractVersionTransformation.java:104)
> at
> org.apache.maven.artifact.transform.ReleaseArtifactTransformation.tra
> nsformForResolve(ReleaseArtifactTransformation.java:51)
> at
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
> faultArtifactResolver.java:84)
> ... 18 more
> Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable
> to locat
> e resource in repository
> at
> org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
> ata(LightweightHttpWagon.java:81)
> at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:70)
> at
> org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(D
> efaultWagonManager.java:310)
> at
> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMeta
> data(DefaultWagonManager.java:242)
> at
> org.apache.maven.artifact.metadata.AbstractVersionArtifactMetadata.re<http://org.apache.maven.artifact.metadata.AbstractVersionArtifactMetadata.re>
> trieveFromRemoteRepository(AbstractVersionArtifactMetadata.java:94)
> at
> org.apache.maven.artifact.transform.ReleaseArtifactTransformation.ret
> rieveFromRemoteRepository(ReleaseArtifactTransformation.java:80)
> ... 21 more
> Caused by: java.io.FileNotFoundException:
> http://www.ibiblio.org/maven2/plugins/
> <http://www.ibiblio.org/maven2/plugins/>
> org/apache/maven/plugins/maven-myhello-plugin/maven-myhello-plugin-RELEA
> SE.version
> .txt
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
> nection.java:1147)
> at
> org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
> ata(LightweightHttpWagon.java:71)
> ... 26 more
> 
> E:\dev\workspace\runtime>
> 
> 
> 
> From the list I assume i need to execute the install like the
> following,"m2 -DupdateReleaseInfo=true clean:clean install", to get the
> realese information added to my local repo. Nonetheless, m2 still tries
> to look up the release info online., I was hoping to wait for the 1st
> beta, but I kinda need to get started on the real plugin and I wanted to
> be sure I had the development cycle down. So what's the magic word to
> get this to work.
> 
> 
> Wendell beckwith
> 
> 
> This e-mail transmission may contain information that is proprietary, 
> privileged and/or confidential and is intended exclusively for the person(s) 
> to whom it is addressed. Any use, copying, retention or disclosure by any 
> person other than the intended recipient or the intended recipient's 
> designees is strictly prohibited. If you are the intended recipient, you 
> must treat the information in confidence and in accordance with all laws 
> related to the privacy and confidentiality of such information. If you are 
> not the intended recipient or their designee, please notify the sender 
> immediately by return e-mail and delete all copies of this email, including 
> all attachments.
>