I'm not sure if i've done that correctly but i've tried adding it to my
plugin.  Firstly I added to
<reporting>
...
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
    <configuration>
      <configLocation>src/site/resources/cust_conf.xml</configLocation>     
<packageNamesLocation>com/name/maven/checks/packagenames.xml</packageNamesLocation>
    </configuration>
    
    <dependencies>               
      <dependency>
      <groupId>com.name.maven.checks</groupId>
      <artifactId>name-maven-checks</artifactId>
      <version>1.0</version>
      </dependency>

And it didn't like the dependencies or dependency elements...

Then I added an element to the build tag, and added the dependencies tag, it
built, but was still unable to locate com/name/maven/checks/packageNames.xml

<build>
  <plugins>
...
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
    <dependencies>
    <dependency>
      <groupId>com.name.maven.checks</groupId>
      <artifactId>name-maven-checks</artifactId>
      <version>1.0</version>
      </dependency>                 
    </dependencies>

Also something I've noticed is a META-INF folder hasn't been generated in
the target, I've tried generating the module jar again but it still doesn't.

Any help is appreciated
Thanks alot
Daniel


Brian E Fox wrote:
> 
> Add the jar containing your module in a dependencies section inside your
> plugin configuration block.
> 
> http://maven.apache.org/ref/current/maven-model/maven.html#class_plugin
> 
> -----Original Message-----
> From: DanBarker85 [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 16, 2007 4:54 PM
> To: [email protected]
> Subject: Using Custom Developed Checkstyle Check Modules
> 
> 
> Hi 
> i'm trying to follow the maven tutorial "Using Custom Developed
> Checkstyle
> Check Modules" and the CheckStyle 4.3 tutorial entitled "Writing
> Checks".  I
> have taken the example custom check java code from the page and used the
> maven install command to build a jar file.  The problem is, despite
> following the instructions I'm getting problems running the command 'mvn
> checkstyle:checkstyle'
> 
> [ERROR] Unable to process package names location:
> com/name/maven/checks/packagenames.xml
> java.io.IOException: Unable to find location
> 'com/name/maven/checks/packagenames.xml' as URL, File or Resource.
> 
> I've followed the tutorial by including the check in the build
> extenstions,
> and configured the checkstyle plugin to look for packageNamesLocation in
> com/name/maven/checks/packagenames.xml and ensured that this path and
> jar
> are both created in the repository.
> 
> Could anybody help me realise where I am going wrong, I'm new to Maven. 
> Thanks alot
> 
> Daniel
> -- 
> View this message in context:
> http://www.nabble.com/Using-Custom-Developed-Checkstyle-Check-Modules-tf
> 4822152s177.html#a13795812
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Using-Custom-Developed-Checkstyle-Check-Modules-tf4822152s177.html#a13797401
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to