Mark,

On Sat, Aug 13, 2011 at 2:19 PM, Mark Struberg <strub...@yahoo.de> wrote:

> Hi!
>
> Lets try to follow the logical route. It's either
>
> a.) cannot find the 'compile' mojo
>
> or
>
> b.) 'or one of its required components'
>
>
> Ad a.): Maven plugins have xdoc annotations which will be used to generate
> a META-INF/maven/plugin.xml file in the plugins jar.
> Can you check if this exists and looks good?
> Did you try other plugins? A plain 'mvn clean' works well?
>
>
> Starting mvn with -X might also give you a bit more clue about whats going
> on.\
>


b) would be the most probable reason here. Further, I suspect that one
component fails at runtime. The build error returned via mvn -X is at
http://pastebin.com/e6E0VtW6 . Would you need the full build log?

In line 49 of the given pastebin, I see the following.
   Caused by:
org.codehaus.plexus.component.composition.CompositionException: Composition
failed for the field toolchainManager in object of type
org.apache.maven.plugin.CompilerMojo

And, in the plugin.xml, there's this requirement which I suspect is failing.
       <requirement>
          <role>org.apache.maven.toolchain.ToolchainManager</role>
          <field-name>toolchainManager</field-name>
        </requirement>

I guess this confirms that the issue is in a component? The CompilerMojo
class in m-compiler-p contains the variable toolchainManager with the
annotation '@component'. The class is in [2]. Things I checked are seems to
be in-place. No idea why it fails.

A mojo with 'compile' <goal>' is available in the plugin.xml at the location
you said. The file is available to look at [3] in case you think more
details are needed.
And, `mvn clean` worked flawlessly, as well as the job of
maven-resources-plugin.

I guess we need to go in to second step?

 [3] http://pastebin.com/yWyGAG2G


Thanks for your response!
--Kasun



>
> LieGrue,
> strub
>
> --- On Sat, 8/13/11, Kasun Gajasinghe <kasu...@gmail.com> wrote:
>
> > From: Kasun Gajasinghe <kasu...@gmail.com>
> > Subject: Issue in m-compiler-p probably related to maven-toolchain
> > To: "Maven Developers List" <dev@maven.apache.org>
> > Cc: "kiorky" <kio...@cryptelium.net>, "Serkan Kaba" <ser...@gentoo.org>,
> "Alistair Bush" <ali_b...@gentoo.org>
> > Date: Saturday, August 13, 2011, 6:14 AM
> > Hi devs,
> >
> > As you may have probably heard, Maven integration in Gentoo
> > is fully working
> > for user-level. Currently, I'm working on getting the
> > system-level
> > integration working, which is the main goal of this
> > project.
> >
> > I'm now faced with an issue related to m-compiler-p when
> > compiling a simple
> > project at sys-level. I should note that I'm using the
> > custom-built maven
> > NOT the official build. I'm asking this question from you
> > to get a _hint_ to
> > fix this issue.
> >
> > m-compiler-p fails with,
> >
> > [INFO] Internal error in the plugin manager executing goal
> > 'org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile':
> > Unable to
> > find the mojo 'compile' (or one of its required components)
> > in the plugin
> > 'org.apache.maven.plugins:maven-compiler-plugin'
> > Can not set
> > org.apache.maven.toolchain.DefaultToolchainManager field
> > org.apache.maven.plugin.AbstractCompilerMojo.toolchainManager
> > to
> > org.apache.maven.toolchain.DefaultToolchainManager
> >
> > Full build stack trace is at [1].
> >
> > I've checked the components.xml file of
> > maven-toolchain-1.0, but couldn't
> > figure out the issue. The implementation for the
> > <role>
> > org.apache.maven.toolchain.ToolchainManager is
> > org.apache.maven.toolchain.DefaultToolchainManager. So, it
> > should work. I've
> > gone through the source file of AbstractCompilerMojo [2] as
> > well without any
> > success.
> >
> > Can anyone let me know where I should I look to fix this
> > issue? I understand
> > that this is not the official build, so you all don't need
> > to be concerned
> > with this. But any help to figure this out is much
> > appreciated!
> >
> > [1] http://pastebin.com/e6E0VtW6
> >
>

 [2] 
http://svn.apache.org/viewvc/maven/plugins/tags/maven-compiler-plugin-2.3.2/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java?view=markup




> >
> > Thanks,
> > --Kasun
> >
> > --
> > ~~~*******'''''''''''''*******~~~
> > Kasun Gajasinghe,
> > University of Moratuwa,
> > Sri Lanka.
> > Blog: http://blog.kasunbg.org
> > Twitter: http://twitter.com/kasunbg
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>


-- 
~~~*******'''''''''''''*******~~~
Kasun Gajasinghe,
University of Moratuwa,
Sri Lanka.
Blog: http://blog.kasunbg.org
Twitter: http://twitter.com/kasunbg

Reply via email to