So how can I ignore the modules that do not have a classes dir???

Embedded error: Source directory doesn't exists
(c:\opt\npi\common\target\classes).


On 9/14/06, Mick Knutson <[EMAIL PROTECTED]> wrote:

I have a main project with several sub modules and my main project has no
class files in it. I am now getting an error where
"c:\opt\npi\target\classes" does not exists, and it will not exists either.

How can I have cobertura run on just my sub modules that I describe?

Here is my master pom.xml declarations:

<pluginManagement>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>2.0</version>
                    <configuration>
                        <instrumentation>
                            <ignores>
                                <ignore> com.example.boringcode.*</ignore>
                            </ignores>
                            <excludes>

<exclude>com/example/dullcode/**/*.class</exclude>
                                <exclude>com/**/*Test.class</exclude>
                            </excludes>
                        </instrumentation>
                        <!--<check branchrate="80" linerate="70"
haltonerror="true"
                                   totalbranchrate="80"
totallinerate="70">
                                <regex pattern="com.*"
                                       branchrate="80" linerate="90"/>
                                <regex pattern="com.*"
                                       branchrate="40" linerate="30"/>
                        </check>-->
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
.......
</pluginManagement>


<reporting>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
            </plugin>
..............





Here is the error I get:




[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Unable to prepare instrumentation directory.

Embedded error: Source directory doesn't exists
(c:\opt\npi\target\classes).
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException : Unable to prepare
instrumentation directory.
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:559)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(
DefaultLifecycleExecutor.java:475)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(
DefaultLifecycleExecutor.java:891)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle (
DefaultLifecycleExecutor.java:734)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:525)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
DefaultLifecycleExecutor.java:488)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
(DefaultLifecycleExecutor.java:458)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
DefaultLifecycleExecutor.java:306)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:273)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (
DefaultLifecycleExecutor.java:140)
        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.MojoExecutionException : Unable to
prepare instrumentation directory.
        at org.codehaus.mojo.cobertura.CoberturaInstrumentMojo.execute(
CoberturaInstrumentMojo.java:89)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo (
DefaultPluginManager.java:412)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:534)
        ... 20 more
Caused by: java.io.IOException: Source directory doesn't exists
(c:\opt\npi\target\classes).
        at org.codehaus.plexus.util.FileUtils.copyDirectoryStructure(
FileUtils.java:1465)
        at org.codehaus.mojo.cobertura.CoberturaInstrumentMojo.execute(
CoberturaInstrumentMojo.java:85)
        ... 22 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 56 seconds
[INFO] Finished at: Thu Sep 14 14:31:19 PDT 2006
[INFO] Final Memory: 16M/29M
[INFO]
------------------------------------------------------------------------




--

Thanks

DJ MICK
http://www.djmick.com
http://www.myspace.com/mickknutson




--

Thanks

DJ MICK
http://www.djmick.com
http://www.myspace.com/mickknutson

Reply via email to