1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/apisupport.tc.cobertura/arch.xml Fri Nov 23 11:55:04 2012 +0100
1.3 @@ -0,0 +1,228 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<!--
1.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
1.7 +
1.8 +Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
1.9 +
1.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
1.11 +Other names may be trademarks of their respective owners.
1.12 +
1.13 +
1.14 +The contents of this file are subject to the terms of either the GNU
1.15 +General Public License Version 2 only ("GPL") or the Common
1.16 +Development and Distribution License("CDDL") (collectively, the
1.17 +"License"). You may not use this file except in compliance with the
1.18 +License. You can obtain a copy of the License at
1.19 +http://www.netbeans.org/cddl-gplv2.html
1.20 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
1.21 +specific language governing permissions and limitations under the
1.22 +License. When distributing the software, include this License Header
1.23 +Notice in each file and include the License file at
1.24 +nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
1.25 +particular file as subject to the "Classpath" exception as provided
1.26 +by Oracle in the GPL Version 2 section of the License file that
1.27 +accompanied this code. If applicable, add the following below the
1.28 +License Header, with the fields enclosed by brackets [] replaced by
1.29 +your own identifying information:
1.30 +"Portions Copyrighted [year] [name of copyright owner]"
1.31 +
1.32 +Contributor(s):
1.33 +
1.34 +The Original Software is NetBeans. The Initial Developer of the Original
1.35 +Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
1.36 +Microsystems, Inc. All Rights Reserved.
1.37 +
1.38 +If you wish your version of this file to be governed by only the CDDL
1.39 +or only the GPL Version 2, indicate your decision by adding
1.40 +"[Contributor] elects to include this software in this distribution
1.41 +under the [CDDL or GPL Version 2] license." If you do not indicate a
1.42 +single choice of license, a recipient has the option to distribute
1.43 +your version of this file under either the CDDL, the GPL Version 2 or
1.44 +to extend the choice of license to its licensees as provided above.
1.45 +However, if you add GPL Version 2 code and therefore, elected the GPL
1.46 +Version 2 license, then the option applies only if the new code is
1.47 +made subject to such option by the copyright holder.
1.48 +-->
1.49 +<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" "../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [
1.50 + <!ENTITY api-questions SYSTEM "../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml">
1.51 +]>
1.52 +
1.53 +<api-answers
1.54 + question-version="1.26"
1.55 + author="rmichalsky@netbeans.org"
1.56 +>
1.57 +
1.58 + &api-questions;
1.59 +
1.60 +
1.61 +<!--
1.62 + <question id="arch-overall" when="init">
1.63 + Describe the overall architecture.
1.64 + <hint>
1.65 + What will be API for
1.66 + <a href="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi">
1.67 + clients and what support API</a>?
1.68 + What parts will be pluggable?
1.69 + How will plug-ins be registered? Please use <code><api type="export"/></code>
1.70 + to describe your general APIs.
1.71 + If possible please provide
1.72 + simple diagrams.
1.73 + </hint>
1.74 + </question>
1.75 +-->
1.76 + <answer id="arch-overall">
1.77 + <p>
1.78 + Cobertura Module Test Coverage provides Ant scripts to measure test coverage
1.79 + of NetBeans Module and Suite projects. It needs Module Build Harness to run.
1.80 + </p>
1.81 + </answer>
1.82 +
1.83 +
1.84 +
1.85 +<!--
1.86 + <question id="arch-time" when="init">
1.87 + What are the time estimates of the work?
1.88 + <hint>
1.89 + Please express your estimates of how long the design, implementation,
1.90 + stabilization are likely to last. How many people will be needed to
1.91 + implement this and what is the expected milestone by which the work should be
1.92 + ready?
1.93 + </hint>
1.94 + </question>
1.95 +-->
1.96 + <answer id="arch-time">
1.97 + <p>
1.98 + NetBeans 6.8.
1.99 + </p>
1.100 + </answer>
1.101 +
1.102 +
1.103 +<!--
1.104 + <question id="dep-nb" when="init">
1.105 + What other NetBeans projects and modules does this one depend on?
1.106 + <hint>
1.107 + If you want, describe such projects as imported APIs using
1.108 + the <code><api name="identification" type="import or export" category="stable" url="where is the description" /></code>
1.109 + </hint>
1.110 + </question>
1.111 +-->
1.112 + <answer id="dep-nb">
1.113 + <defaultanswer generate='here' />
1.114 + </answer>
1.115 +
1.116 +
1.117 +
1.118 +<!--
1.119 + <question id="dep-non-nb" when="init">
1.120 + What other projects outside NetBeans does this one depend on?
1.121 +
1.122 + <hint>
1.123 + Some non-NetBeans projects are packaged as NetBeans modules
1.124 + (see <a href="http://libs.netbeans.org/">libraries</a>) and
1.125 + it is preferred to use this approach when more modules may
1.126 + depend on such third-party library.
1.127 + </hint>
1.128 + </question>
1.129 +-->
1.130 + <answer id="dep-non-nb">
1.131 + <p>
1.132 + Cobertura 1.9, http://cobertura.sourceforge.net.
1.133 + </p>
1.134 + </answer>
1.135 +
1.136 +<!--
1.137 + <question id="deploy-jar" when="impl">
1.138 + Do you deploy just module JAR file(s) or other files as well?
1.139 + <hint>
1.140 + Usually a module consist of one JAR file (perhaps with Class-Path
1.141 + extensions) and also a configuration file that enables it. If you
1.142 + have any other files, use
1.143 + <api group="java.io.File" name="yourname" type="export" category="friend">...</api>
1.144 + to define the location, name and stability of your files (of course
1.145 + changing "yourname" and "friend" to suit your needs).
1.146 +
1.147 + If it uses more than one JAR, describe where they are located, how
1.148 + they refer to each other.
1.149 + If it consist of module JAR(s) and other files, please describe
1.150 + what is their purpose, why other files are necessary. Please
1.151 + make sure that installation/uninstallation leaves the system
1.152 + in state as it was before installation.
1.153 + </hint>
1.154 + </question>
1.155 +-->
1.156 + <answer id="deploy-jar">
1.157 + <p>
1.158 + Deploys Ant scripts testcoverage.xml and testcoverage-suite.xml
1.159 + into harness cluster, cobertura.jar and its libraries.
1.160 + </p>
1.161 + </answer>
1.162 +
1.163 +
1.164 +
1.165 +<!--
1.166 + <question id="deploy-nbm" when="impl">
1.167 + Can you deploy an NBM via the Update Center?
1.168 + <hint>
1.169 + If not why?
1.170 + </hint>
1.171 + </question>
1.172 +-->
1.173 + <answer id="deploy-nbm">
1.174 + <p>
1.175 + Yes.
1.176 + </p>
1.177 + </answer>
1.178 +
1.179 +
1.180 +<!--
1.181 + <question id="exec-process" when="impl">
1.182 + Do you execute an external process from your module? How do you ensure
1.183 + that the result is the same on different platforms? Do you parse output?
1.184 + Do you depend on result code?
1.185 + <hint>
1.186 + If you feed an input, parse the output please declare that as an API.
1.187 + </hint>
1.188 + </question>
1.189 +-->
1.190 + <answer id="exec-process">
1.191 + <p>
1.192 + Yes, Cobertura is run in separate processes due to GPL license it uses.
1.193 + </p>
1.194 + </answer>
1.195 +
1.196 +
1.197 +
1.198 +<!--
1.199 + <question id="exec-property" when="impl">
1.200 + Is execution of your code influenced by any environment or
1.201 + Java system (<code>System.getProperty</code>) property?
1.202 +
1.203 + <hint>
1.204 + If there is a property that can change the behavior of your
1.205 + code, somebody will likely use it. You should describe what it does
1.206 + and the <a href="http://openide.netbeans.org/tutorial/api-design.html#life">stability category</a>
1.207 + of this API. You may use
1.208 + <pre>
1.209 + <api type="export" group="property" name="id" category="private" url="http://...">
1.210 + description of the property, where it is used, what it influence, etc.
1.211 + </api>
1.212 + </pre>
1.213 + </hint>
1.214 + </question>
1.215 +-->
1.216 + <answer id="exec-property">
1.217 + <p>
1.218 + There is a bug which prevents Cobertura tasks to run on different JVM than Ant.
1.219 + When running on NB.org module project (part of NetBeans sources) it is
1.220 + advisable to use:
1.221 + <pre>
1.222 + nbjdk.home.defaulted=true
1.223 + permit.jdk6.builds=true
1.224 + </pre>
1.225 + which ensures that tests are run within the same JVM (as of NB 6.8).
1.226 + </p>
1.227 + </answer>
1.228 +
1.229 +
1.230 +
1.231 +</api-answers>
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/apisupport.tc.cobertura/build.xml Fri Nov 23 11:55:04 2012 +0100
2.3 @@ -0,0 +1,5 @@
2.4 +<?xml version="1.0" encoding="UTF-8"?>
2.5 +<project basedir="." default="netbeans" name="contrib/apisupport.tc.cobertura">
2.6 + <description>Builds, tests, and runs the project org.netbeans.modules.apisupport.tc.cobertura</description>
2.7 + <import file="../../nbbuild/templates/projectized.xml"/>
2.8 +</project>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/apisupport.tc.cobertura/external/asm-3.0-license.txt Fri Nov 23 11:55:04 2012 +0100
3.3 @@ -0,0 +1,42 @@
3.4 +Name: ASM
3.5 +Version: 3.0
3.6 +Description: Library for bytecode manipulation
3.7 +License: BSD
3.8 +OSR: 10906
3.9 +Origin: http://download.forge.objectweb.org/asm/asm-3.0-bin.zip
3.10 +Files: asm-3.0.jar
3.11 +Comment: See issue 145107, 178037
3.12 +
3.13 +Use of is ASM 3.0 is governed by the terms of the license below:
3.14 +
3.15 +[TEXT OF THE LICENSE]
3.16 +Copyright (c) 2000-2005 INRIA, France Telecom
3.17 +All rights reserved.
3.18 +
3.19 +Redistribution and use in source and binary forms, with or without
3.20 +modification, are permitted provided that the following conditions
3.21 +are met:
3.22 +
3.23 +1. Redistributions of source code must retain the above copyright
3.24 + notice, this list of conditions and the following disclaimer.
3.25 +
3.26 +2. Redistributions in binary form must reproduce the above copyright
3.27 + notice, this list of conditions and the following disclaimer in the
3.28 + documentation and/or other materials provided with the distribution.
3.29 +
3.30 +3. Neither the name of the copyright holders nor the names of its
3.31 + contributors may be used to endorse or promote products derived from
3.32 + this software without specific prior written permission.
3.33 +
3.34 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
3.35 +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3.36 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3.37 +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
3.38 +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3.39 +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3.40 +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3.41 +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3.42 +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3.43 +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
3.44 +THE POSSIBILITY OF SUCH DAMAGE.
3.45 +
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/apisupport.tc.cobertura/external/asm-tree-3.0-license.txt Fri Nov 23 11:55:04 2012 +0100
4.3 @@ -0,0 +1,42 @@
4.4 +Name: ASM
4.5 +Version: 3.0
4.6 +Description: Library for bytecode manipulation
4.7 +License: BSD
4.8 +OSR: 10906
4.9 +Origin: http://download.forge.objectweb.org/asm/asm-3.0-bin.zip
4.10 +Files: asm-tree-3.0.jar
4.11 +Comment: See issue 145107, 178037
4.12 +
4.13 +Use of is ASM 3.0 is governed by the terms of the license below:
4.14 +
4.15 +[TEXT OF THE LICENSE]
4.16 +Copyright (c) 2000-2005 INRIA, France Telecom
4.17 +All rights reserved.
4.18 +
4.19 +Redistribution and use in source and binary forms, with or without
4.20 +modification, are permitted provided that the following conditions
4.21 +are met:
4.22 +
4.23 +1. Redistributions of source code must retain the above copyright
4.24 + notice, this list of conditions and the following disclaimer.
4.25 +
4.26 +2. Redistributions in binary form must reproduce the above copyright
4.27 + notice, this list of conditions and the following disclaimer in the
4.28 + documentation and/or other materials provided with the distribution.
4.29 +
4.30 +3. Neither the name of the copyright holders nor the names of its
4.31 + contributors may be used to endorse or promote products derived from
4.32 + this software without specific prior written permission.
4.33 +
4.34 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
4.35 +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4.36 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4.37 +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
4.38 +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
4.39 +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
4.40 +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
4.41 +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
4.42 +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
4.43 +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
4.44 +THE POSSIBILITY OF SUCH DAMAGE.
4.45 +
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/apisupport.tc.cobertura/external/binaries-list Fri Nov 23 11:55:04 2012 +0100
5.3 @@ -0,0 +1,5 @@
5.4 +7864BDF46B61AE956070B17B06BE6C4B7258A81F cobertura-1.9.3.jar
5.5 +D1616C03F056291A2314510DEA75739B15B4D415 asm-3.0.jar
5.6 +6FFF655717D1E1871DECFE9F8E46A531E8DF3A31 asm-tree-3.0.jar
5.7 +5592374F834645C4AE250F4C9FBB314C9369D698 jakarta-oro-2.0.8.jar
5.8 +55856D711AB8B88F8C7B04FD85FF1643FFBFDE7C log4j-1.2.9.jar
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/apisupport.tc.cobertura/external/cobertura-1.9.3-license.txt Fri Nov 23 11:55:04 2012 +0100
6.3 @@ -0,0 +1,34 @@
6.4 +Name: Cobertura
6.5 +Version: 1.9.3
6.6 +Description: Library for measuring and reporting code coverage of tests.
6.7 +License: cobertura
6.8 +OSR: 10710
6.9 +Origin: http://prdownloads.sourceforge.net/cobertura/cobertura-1.9-bin.zip?download
6.10 +Files: cobertura-1.9.3.jar
6.11 +Source: http://prdownloads.sourceforge.net/cobertura/cobertura-1.9-src.zip?download
6.12 +Comment: See issue 145107, 178037
6.13 +
6.14 +Use of Cobertura 1.9.x is governed by the terms of the license below:
6.15 +
6.16 +[TEXT OF THE LICENSE]
6.17 +
6.18 +LICENSE
6.19 +
6.20 +Cobertura is free software. Most of it is licensed under the GNU
6.21 +GPL, and you can redistribute it and/or modify it under the terms
6.22 +of the GNU General Public License as published by the Free Software
6.23 +Foundation; either version 2 of the License, or (at your option)
6.24 +any later version. Please review the file COPYING included in this
6.25 +distribution for further details.
6.26 +
6.27 +Parts of Cobertura are licensed under the Apache Software License,
6.28 +Version 1.1.
6.29 +
6.30 +WARRANTY
6.31 +
6.32 +Cobertura is distributed in the hope that it will be useful, but
6.33 +WITHOUT ANY WARRANTY; without even the implied warranty of
6.34 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6.35 +General Public License for more details.
6.36 +
6.37 +
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/apisupport.tc.cobertura/external/jakarta-oro-2.0.8-license.txt Fri Nov 23 11:55:04 2012 +0100
7.3 @@ -0,0 +1,67 @@
7.4 +Name: Jakarta Oro
7.5 +Version: 2.0.8
7.6 +Description: Library for handling regular expressions
7.7 +License: Apache-1.1
7.8 +OSR: 7796
7.9 +Origin: http://jakarta.apache.org/site/downloads/downloads_oro.cgi
7.10 +Files: jakarta-oro-2.0.8.jar
7.11 +Source: http://mirrors.isc.org/pub/apache/jakarta/oro/source/jakarta-oro-2.0.8.zip
7.12 +Comment: See Issue #145107
7.13 +
7.14 +Use of Jakarta Oro version 2.0.8 is governed by the terms of the license below:
7.15 +
7.16 +[TEXT OF THE LICENSE]
7.17 +
7.18 +/* ====================================================================
7.19 + * The Apache Software License, Version 1.1
7.20 + *
7.21 + * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
7.22 + * reserved.
7.23 + *
7.24 + * Redistribution and use in source and binary forms, with or without
7.25 + * modification, are permitted provided that the following conditions
7.26 + * are met:
7.27 + *
7.28 + * 1. Redistributions of source code must retain the above copyright
7.29 + * notice, this list of conditions and the following disclaimer.
7.30 + *
7.31 + * 2. Redistributions in binary form must reproduce the above copyright
7.32 + * notice, this list of conditions and the following disclaimer in
7.33 + * the documentation and/or other materials provided with the
7.34 + * distribution.
7.35 + *
7.36 + * 3. The end-user documentation included with the redistribution,
7.37 + * if any, must include the following acknowledgment:
7.38 + * "This product includes software developed by the
7.39 + * Apache Software Foundation (http://www.apache.org/)."
7.40 + * Alternately, this acknowledgment may appear in the software itself,
7.41 + * if and wherever such third-party acknowledgments normally appear.
7.42 + *
7.43 + * 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
7.44 + * must not be used to endorse or promote products derived from this
7.45 + * software without prior written permission. For written
7.46 + * permission, please contact apache@apache.org.
7.47 + *
7.48 + * 5. Products derived from this software may not be called "Apache"
7.49 + * or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
7.50 + * name, without prior written permission of the Apache Software Foundation.
7.51 + *
7.52 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
7.53 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
7.54 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7.55 + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
7.56 + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7.57 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7.58 + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
7.59 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
7.60 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7.61 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
7.62 + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7.63 + * SUCH DAMAGE.
7.64 + * ====================================================================
7.65 + *
7.66 + * This software consists of voluntary contributions made by many
7.67 + * individuals on behalf of the Apache Software Foundation. For more
7.68 + * information on the Apache Software Foundation, please see
7.69 + * <http://www.apache.org/>.
7.70 + */
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/apisupport.tc.cobertura/external/log4j-1.2.9-license.txt Fri Nov 23 11:55:04 2012 +0100
8.3 @@ -0,0 +1,61 @@
8.4 +Name: Log4J
8.5 +Version: 1.2.9
8.6 +Description: Library for logging in Java
8.7 +License: Apache-1.1
8.8 +OSR: 5415
8.9 +Origin: http://archive.apache.org/dist/logging/log4j/1.2.9/logging-log4j-1.2.9.zip
8.10 +Files: log4j-1.2.9.jar
8.11 +Comment: See issue #145107
8.12 +
8.13 +Use of Log4J version 1.2.9 is governed by the terms of the license below:
8.14 +
8.15 +[TEXT OF THE LICENSE]
8.16 +
8.17 +/*
8.18 + * ============================================================================
8.19 + * The Apache Software License, Version 1.1
8.20 + * ============================================================================
8.21 + *
8.22 + * Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
8.23 + *
8.24 + * Redistribution and use in source and binary forms, with or without modifica-
8.25 + * tion, are permitted provided that the following conditions are met:
8.26 + *
8.27 + * 1. Redistributions of source code must retain the above copyright notice,
8.28 + * this list of conditions and the following disclaimer.
8.29 + *
8.30 + * 2. Redistributions in binary form must reproduce the above copyright notice,
8.31 + * this list of conditions and the following disclaimer in the documentation
8.32 + * and/or other materials provided with the distribution.
8.33 + *
8.34 + * 3. The end-user documentation included with the redistribution, if any, must
8.35 + * include the following acknowledgment: "This product includes software
8.36 + * developed by the Apache Software Foundation (http://www.apache.org/)."
8.37 + * Alternately, this acknowledgment may appear in the software itself, if
8.38 + * and wherever such third-party acknowledgments normally appear.
8.39 + *
8.40 + * 4. The names "log4j" and "Apache Software Foundation" must not be used to
8.41 + * endorse or promote products derived from this software without prior
8.42 + * written permission. For written permission, please contact
8.43 + * apache@apache.org.
8.44 + *
8.45 + * 5. Products derived from this software may not be called "Apache", nor may
8.46 + * "Apache" appear in their name, without prior written permission of the
8.47 + * Apache Software Foundation.
8.48 + *
8.49 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
8.50 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
8.51 + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
8.52 + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
8.53 + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
8.54 + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
8.55 + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
8.56 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8.57 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
8.58 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8.59 + *
8.60 + * This software consists of voluntary contributions made by many individuals
8.61 + * on behalf of the Apache Software Foundation. For more information on the
8.62 + * Apache Software Foundation, please see <http://www.apache.org/>.
8.63 + *
8.64 + */
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/apisupport.tc.cobertura/manifest.mf Fri Nov 23 11:55:04 2012 +0100
9.3 @@ -0,0 +1,5 @@
9.4 +Manifest-Version: 1.0
9.5 +OpenIDE-Module: org.netbeans.modules.apisupport.tc.cobertura
9.6 +OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/tc/cobertura/Bundle.properties
9.7 +OpenIDE-Module-Specification-Version: 1.5
9.8 +
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/apisupport.tc.cobertura/nbproject/project.properties Fri Nov 23 11:55:04 2012 +0100
10.3 @@ -0,0 +1,12 @@
10.4 +javac.source=1.6
10.5 +javac.compilerargs=-Xlint -Xlint:-serial
10.6 +
10.7 +javadoc.arch=${basedir}/arch.xml
10.8 +nbm.module.author=Jesse Glick <jglick@netbeans.org>
10.9 +
10.10 +# test coverage external libs
10.11 +release.external/cobertura-1.9.3.jar=testcoverage/cobertura/cobertura-1.9.3.jar
10.12 +release.external/asm-3.0.jar=testcoverage/cobertura/lib/asm-3.0.jar
10.13 +release.external/asm-tree-3.0.jar=testcoverage/cobertura/lib/asm-tree-3.0.jar
10.14 +release.external/jakarta-oro-2.0.8.jar=testcoverage/cobertura/lib/jakarta-oro-2.0.8.jar
10.15 +release.external/log4j-1.2.9.jar=testcoverage/cobertura/lib/log4j-1.2.9.jar
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/apisupport.tc.cobertura/nbproject/project.xml Fri Nov 23 11:55:04 2012 +0100
11.3 @@ -0,0 +1,18 @@
11.4 +<?xml version="1.0" encoding="UTF-8"?>
11.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
11.6 + <type>org.netbeans.modules.apisupport.project</type>
11.7 + <configuration>
11.8 + <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
11.9 + <code-name-base>org.netbeans.modules.apisupport.tc.cobertura</code-name-base>
11.10 + <module-dependencies>
11.11 + <dependency>
11.12 + <code-name-base>org.netbeans.modules.apisupport.harness</code-name-base>
11.13 + <run-dependency>
11.14 + <specification-version>1.18</specification-version>
11.15 + </run-dependency>
11.16 + </dependency>
11.17 + </module-dependencies>
11.18 + <public-packages/>
11.19 + </data>
11.20 + </configuration>
11.21 +</project>
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/apisupport.tc.cobertura/release/testcoverage-suite.xml Fri Nov 23 11:55:04 2012 +0100
12.3 @@ -0,0 +1,80 @@
12.4 +<?xml version="1.0" encoding="UTF-8"?>
12.5 +<project name="testcoverage-suite">
12.6 +
12.7 +<!--
12.8 + Test coverage measurement for apisupport suite projects.
12.9 +
12.10 + At present, this only measure coverage for unit tests. Functional
12.11 + tests, performance tests and other types of tests are not considered.
12.12 +
12.13 + NOTE: Implemented using Cobertura, follows general contract described in harness README.
12.14 +-->
12.15 + <property name="testcoverage.suite.present" value="true"/>
12.16 + <property name="cobertura.dir" value="${harness.dir}/testcoverage/cobertura"/>
12.17 +
12.18 + <path id="cobertura.classpath">
12.19 + <fileset dir="${cobertura.dir}">
12.20 + <include name="cobertura-1.9.3.jar" />
12.21 + <include name="lib/**/*.jar" />
12.22 + </fileset>
12.23 + </path>
12.24 +
12.25 + <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/>
12.26 +
12.27 + <target name="cobertura-init">
12.28 + <property name="cobertura.datafiles.merge.dir" value="${basedir}/build/test/cobertura-datafiles"/>
12.29 + <property name="cobertura.report.sources.dir" value="${basedir}/build/test/sources-for-report"/>
12.30 + <property name="testcoverage.report.dir" value="build/test/cobertura-report"/>
12.31 + <property name="cobertura.datafile" value="build/test/global-cobertura.ser"/>
12.32 + </target>
12.33 +
12.34 + <target name="merge-coverage-reports" depends="-init,cobertura-init">
12.35 + <!-- Creates a report by merging data collected from tests previously run on modules -->
12.36 +
12.37 + <mkdir dir="build/test"/>
12.38 + <delete file="${cobertura.datafile}" failonerror="false"/>
12.39 + <delete dir="${testcoverage.report.dir}" failonerror="false"/>
12.40 +
12.41 + <delete dir="${cobertura.datafiles.merge.dir}" quiet="true" />
12.42 + <mkdir dir="${cobertura.datafiles.merge.dir}" />
12.43 +
12.44 + <delete dir="${cobertura.report.sources.dir}" quiet="true" />
12.45 + <mkdir dir="${cobertura.report.sources.dir}" />
12.46 +
12.47 + <!-- have each module copy its .ser file to the suite for merging -->
12.48 + <subant target="-copy-cobertura-datafile" buildpath="${modules.sorted}" inheritrefs="false" inheritall="false">
12.49 + <property name="suite.merge.dir" value="${cobertura.datafiles.merge.dir}"/>
12.50 + </subant>
12.51 +
12.52 + <cobertura-merge datafile="${cobertura.datafile}">
12.53 + <fileset dir="${cobertura.datafiles.merge.dir}">
12.54 + <include name="**/*" />
12.55 + </fileset>
12.56 + </cobertura-merge>
12.57 +
12.58 + <!-- have each module copy its sources to the suite for reporting -->
12.59 + <subant target="-copy-source-folder" buildpath="${modules.sorted}" inheritrefs="false" inheritall="false">
12.60 + <property name="suite.sources.dir" value="${cobertura.report.sources.dir}"/>
12.61 + </subant>
12.62 +
12.63 + <cobertura-report datafile="${cobertura.datafile}" destdir="${testcoverage.report.dir}" format="html">
12.64 + <fileset dir="${cobertura.report.sources.dir}">
12.65 + <include name="**/*.java" />
12.66 + </fileset>
12.67 + </cobertura-report>
12.68 + <cobertura-report datafile="${cobertura.datafile}" destdir="${testcoverage.report.dir}" format="xml">
12.69 + <fileset dir="${cobertura.report.sources.dir}">
12.70 + <include name="**/*.java" />
12.71 + </fileset>
12.72 + </cobertura-report>
12.73 + </target>
12.74 +
12.75 + <target name="generate-all-coverage-reports" depends="-init">
12.76 + <subant target="coverage-report" buildpath="${modules.sorted}" inheritrefs="false" inheritall="false"/>
12.77 + </target>
12.78 +
12.79 + <target name="coverage-report" depends="generate-all-coverage-reports,merge-coverage-reports"
12.80 + description="Generates test coverage report for entire suite">
12.81 + </target>
12.82 +
12.83 +</project>
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/apisupport.tc.cobertura/release/testcoverage.xml Fri Nov 23 11:55:04 2012 +0100
13.3 @@ -0,0 +1,229 @@
13.4 +<?xml version="1.0" encoding="UTF-8"?>
13.5 +<project name="testcoverage">
13.6 +
13.7 +<!--
13.8 + Test coverage measurement for apisupport module projects.
13.9 +
13.10 + Unit and functional tests supported.
13.11 +
13.12 + Implemented using Cobertura, follows general contract described in harness README.
13.13 +-->
13.14 + <property name="testcoverage.present" value="true"/>
13.15 + <condition property="cobertura.dir" value="${harness.dir}/testcoverage/cobertura" else="${netbeans.dest.dir}/harness/testcoverage/cobertura">
13.16 + <isset property="harness.dir"/>
13.17 + </condition>
13.18 + <path id="cobertura.classpath">
13.19 + <fileset dir="${cobertura.dir}">
13.20 + <include name="cobertura-1.9.3.jar" />
13.21 + <include name="lib/**/*.jar" />
13.22 + </fileset>
13.23 + </path>
13.24 +
13.25 + <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/>
13.26 +
13.27 + <macrodef name="cobertura-init">
13.28 + <attribute name="test.type"/>
13.29 + <sequential>
13.30 + <property name="build.test.cobertura.classes.dir" value="build/cobertura-instrumented-classes"/>
13.31 + <property name="testcoverage.@{test.type}.report.dir" value="${basedir}/build/test/@{test.type}/cobertura-report"/>
13.32 + <property name="cobertura.@{test.type}.datafile" value="${basedir}/build/test/@{test.type}/cobertura.ser"/>
13.33 + <property name="continue.after.failing.tests" value="true" />
13.34 + <property name="testcoverage.@{test.type}.backup.dir" value="${basedir}/build/test/@{test.type}/modulebackup" />
13.35 +
13.36 + <path id="cobertura.test.cp">
13.37 + <pathelement location="${build.test.cobertura.classes.dir}" />
13.38 + <pathelement location="${cobertura.dir}/cobertura-1.9.3.jar" />
13.39 + <pathelement location="${test.@{test.type}.lib.cp}"/>
13.40 + <path refid="test.@{test.type}.run.cp"/>
13.41 + <pathelement location="build/classes" />
13.42 + </path>
13.43 + </sequential>
13.44 + </macrodef>
13.45 +
13.46 + <target name="cobertura-init" depends="build-init,init,test-init">
13.47 + <cobertura-init test.type="unit" />
13.48 + </target>
13.49 +
13.50 + <target name="cobertura-check-environment">
13.51 + <condition property="nbjdk.active.print" value="${nbjdk.active}" else="UNSET">
13.52 + <isset property="nbjdk.active"/>
13.53 + </condition>
13.54 + <condition property="nbjdk.home.print" value="${nbjdk.home}" else="UNSET">
13.55 + <isset property="nbjdk.home"/>
13.56 + </condition>
13.57 + <condition property="nbjdk.home.defaulted.print" value="YES" else="NO">
13.58 + <isset property="nbjdk.home.defaulted"/>
13.59 + </condition>
13.60 + <fail if="nbjdk.valid">
13.61 +Test coverage tasks can be currently run only with default java platform, that is
13.62 +with property nbjdk.active unset or set to 'default' and with property nbjdk.home
13.63 +unset.
13.64 +
13.65 +For NB.org module, specify properties:
13.66 +nbjdk.home.defaulted=true
13.67 +permit.jdk6.builds=true
13.68 +when running the target.
13.69 +
13.70 +Current java platform setup is:
13.71 + nbjdk.active: ${nbjdk.active.print}
13.72 + nbjdk.home: ${nbjdk.home.print}
13.73 + nbjdk.home defaulted: ${nbjdk.home.defaulted.print}
13.74 + </fail>
13.75 + </target>
13.76 +
13.77 + <macrodef name="coverage-report">
13.78 + <attribute name="test.type" />
13.79 + <sequential>
13.80 + <property name="coverage.report.format" value="html" />
13.81 + <delete dir="${testcoverage.@{test.type}.report.dir}" failonerror="false"/>
13.82 + <cobertura-report format="${coverage.report.format}" datafile="${cobertura.@{test.type}.datafile}" srcdir="${src.dir}" destdir="${testcoverage.@{test.type}.report.dir}"/>
13.83 + </sequential>
13.84 + </macrodef>
13.85 +
13.86 + <target name="-copy-cobertura-datafile" depends="cobertura-init">
13.87 + <!-- rename using code-name-base so the files will be unique in the suite -->
13.88 + <copy file="${cobertura.unit.datafile}" tofile="${suite.merge.dir}/${code.name.base.dashes}.ser" failonerror="false" />
13.89 + </target>
13.90 +
13.91 +
13.92 + <target name="-copy-source-folder" depends="cobertura-init">
13.93 + <!--
13.94 + note that this does not inherently handle if there are multiple source
13.95 + folders; it might be possible to handle this by overriding in the
13.96 + module's build.xml.
13.97 + -->
13.98 + <property name="cobertura.src.dir" value="${suite.sources.dir}" />
13.99 + <mkdir dir="${cobertura.src.dir}" />
13.100 + <copy todir="${cobertura.src.dir}/">
13.101 + <fileset dir="${src.dir}" includes="**/*.java"/>
13.102 + </copy>
13.103 + </target>
13.104 +
13.105 + <target name="cobertura-instrument" depends="cobertura-init, test-build, cobertura-check-environment">
13.106 + <delete dir="${build.test.cobertura.classes.dir}" failonerror="false"/>
13.107 + <delete file="${cobertura.unit.datafile}" failonerror="false"/>
13.108 + <cobertura-instrument todir="${build.test.cobertura.classes.dir}" datafile="${cobertura.unit.datafile}">
13.109 + <fileset dir="${build.classes.dir}" includes="**/*.class" excludes="${test.coverage.exclude.files}"/>
13.110 + </cobertura-instrument>
13.111 + </target>
13.112 +
13.113 + <target name="test-with-cobertura" depends="cobertura-init,init,test-init,netbeans,test-build">
13.114 + <pathconvert pathsep="${line.separator} " property="echo.cobertura.test.cp" refid="cobertura.test.cp"/>
13.115 + <mkdir dir="${build.test.unit.results.dir}"/>
13.116 +
13.117 + <junit showoutput="true" fork="true" failureproperty="tests.failed" errorproperty="tests.failed" filtertrace="${test.filter.trace}" tempdir="${build.test.unit.results.dir}" timeout="${test.timeout}">
13.118 + <batchtest todir="${build.test.unit.results.dir}">
13.119 + <fileset dir="${build.test.unit.classes.dir}" erroronmissingdir="false">
13.120 + <include name="**/*Test.class"/>
13.121 + </fileset>
13.122 +
13.123 + </batchtest>
13.124 + <!--
13.125 + This somewhat duplicates the normal JUnit testing target, but the
13.126 + cobertura.test.cp must come first in the testing classpath for
13.127 + coverage to work properly and there is no other good way to inject it.
13.128 + -->
13.129 + <classpath refid="cobertura.test.cp"/>
13.130 + <syspropertyset refid="test.unit.properties"/>
13.131 + <jvmarg line="${test.run.args}"/>
13.132 + <sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.unit.datafile}" />
13.133 + <formatter type="brief" usefile="false"/>
13.134 + <formatter type="xml"/>
13.135 + </junit>
13.136 + <fail if="tests.failed" unless="continue.after.failing.tests">Some tests failed; see details above.</fail>
13.137 + </target>
13.138 +
13.139 + <target name="test-coverage" depends="cobertura-init, cobertura-instrument, test-with-cobertura"/>
13.140 +
13.141 + <target name="coverage-report" depends="netbeans, test-coverage" description="Creates unit test coverage report for this module">
13.142 + <coverage-report test.type="unit" />
13.143 + </target>
13.144 +
13.145 + <!-- Support for functional tests
13.146 + Those tasks in some ways duplicate those above, but the code coverage setting for qa-functional
13.147 + tests is different from unit tests.
13.148 + -->
13.149 +
13.150 + <target name="cobertura-init-qa-functional" depends="build-init,init,test-init,cobertura-check-environment">
13.151 + <cobertura-init test.type="qa-functional" />
13.152 + <delete file="${cobertura.qa-functional.datafile}" failonerror="false"/>
13.153 + <delete dir="${testcoverage.qa-functional.backup.dir}" failonerror="false" />
13.154 + <mkdir dir="${testcoverage.qa-functional.backup.dir}" />
13.155 + </target>
13.156 +
13.157 + <!-- In case test.coverage.qa-functional.coveredmodules property is not set backup and instrument
13.158 + just the module we're running code coverage from -->
13.159 + <target name="cobertura-instrument-default" unless="test.coverage.qa-functional.coveredmodules">
13.160 + <echo message="Instrumenting module jar." />
13.161 + <copy file="${cluster}/${module.jar}" todir="${testcoverage.qa-functional.backup.dir}/modules" />
13.162 + <cobertura-instrument datafile="${cobertura.qa-functional.datafile}" >
13.163 + <fileset dir="${cluster}" includes="${module.jar}" />
13.164 + </cobertura-instrument>
13.165 + </target>
13.166 +
13.167 + <target name="cobertura-instrument-specified" if="test.coverage.qa-functional.coveredmodules">
13.168 + <echo message="Instrumenting specified files: ${test.coverage.qa-functional.coveredmodules}" />
13.169 + <copy todir="${testcoverage.qa-functional.backup.dir}" verbose="true">
13.170 + <fileset dir="${netbeans.dest.dir}" includes="${test.coverage.qa-functional.coveredmodules}" />
13.171 + </copy>
13.172 + <cobertura-instrument datafile="${cobertura.qa-functional.datafile}">
13.173 + <fileset dir="${netbeans.dest.dir}" includes="${test.coverage.qa-functional.coveredmodules}" />
13.174 + </cobertura-instrument>
13.175 + </target>
13.176 +
13.177 + <target name="testcoverage-restore-default" unless="test.coverage.qa-functional.coveredmodules">
13.178 + <delete file="${cluster}/${module.jar}" />
13.179 + <copy file="${testcoverage.qa-functional.backup.dir}/${module.jar}" todir="${cluster}" />
13.180 + </target>
13.181 +
13.182 + <target name="testcoverage-restore-specified" if="test.coverage.qa-functional.coveredmodules">
13.183 + <delete verbose="true">
13.184 + <fileset dir="${netbeans.dest.dir}" includes="${test.coverage.qa-functional.coveredmodules}" />
13.185 + </delete>
13.186 + <copy todir="${netbeans.dest.dir}" verbose="true" >
13.187 + <fileset dir="${testcoverage.qa-functional.backup.dir}" includes="${test.coverage.qa-functional.coveredmodules}" />
13.188 + </copy>
13.189 + </target>
13.190 +
13.191 + <target name="cobertura-instrument-qa-functional" depends="cobertura-init-qa-functional, test-build, cobertura-instrument-default,cobertura-instrument-specified"/>
13.192 + <target name="test-coverage-restore" depends="cobertura-init-qa-functional, test-build, testcoverage-restore-default,testcoverage-restore-specified" />
13.193 +
13.194 + <target name="test-with-cobertura-qa-functional" depends="cobertura-init-qa-functional,init,test-init,netbeans,test-build">
13.195 + <pathconvert pathsep="${line.separator} " property="echo.cobertura.test.cp" refid="cobertura.test.cp"/>
13.196 + <mkdir dir="${build.test.qa-functional.results.dir}"/>
13.197 + <property name="code.coverage.classpath" value="${cobertura.dir}" />
13.198 + <propertyset id="test.qa-functional.coverage.properties">
13.199 + <propertyset refid="test.qa-functional.properties"/>
13.200 + <propertyref name="code.coverage.classpath" />
13.201 + </propertyset>
13.202 + <junit showoutput="true" fork="true" failureproperty="tests.failed" errorproperty="tests.failed" filtertrace="${test.filter.trace}" tempdir="${build.test.qa-functional.results.dir}" timeout="${test.timeout}">
13.203 + <batchtest todir="${build.test.qa-functional.results.dir}">
13.204 + <fileset dir="${build.test.qa-functional.classes.dir}" erroronmissingdir="false">
13.205 + <include name="**/*.class"/>
13.206 + </fileset>
13.207 +
13.208 + </batchtest>
13.209 + <!--
13.210 + This somewhat duplicates the normal JUnit testing target, but the
13.211 + cobertura.test.cp must come first in the testing classpath for
13.212 + coverage to work properly and there is no other good way to inject it.
13.213 + -->
13.214 + <classpath refid="cobertura.test.cp"/>
13.215 +
13.216 + <syspropertyset refid="test.qa-functional.coverage.properties"/>
13.217 +
13.218 + <jvmarg line="${test.run.args}"/>
13.219 + <sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.qa-functional.datafile}" />
13.220 + <formatter type="brief" usefile="false"/>
13.221 + <formatter type="xml"/>
13.222 + </junit>
13.223 + <fail if="tests.failed" unless="continue.after.failing.tests">Some tests failed; see details above.</fail>
13.224 + </target>
13.225 +
13.226 + <target name="test-coverage-qa-functional" depends="netbeans,cobertura-init-qa-functional,cobertura-instrument-qa-functional,test-with-cobertura-qa-functional,test-coverage-restore"/>
13.227 +
13.228 + <target name="coverage-report-qa-functional" depends="netbeans, test-coverage-qa-functional" description="Creates qa-functional test coverage report for this module">
13.229 + <coverage-report test.type="qa-functional" />
13.230 + </target>
13.231 +
13.232 +</project>
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/apisupport.tc.cobertura/src/org/netbeans/modules/apisupport/tc/cobertura/Bundle.properties Fri Nov 23 11:55:04 2012 +0100
14.3 @@ -0,0 +1,7 @@
14.4 +OpenIDE-Module-Display-Category=Developing NetBeans
14.5 +OpenIDE-Module-Long-Description=\
14.6 + Ant targets for measuring test coverage of apisupport projects using Cobertura.\n\
14.7 + Run 'display-coverage-report' target on a project to measure results and display report in external browser.\n\
14.8 + For integration with Module Build Harness.
14.9 +OpenIDE-Module-Name=Cobertura Module Test Coverage
14.10 +OpenIDE-Module-Short-Description=Ant targets for measuring test coverage of apisupport projects using Cobertura.