maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Wilkinson" ...@dealsqueal.com>
Subject Classpath problem when running plugin
Date Thu, 17 Jun 2010 19:45:25 GMT
Hello-
I'm writing my first plugin, and I'm having a problem with my classpath at
runtime.

My plugin uses maven filtering, which I have specified as a dependency:
<dependency>
  <groupId>org.apache.maven.shared</groupId>
  <artifactId>maven-filtering</artifactId>
  <version>1.0-beta-4</version>
</dependency>

It compiles and installs fine, however, whenever I run the goal, I get the
following error:

[INFO] Internal error in the plugin manager executing goal
'com.mycompany.plugins:myPlugin:1.0-SNAPSHOT:myGoal': Unable to load the
mojo 'com.mycompany.plugins:myPlugin:1.0-SNAPSHOT:myGoal' in the plugin
'com.mycompany.plugins:myPlugin'. A required class is missing:
org/codehaus/plexus/util/Scanner

I assume that this class is loaded by a factory at runtime in the class
org.apache.maven.shared.filtering.MavenResourcesFiltering, because I don't
get the error if I recompile without using that class at all.

the codehaus plexus-utils packagge is a dependency of maven-filtering, and
indeed, in my plugin.xml file that was installed by mvn, there is a
reference to it:
<dependency>
  <groupId>org.codehaus.plexus</groupId>
  <artifactId>plexus-utils</artifactId>
  <type>jar</type>
  <version>1.5.15</version>
</dependency>

what's strange is - the core resources plugin depends on plexus-utils as
well, and uses the same MavenResourcesFiltering class - and I can run that
goal just fine.

Any idea what I'm doing wrong?

Thanks.


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


Mime
View raw message