You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Duncan Doyle <du...@gmail.com> on 2007/10/10 15:44:56 UTC

Custom plugin not found

Hello,

I've created a custom Maven2 plugin for our SCM system (CA Harvest). This
plugin is deployed in our internal remote repository. This remote repository
is configured as a pluginRepository in my 'settings.xml ' file. The plugin's
groupId ('org.test.tools.maven.harvest') has been specified in the
<pluginGroups> section in my 'settings.xml' file.

The plugin's 'checkout' goal needs to be executed from the commandline
without a POM (because the project's POM is in the SCM system). When I
execute the command 'mvn harvest:checkout' I get the following output:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'harvest'.
[INFO] org.test.tools.maven.harvest: checking for updates from central
Returning NULL
[INFO] org.apache.maven.plugins : checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-harvest-plugin: checking for
updates from central
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-harvest-plugin' does not
exist or no valid version could be found
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Oct 10 15:27:54 CEST 2007
[INFO] Final Memory: 3M/6M
[INFO]
------------------------------------------------------------------------

It looks to me that only the 'central' repository is scanned for the plugin,
although I have correctly specified my internal remote repository in the
<profile> section of my ' settings.xml' file. Furthermore, when I specify my
internal remote repository as a mirrorOf 'central' the plugin is found. So,
why doesn't maven scan my internal remote repository for the needed plugin
when the repository is specified in as a pluginRepository in my '
settings.xml' file?

The plugin can be used when it is specified in the build section of a POM
(which is done to be able to run the harvest:update goal on a project to
update the sources from the SCM), which to me indicates that my
configuration is correct. It just doesn't look for the plugin when the maven
command is issued without a POM.

With kind regards,

Duncan Doyle

Re: Custom plugin not found

Posted by Jörg Schaible <jo...@gmx.de>.
Duncan Doyle wrote:

> Hello,
> 
> I've created a custom Maven2 plugin for our SCM system (CA Harvest). This
> plugin is deployed in our internal remote repository. This remote
> repository is configured as a pluginRepository in my 'settings.xml ' file.
> The plugin's groupId ('org.test.tools.maven.harvest') has been specified
> in the <pluginGroups> section in my 'settings.xml' file.

AFAICS M2 ignores the settings.xml if there's no POM (bug). But you can help
yourself. Create a dummy POM and call Maven like:

mvn -f /dummy.pom harvest:checkout

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Custom plugin not found

Posted by Jörg Schaible <jo...@gmx.de>.
Manos Batsis wrote:

> 
> 
> On a similar issue, I just noticed that my custom plugin works fine in
> the site lifecycle but breaks when calling a goal directly as M2 thinks
> it's a maven plugin; my understanding is M2 uses the wrong groupId when
> trying to check the repo for it (should be
> gr.abiss.mvn.plugins:maven-jstools-plugin instead of
> org.apache.maven.plugins:maven-jstools-plugin).

This is a different issue. You have to declare a pluginGroup in your
settings.xml to instruct Maven to look for additional groupIds.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Custom plugin not found

Posted by Duncan Doyle <du...@gmail.com>.
You can configure that with the <pluginGroups> configuration in the
settings.xml file. That works fine, I tested it by configuring my internal
remote plugin repo as a mirrorOf central (as I described in one of my
previous posts). The issue that I'm faced with here is the fact that Maven
doesn't load the active profiles when it runs without a POM. I made a
bugreport of it here: http://jira.codehaus.org/browse/MNG-3235

Re: Custom plugin not found

Posted by Tim Kettler <ti...@udo.edu>.
http://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html

Manos Batsis schrieb:
> 
> 
> On a similar issue, I just noticed that my custom plugin works fine in 
> the site lifecycle but breaks when calling a goal directly as M2 thinks 
> it's a maven plugin; my understanding is M2 uses the wrong groupId when 
> trying to check the repo for it (should be 
> gr.abiss.mvn.plugins:maven-jstools-plugin instead of 
> org.apache.maven.plugins:maven-jstools-plugin). Of course the plugin is 
> in the repo but M2 does not "get" the goal prefix:
> 
> 
> manos@eva:~/workspace/sarissa> mvn -e jstools:jslint
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'jstools'.
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] The plugin 'org.apache.maven.plugins:maven-jstools-plugin' does 
> not exist or no valid version could be found
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 
> 'org.apache.maven.plugins:maven-jstools-plugin' does not exist or no 
> valid version could be found
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1281) 
> 
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1517) 
> 
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:381) 
> 
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:135) 
> 
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
> 
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
> 
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         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 
> plugin 'org.apache.maven.plugins:maven-jstools-plugin' does not exist or 
> no valid version could be found
>         at 
> org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:225) 
> 
>         at 
> org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:87) 
> 
>         at 
> org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:158) 
> 
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1252) 
> 
>         ... 14 more
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Wed Oct 10 18:32:37 EEST 2007
> [INFO] Final Memory: 2M/4M
> [INFO] 
> ------------------------------------------------------------------------
> manos@eva:~/workspace/sarissa>
> 
> 
> 
> 
> Duncan Doyle wrote:
>> My profile is specified in the <activeProfiles> section and works when I
>> perform maven goals on POMs. I tried to enable it explicitly using the -P
>> command, but that didn't work either. I'll create a bug-report.
>>
>> Regards,
>>
>> Duncan
>>
>> On 10/10/07, Tim Kettler <ti...@udo.edu> wrote:
>>> How do you enable the profile?
>>>
>>> If you have permanantly enabled it via <activeProfiles/> in your
>>> settings.xml it should be enabled even if no pom is present. If this is
>>> not the case I would consider that a bug in maven.
>>>
>>> If you haven't enabled it by default, try enabling it explicitly with
>>> the -P command line option.
>>>
>>> Duncan Doyle schrieb:
>>>> I think that's actually the problem. When I execute 'mvn
>>>> help:active-profiles' this is the output:
>>>>
>>>> [INFO] Scanning for projects...
>>>> [INFO] Searching repository for plugin with prefix: 'help'.
>>>> [INFO]
>>>>
>>> ---------------------------------------------------------------------------- 
>>>
>>>> [INFO] Building Maven Default Project
>>>> [INFO]    task-segment: [help:active-profiles] (aggregator-style)
>>>> [INFO]
>>>>
>>> ---------------------------------------------------------------------------- 
>>>
>>>> [INFO]
>>>> ------------------------------------------------------------------------ 
>>>>
>>>> [ERROR] BUILD ERROR
>>>> [INFO]
>>>> ------------------------------------------------------------------------ 
>>>>
>>>> [INFO] Cannot execute mojo: active-profiles. It requires a project with
>>> an
>>>> existing pom.xml, but the build is not using one.
>>>> [INFO]
>>>> ------------------------------------------------------------------------ 
>>>>
>>>> [INFO] For more information, run Maven with the -e switch
>>>> [INFO]
>>>> ------------------------------------------------------------------------ 
>>>>
>>>> [INFO] Total time: < 1 second
>>>> [INFO] Finished at: Wed Oct 10 16:03:55 CEST 2007
>>>> [INFO] Final Memory: 2M/6M
>>>> [INFO]
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>> This indicates that, when you don't have a POM, your profile isn't
>>> loaded.
>>>> So in my case it won't find my 'pluginRepository', because it is
>>> specified
>>>> in my profile.
>>>>
>>>> It looks to me that it is then impossible to execute a goal from a
>>> custom
>>>> plugin, which is not in the central repository, without having a POM.
>>> This
>>>> seems a bit odd to me. I really need this feature to perform a
>>> 'checkout' on
>>>> my SCM (CA Harvest) using my maven plugin without a POM.
>>>>
>>>> Regards,
>>>>
>>>> Duncan Doyle
>>>>
>>>> On 10/10/07, Tim Kettler <ti...@udo.edu> wrote:
>>>>> Hi,
>>>>>
>>>>> From your description I would guess that your profile simply is not
>>>>> activated. Run 'mvn help:active-profiles' to ensure your profile is
>>>>> active.
>>>>>
>>>>> -Tim
>>>>>
>>>>> Duncan Doyle schrieb:
>>>>>> Hello,
>>>>>>
>>>>>> I've created a custom Maven2 plugin for our SCM system (CA Harvest).
>>>>> This
>>>>>> plugin is deployed in our internal remote repository. This remote
>>>>> repository
>>>>>> is configured as a pluginRepository in my 'settings.xml ' file. The
>>>>> plugin's
>>>>>> groupId ('org.test.tools.maven.harvest') has been specified in the
>>>>>> <pluginGroups> section in my 'settings.xml' file.
>>>>>>
>>>>>> The plugin's 'checkout' goal needs to be executed from the 
>>>>>> commandline
>>>>>> without a POM (because the project's POM is in the SCM system). 
>>>>>> When I
>>>>>> execute the command 'mvn harvest:checkout' I get the following 
>>>>>> output:
>>>>>>
>>>>>> [INFO] Scanning for projects...
>>>>>> [INFO] Searching repository for plugin with prefix: 'harvest'.
>>>>>> [INFO] org.test.tools.maven.harvest: checking for updates from 
>>>>>> central
>>>>>> Returning NULL
>>>>>> [INFO] org.apache.maven.plugins : checking for updates from central
>>>>>> [INFO] org.codehaus.mojo: checking for updates from central
>>>>>> [INFO] artifact 
>>>>>> org.apache.maven.plugins:maven-harvest-plugin:checking
>>>>> for
>>>>>> updates from central
>>>>>> [INFO]
>>>>>>
>>> ------------------------------------------------------------------------
>>>>>> [ERROR] BUILD ERROR
>>>>>> [INFO]
>>>>>>
>>> ------------------------------------------------------------------------
>>>>>> [INFO] The plugin 'org.apache.maven.plugins:maven-harvest-plugin' 
>>>>>> does
>>>>> not
>>>>>> exist or no valid version could be found
>>>>>> [INFO]
>>>>>>
>>> ------------------------------------------------------------------------
>>>>>> [INFO] For more information, run Maven with the -e switch
>>>>>> [INFO]
>>>>>>
>>> ------------------------------------------------------------------------
>>>>>> [INFO] Total time: 1 second
>>>>>> [INFO] Finished at: Wed Oct 10 15:27:54 CEST 2007
>>>>>> [INFO] Final Memory: 3M/6M
>>>>>> [INFO]
>>>>>>
>>> ------------------------------------------------------------------------
>>>>>> It looks to me that only the 'central' repository is scanned for the
>>>>> plugin,
>>>>>> although I have correctly specified my internal remote repository in
>>> the
>>>>>> <profile> section of my ' settings.xml' file. Furthermore, when I
>>>>> specify my
>>>>>> internal remote repository as a mirrorOf 'central' the plugin is
>>> found.
>>>>> So,
>>>>>> why doesn't maven scan my internal remote repository for the needed
>>>>> plugin
>>>>>> when the repository is specified in as a pluginRepository in my '
>>>>>> settings.xml' file?
>>>>>>
>>>>>> The plugin can be used when it is specified in the build section of a
>>>>> POM
>>>>>> (which is done to be able to run the harvest:update goal on a project
>>> to
>>>>>> update the sources from the SCM), which to me indicates that my
>>>>>> configuration is correct. It just doesn't look for the plugin when 
>>>>>> the
>>>>> maven
>>>>>> command is issued without a POM.
>>>>>>
>>>>>> With kind regards,
>>>>>>
>>>>>> Duncan Doyle
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Custom plugin not found

Posted by Manos Batsis <ma...@geekologue.com>.

On a similar issue, I just noticed that my custom plugin works fine in 
the site lifecycle but breaks when calling a goal directly as M2 thinks 
it's a maven plugin; my understanding is M2 uses the wrong groupId when 
trying to check the repo for it (should be 
gr.abiss.mvn.plugins:maven-jstools-plugin instead of 
org.apache.maven.plugins:maven-jstools-plugin). Of course the plugin is 
in the repo but M2 does not "get" the goal prefix:


manos@eva:~/workspace/sarissa> mvn -e jstools:jslint
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jstools'.
[INFO] 
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-jstools-plugin' does 
not exist or no valid version could be found
[INFO] 
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 
'org.apache.maven.plugins:maven-jstools-plugin' does not exist or no 
valid version could be found
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1281)
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1517)
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:381)
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:135)
         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         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 
