On Fri, 8 Jul 2005, Kris Bravo wrote:

You should define

 @requiresDependencyResolution compile

in the class-level javadoc.

> I have the following handle to the MavenProject defined in a plugin
> written for maven 2.
>
>    /**
>     * The project whose project files to create.
>     *
>     * @parameter expression="${project}"
>     * @required
>     */
>    private MavenProject project;
>
> When I attempt to get the list of classpath elements, i.e.,
>
> project.getCompileClasspathElements()
>
> I receive a null pointer exception due to a call to
> getArtifacts().size();
>
> java.lang.NullPointerException
>         at
> org.apache.maven.project.MavenProject.getCompileClasspathElements(MavenProject.java:282)
>         at
> org.apache.maven.plugin.xmlbeans.XmlBeansPlugin.getClasspath(XmlBeansPlugin.java:271)
>         at
> org.apache.maven.plugin.xmlbeans.ParameterAdapter.getCompilerParameters(ParameterAdapter.java:31)
>         at
> org.apache.maven.plugin.xmlbeans.XmlBeansPlugin.execute(XmlBeansPlugin.java:203)
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:401)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:169)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:143)
>
> Is there another way to retrieve a List of the classpath elements used
> by the java compiler during a build? Also, the debug lists elements
> (calls them constituents) in the classpath, but doesn't include those
> defined in the dependencies section of the pom.
>
> Am I barking up the wrong tree?
>
> Kris
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to