MPCLOVER-32: Fully disable Clover in <code>clover:off</code> so that the Clover compiler adapter delegates straight to the default compiler.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@171214 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol committed 2005-05-21 14:46:36 +00:00
1 parent c036d70a05
commit e9155c7833
6 files changed
+140

No files matched your search

+5
View File
@@ -214,6 +214,11 @@
-->
<goal name="clover:off-internal">
<!-- Disable Clover -->
<ant:clover-setup
initstring="${maven.clover.database}"
enabled="false"/>
<j:set var="maven.build.dest" value="${mavenBuildDestOld}" scope="parent" />
${context.removeVariable('build.compiler')}
@@ -0,0 +1,43 @@
<!--
/*
* Copyright 2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project default="testPlugin"
xmlns:util="jelly:util"
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:x="jelly:xml"
xmlns:maven="jelly:maven"
xmlns:assert="assert">
<goal name="testPlugin">
<attainGoal name="clean"/>
<attainGoal name="clover:on"/>
<attainGoal name="jar"/>
<attainGoal name="clover:off"/>
<ant:delete dir="${maven.build.dest}"/>
<ant:record name="${maven.build.dir}/log.txt" action="start"/>
<attainGoal name="jar"/>
<ant:record name="${maven.build.dir}/log.txt" action="stop"/>
<assert:assertFileContains file="${maven.build.dir}/log.txt"
match="Clover is disabled. Delegating straight to the compiler"/>
</goal>
</project>
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project>
<extend>${basedir}/../project.xml</extend>
<id>testCloverOffCleansProperly</id>
<name>testCloverOffCleansProperly</name>
<build>
<sourceDirectory>src/main</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>
</build>
</project>
@@ -0,0 +1,25 @@
package org.apache.maven.clover.test;
/* ====================================================================
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
public class Simple
{
public void someMethod()
{
}
}
@@ -0,0 +1,29 @@
package org.apache.maven.clover.test;
/* ====================================================================
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
import junit.framework.TestCase;
public class SimpleTest extends TestCase
{
public void testSomeMethod()
{
Simple simple = new Simple();
simple.someMethod();
}
}
+4
View File
@@ -26,6 +26,10 @@
</properties>
<body>
<release version="1.9-SNAPSHOT" date="in SVN">
<action dev="vmassol" type="fix" issue="MPCLOVER-32">
Fully disable Clover in <code>clover:off</code> so that the Clover
compiler adapter delegates straight to the default compiler.
</action>
<action dev="vmassol" type="remove">
Removed the <code>maven.clover.jar</code> property that was used to
override the default Clover jar. This property was not working