plugin 'org.apache.maven.plugins:maven-jstools-plugin' does not exist or 
no valid version could be found
         at 
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:225)
         at 
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:87)
         at 
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:158)
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1252)
         ... 14 more
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Oct 10 18:32:37 EEST 2007
[INFO] Final Memory: 2M/4M
[INFO] 
------------------------------------------------------------------------
manos@eva:~/workspace/sarissa>




Duncan Doyle wrote:
> My profile is specified in the <activeProfiles> section and works when I
> perform maven goals on POMs. I tried to enable it explicitly using the -P
> command, but that didn't work either. I'll create a bug-report.
> 
> Regards,
> 
> Duncan
> 
> On 10/10/07, Tim Kettler <ti...@udo.edu> wrote:
>> How do you enable the profile?
>>
>> If you have permanantly enabled it via <activeProfiles/> in your
>> settings.xml it should be enabled even if no pom is present. If this is
>> not the case I would consider that a bug in maven.
>>
>> If you haven't enabled it by default, try enabling it explicitly with
>> the -P command line option.
>>
>> Duncan Doyle schrieb:
>>> I think that's actually the problem. When I execute 'mvn
>>> help:active-profiles' this is the output:
>>>
>>> [INFO] Scanning for projects...
>>> [INFO] Searching repository for plugin with prefix: 'help'.
>>> [INFO]
>>>
>> ----------------------------------------------------------------------------
>>> [INFO] Building Maven Default Project
>>> [INFO]    task-segment: [help:active-profiles] (aggregator-style)
>>> [INFO]
>>>
>> ----------------------------------------------------------------------------
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [ERROR] BUILD ERROR
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Cannot execute mojo: active-profiles. It requires a project with
>> an
>>> existing pom.xml, but the build is not using one.
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] For more information, run Maven with the -e switch
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: < 1 second
>>> [INFO] Finished at: Wed Oct 10 16:03:55 CEST 2007
>>> [INFO] Final Memory: 2M/6M
>>> [INFO]
>>> ------------------------------------------------------------------------
>>>
>>> This indicates that, when you don't have a POM, your profile isn't
>> loaded.
>>> So in my case it won't find my 'pluginRepository', because it is
>> specified
>>> in my profile.
>>>
>>> It looks to me that it is then impossible to execute a goal from a
>> custom
>>> plugin, which is not in the central repository, without having a POM.
>> This
>>> seems a bit odd to me. I really need this feature to perform a
>> 'checkout' on
>>> my SCM (CA Harvest) using my maven plugin without a POM.
>>>
>>> Regards,
>>>
>>> Duncan Doyle
>>>
>>> On 10/10/07, Tim Kettler <ti...@udo.edu> wrote:
>>>> Hi,
>>>>
>>>> From your description I would guess that your profile simply is not
>>>> activated. Run 'mvn help:active-profiles' to ensure your profile is
>>>> active.
>>>>
>>>> -Tim
>>>>
>>>> Duncan Doyle schrieb:
>>>>> Hello,
>>>>>
>>>>> I've created a custom Maven2 plugin for our SCM system (CA Harvest).
>>>> This
>>>>> plugin is deployed in our internal remote repository. This remote
>>>> repository
>>>>> is configured as a pluginRepository in my 'settings.xml ' file. The
>>>> plugin's
>>>>> groupId ('org.test.tools.maven.harvest') has been specified in the
>>>>> <pluginGroups> section in my 'settings.xml' file.
>>>>>
>>>>> The plugin's 'checkout' goal needs to be executed from the commandline
>>>>> without a POM (because the project's POM is in the SCM system). When I
>>>>> execute the command 'mvn harvest:checkout' I get the following output:
>>>>>
>>>>> [INFO] Scanning for projects...
>>>>> [INFO] Searching repository for plugin with prefix: 'harvest'.
>>>>> [INFO] org.test.tools.maven.harvest: checking for updates from central
>>>>> Returning NULL
>>>>> [INFO] org.apache.maven.plugins : checking for updates from central
>>>>> [INFO] org.codehaus.mojo: checking for updates from central
>>>>> [INFO] artifact org.apache.maven.plugins:maven-harvest-plugin:checking
>>>> for
>>>>> updates from central
>>>>> [INFO]
>>>>>
>> ------------------------------------------------------------------------
>>>>> [ERROR] BUILD ERROR
>>>>> [INFO]
>>>>>
>> ------------------------------------------------------------------------
>>>>> [INFO] The plugin 'org.apache.maven.plugins:maven-harvest-plugin' does
>>>> not
>>>>> exist or no valid version could be found
>>>>> [INFO]
>>>>>
>> ------------------------------------------------------------------------
>>>>> [INFO] For more information, run Maven with the -e switch
>>>>> [INFO]
>>>>>
>> ------------------------------------------------------------------------
>>>>> [INFO] Total time: 1 second
>>>>> [INFO] Finished at: Wed Oct 10 15:27:54 CEST 2007
>>>>> [INFO] Final Memory: 3M/6M
>>>>> [INFO]
>>>>>
>> ------------------------------------------------------------------------
>>>>> It looks to me that only the 'central' repository is scanned for the
>>>> plugin,
>>>>> although I have correctly specified my internal remote repository in
>> the
>>>>> <profile> section of my ' settings.xml' file. Furthermore, when I
>>>> specify my
>>>>> internal remote repository as a mirrorOf 'central' the plugin is
>> found.
>>>> So,
>>>>> why doesn't maven scan my internal remote repository for the needed
>>>> plugin
>>>>> when the repository is specified in as a pluginRepository in my '
>>>>> settings.xml' file?
>>>>>
>>>>> The plugin can be used when it is specified in the build section of a
>>>> POM
>>>>> (which is done to be able to run the harvest:update goal on a project
>> to
>>>>> update the sources from the SCM), which to me indicates that my
>>>>> configuration is correct. It just doesn't look for the plugin when the
>>>> maven
>>>>> command is issued without a POM.
>>>>>
>>>>> With kind regards,
>>>>>
>>>>> Duncan Doyle
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Custom plugin not found

Posted by Duncan Doyle <du...@gmail.com>.
My profile is specified in the <activeProfiles> section and works when I
perform maven goals on POMs. I tried to enable it explicitly using the -P
command, but that didn't work either. I'll create a bug-report.

Regards,

Duncan

On 10/10/07, Tim Kettler <ti...@udo.edu> wrote:
>
> How do you enable the profile?
>
> If you have permanantly enabled it via <activeProfiles/> in your
> settings.xml it should be enabled even if no pom is present. If this is
> not the case I would consider that a bug in maven.
>
> If you haven't enabled it by default, try enabling it explicitly with
> the -P command line option.
>
> Duncan Doyle schrieb:
> > I think that's actually the problem. When I execute 'mvn
> > help:active-profiles' this is the output:
> >
> > [INFO] Scanning for projects...
> > [INFO] Searching repository for plugin with prefix: 'help'.
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > [INFO] Building Maven Default Project
> > [INFO]    task-segment: [help:active-profiles] (aggregator-style)
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Cannot execute mojo: active-profiles. It requires a project with
> an
> > existing pom.xml, but the build is not using one.
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] For more information, run Maven with the -e switch
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Total time: < 1 second
> > [INFO] Finished at: Wed Oct 10 16:03:55 CEST 2007
> > [INFO] Final Memory: 2M/6M
> > [INFO]
> > ------------------------------------------------------------------------
> >
> > This indicates that, when you don't have a POM, your profile isn't
> loaded.
> > So in my case it won't find my 'pluginRepository', because it is
> specified
> > in my profile.
> >
> > It looks to me that it is then impossible to execute a goal from a
> custom
> > plugin, which is not in the central repository, without having a POM.
> This
> > seems a bit odd to me. I really need this feature to perform a
> 'checkout' on
> > my SCM (CA Harvest) using my maven plugin without a POM.
> >
> > Regards,
> >
> > Duncan Doyle
> >
> > On 10/10/07, Tim Kettler <ti...@udo.edu> wrote:
> >> Hi,
> >>
> >> From your description I would guess that your profile simply is not
> >> activated. Run 'mvn help:active-profiles' to ensure your profile is
> >> active.
> >>
> >> -Tim
> >>
> >> Duncan Doyle schrieb:
> >>> Hello,
> >>>
> >>> I've created a custom Maven2 plugin for our SCM system (CA Harvest).
> >> This
> >>> plugin is deployed in our internal remote repository. This remote
> >> repository
> >>> is configured as a pluginRepository in my 'settings.xml ' file. The
> >> plugin's
> >>> groupId ('org.test.tools.maven.harvest') has been specified in the
> >>> <pluginGroups> section in my 'settings.xml' file.
> >>>
> >>> The plugin's 'checkout' goal needs to be executed from the commandline
> >>> without a POM (because the project's POM is in the SCM system). When I
> >>> execute the command 'mvn harvest:checkout' I get the following output:
> >>>
> >>> [INFO] Scanning for projects...
> >>> [INFO] Searching repository for plugin with prefix: 'harvest'.
> >>> [INFO] org.test.tools.maven.harvest: checking for updates from central
> >>> Returning NULL
> >>> [INFO] org.apache.maven.plugins : checking for updates from central
> >>> [INFO] org.codehaus.mojo: checking for updates from central
> >>> [INFO] artifact org.apache.maven.plugins:maven-harvest-plugin:checking
> >> for
> >>> updates from central
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [ERROR] BUILD ERROR
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [INFO] The plugin 'org.apache.maven.plugins:maven-harvest-plugin' does
> >> not
> >>> exist or no valid version could be found
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [INFO] For more information, run Maven with the -e switch
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [INFO] Total time: 1 second
> >>> [INFO] Finished at: Wed Oct 10 15:27:54 CEST 2007
> >>> [INFO] Final Memory: 3M/6M
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>>
> >>> It looks to me that only the 'central' repository is scanned for the
> >> plugin,
> >>> although I have correctly specified my internal remote repository in
> the
> >>> <profile> section of my ' settings.xml' file. Furthermore, when I
> >> specify my
> >>> internal remote repository as a mirrorOf 'central' the plugin is
> found.
> >> So,
> >>> why doesn't maven scan my internal remote repository for the needed
> >> plugin
> >>> when the repository is specified in as a pluginRepository in my '
> >>> settings.xml' file?
> >>>
> >>> The plugin can be used when it is specified in the build section of a
> >> POM
> >>> (which is done to be able to run the harvest:update goal on a project
> to
> >>> update the sources from the SCM), which to me indicates that my
> >>> configuration is correct. It just doesn't look for the plugin when the
> >> maven
> >>> command is issued without a POM.
> >>>
> >>> With kind regards,
> >>>
> >>> Duncan Doyle
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Custom plugin not found

Posted by Tim Kettler <ti...@udo.edu>.
How do you enable the profile?

If you have permanantly enabled it via <activeProfiles/> in your 
settings.xml it should be enabled even if no pom is present. If this is 
not the case I would consider that a bug in maven.

If you haven't enabled it by default, try enabling it explicitly with 
the -P command line option.

Duncan Doyle schrieb:
> I think that's actually the problem. When I execute 'mvn
> help:active-profiles' this is the output:
> 
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'help'.
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Building Maven Default Project
> [INFO]    task-segment: [help:active-profiles] (aggregator-style)
> [INFO]
> ----------------------------------------------------------------------------
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Cannot execute mojo: active-profiles. It requires a project with an
> existing pom.xml, but the build is not using one.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Wed Oct 10 16:03:55 CEST 2007
> [INFO] Final Memory: 2M/6M
> [INFO]
> ------------------------------------------------------------------------
> 
> This indicates that, when you don't have a POM, your profile isn't loaded.
> So in my case it won't find my 'pluginRepository', because it is specified
> in my profile.
> 
> It looks to me that it is then impossible to execute a goal from a custom
> plugin, which is not in the central repository, without having a POM. This
> seems a bit odd to me. I really need this feature to perform a 'checkout' on
> my SCM (CA Harvest) using my maven plugin without a POM.
> 
> Regards,
> 
> Duncan Doyle
> 
> On 10/10/07, Tim Kettler <ti...@udo.edu> wrote:
>> Hi,
>>
>> From your description I would guess that your profile simply is not
>> activated. Run 'mvn help:active-profiles' to ensure your profile is
>> active.
>>
>> -Tim
>>
>> Duncan Doyle schrieb:
>>> Hello,
>>>
>>> I've created a custom Maven2 plugin for our SCM system (CA Harvest).
>> This
>>> plugin is deployed in our internal remote repository. This remote
>> repository
>>> is configured as a pluginRepository in my 'settings.xml ' file. The
>> plugin's
>>> groupId ('org.test.tools.maven.harvest') has been specified in the
>>> <pluginGroups> section in my 'settings.xml' file.
>>>
>>> The plugin's 'checkout' goal needs to be executed from the commandline
>>> without a POM (because the project's POM is in the SCM system). When I
>>> execute the command 'mvn harvest:checkout' I get the following output:
>>>
>>> [INFO] Scanning for projects...
>>> [INFO] Searching repository for plugin with prefix: 'harvest'.
>>> [INFO] org.test.tools.maven.harvest: checking for updates from central
>>> Returning NULL
>>> [INFO] org.apache.maven.plugins : checking for updates from central
>>> [INFO] org.codehaus.mojo: checking for updates from central
>>> [INFO] artifact org.apache.maven.plugins:maven-harvest-plugin: checking
>> for
>>> updates from central
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [ERROR] BUILD ERROR
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] The plugin 'org.apache.maven.plugins:maven-harvest-plugin' does
>> not
>>> exist or no valid version could be found
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] For more information, run Maven with the -e switch
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: 1 second
>>> [INFO] Finished at: Wed Oct 10 15:27:54 CEST 2007
>>> [INFO] Final Memory: 3M/6M
>>> [INFO]
>>> ------------------------------------------------------------------------
>>>
>>> It looks to me that only the 'central' repository is scanned for the
>> plugin,
>>> although I have correctly specified my internal remote repository in the
>>> <profile> section of my ' settings.xml' file. Furthermore, when I
>> specify my
>>> internal remote repository as a mirrorOf 'central' the plugin is found.
>> So,
>>> why doesn't maven scan my internal remote repository for the needed
>> plugin
>>> when the repository is specified in as a pluginRepository in my '
>>> settings.xml' file?
>>>
>>> The plugin can be used when it is specified in the build section of a
>> POM
>>> (which is done to be able to run the harvest:update goal on a project to
>>> update the sources from the SCM), which to me indicates that my
>>> configuration is correct. It just doesn't look for the plugin when the
>> maven
>>> command is issued without a POM.
>>>
>>> With kind regards,
>>>
>>> Duncan Doyle
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Custom plugin not found

Posted by Duncan Doyle <du...@gmail.com>.
I think that's actually the problem. When I execute 'mvn
help:active-profiles' this is the output:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO]
----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [help:active-profiles] (aggregator-style)
[INFO]
----------------------------------------------------------------------------
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Cannot execute mojo: active-profiles. It requires a project with an
existing pom.xml, but the build is not using one.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Oct 10 16:03:55 CEST 2007
[INFO] Final Memory: 2M/6M
[INFO]
------------------------------------------------------------------------

This indicates that, when you don't have a POM, your profile isn't loaded.
So in my case it won't find my 'pluginRepository', because it is specified
in my profile.

It looks to me that it is then impossible to execute a goal from a custom
plugin, which is not in the central repository, without having a POM. This
seems a bit odd to me. I really need this feature to perform a 'checkout' on
my SCM (CA Harvest) using my maven plugin without a POM.

Regards,

Duncan Doyle

On 10/10/07, Tim Kettler <ti...@udo.edu> wrote:
>
> Hi,
>
> From your description I would guess that your profile simply is not
> activated. Run 'mvn help:active-profiles' to ensure your profile is
> active.
>
> -Tim
>
> Duncan Doyle schrieb:
> > Hello,
> >
> > I've created a custom Maven2 plugin for our SCM system (CA Harvest).
> This
> > plugin is deployed in our internal remote repository. This remote
> repository
> > is configured as a pluginRepository in my 'settings.xml ' file. The
> plugin's
> > groupId ('org.test.tools.maven.harvest') has been specified in the
> > <pluginGroups> section in my 'settings.xml' file.
> >
> > The plugin's 'checkout' goal needs to be executed from the commandline
> > without a POM (because the project's POM is in the SCM system). When I
> > execute the command 'mvn harvest:checkout' I get the following output:
> >
> > [INFO] Scanning for projects...
> > [INFO] Searching repository for plugin with prefix: 'harvest'.
> > [INFO] org.test.tools.maven.harvest: checking for updates from central
> > Returning NULL
> > [INFO] org.apache.maven.plugins : checking for updates from central
> > [INFO] org.codehaus.mojo: checking for updates from central
> > [INFO] artifact org.apache.maven.plugins:maven-harvest-plugin: checking
> for
> > updates from central
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] The plugin 'org.apache.maven.plugins:maven-harvest-plugin' does
> not
> > exist or no valid version could be found
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] For more information, run Maven with the -e switch
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Total time: 1 second
> > [INFO] Finished at: Wed Oct 10 15:27:54 CEST 2007
> > [INFO] Final Memory: 3M/6M
> > [INFO]
> > ------------------------------------------------------------------------
> >
> > It looks to me that only the 'central' repository is scanned for the
> plugin,
> > although I have correctly specified my internal remote repository in the
> > <profile> section of my ' settings.xml' file. Furthermore, when I
> specify my
> > internal remote repository as a mirrorOf 'central' the plugin is found.
> So,
> > why doesn't maven scan my internal remote repository for the needed
> plugin
> > when the repository is specified in as a pluginRepository in my '
> > settings.xml' file?
> >
> > The plugin can be used when it is specified in the build section of a
> POM
> > (which is done to be able to run the harvest:update goal on a project to
> > update the sources from the SCM), which to me indicates that my
> > configuration is correct. It just doesn't look for the plugin when the
> maven
> > command is issued without a POM.
> >
> > With kind regards,
> >
> > Duncan Doyle
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Custom plugin not found

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

 From your description I would guess that your profile simply is not 
activated. Run 'mvn help:active-profiles' to ensure your profile is active.

-Tim

Duncan Doyle schrieb:
> Hello,
> 
> I've created a custom Maven2 plugin for our SCM system (CA Harvest). This
> plugin is deployed in our internal remote repository. This remote repository
> is configured as a pluginRepository in my 'settings.xml ' file. The plugin's
> groupId ('org.test.tools.maven.harvest') has been specified in the
> <pluginGroups> section in my 'settings.xml' file.
> 
> The plugin's 'checkout' goal needs to be executed from the commandline
> without a POM (because the project's POM is in the SCM system). When I
> execute the command 'mvn harvest:checkout' I get the following output:
> 
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'harvest'.
> [INFO] org.test.tools.maven.harvest: checking for updates from central
> Returning NULL
> [INFO] org.apache.maven.plugins : checking for updates from central
> [INFO] org.codehaus.mojo: checking for updates from central
> [INFO] artifact org.apache.maven.plugins:maven-harvest-plugin: checking for
> updates from central
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] The plugin 'org.apache.maven.plugins:maven-harvest-plugin' does not
> exist or no valid version could be found
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Wed Oct 10 15:27:54 CEST 2007
> [INFO] Final Memory: 3M/6M
> [INFO]
> ------------------------------------------------------------------------
> 
> It looks to me that only the 'central' repository is scanned for the plugin,
> although I have correctly specified my internal remote repository in the
> <profile> section of my ' settings.xml' file. Furthermore, when I specify my
> internal remote repository as a mirrorOf 'central' the plugin is found. So,
> why doesn't maven scan my internal remote repository for the needed plugin
> when the repository is specified in as a pluginRepository in my '
> settings.xml' file?
> 
> The plugin can be used when it is specified in the build section of a POM
> (which is done to be able to run the harvest:update goal on a project to
> update the sources from the SCM), which to me indicates that my
> configuration is correct. It just doesn't look for the plugin when the maven
> command is issued without a POM.
> 
> With kind regards,
> 
> Duncan Doyle
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org