Return-Path: X-Original-To: apmail-creadur-commits-archive@www.apache.org Delivered-To: apmail-creadur-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5B9A9DE62 for ; Tue, 30 Oct 2012 19:58:58 +0000 (UTC) Received: (qmail 85573 invoked by uid 500); 30 Oct 2012 19:58:58 -0000 Delivered-To: apmail-creadur-commits-archive@creadur.apache.org Received: (qmail 85540 invoked by uid 500); 30 Oct 2012 19:58:58 -0000 Mailing-List: contact commits-help@creadur.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@creadur.apache.org Delivered-To: mailing list commits@creadur.apache.org Received: (qmail 85527 invoked by uid 99); 30 Oct 2012 19:58:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2012 19:58:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2012 19:58:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id DC00E238897F for ; Tue, 30 Oct 2012 19:58:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1403848 - in /creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice: ./ descriptor.xml pom.xml verify.groovy Date: Tue, 30 Oct 2012 19:58:12 -0000 To: commits@creadur.apache.org From: rdonkin@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121030195812.DC00E238897F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rdonkin Date: Tue Oct 30 19:58:12 2012 New Revision: 1403848 URL: http://svn.apache.org/viewvc?rev=1403848&view=rev Log: WHISKER-6 Test generation of license by maven plugin when descriptor has a subsidary copyright notice. Added: creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/ creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/descriptor.xml (with props) creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/pom.xml (with props) creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/verify.groovy Added: creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/descriptor.xml URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/descriptor.xml?rev=1403848&view=auto ============================================================================== --- creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/descriptor.xml (added) +++ creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/descriptor.xml Tue Oct 30 19:58:12 2012 @@ -0,0 +1,81 @@ + + + + + + + + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + + + + + + + + Copyright (c) PRIMARY + + + + + + + + + + + + Copyright (c) DEPENDENT + + + + + + Propchange: creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/descriptor.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/pom.xml URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/pom.xml?rev=1403848&view=auto ============================================================================== --- creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/pom.xml (added) +++ creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/pom.xml Tue Oct 30 19:58:12 2012 @@ -0,0 +1,64 @@ + + + + 4.0.0 + + + org.apache.creadur.whisker.it + PrimaryLicenseWithCopyrightNotice + @project.version@ + + Verify that copyright notices are output for primary license + + WHISKER-3 - ensure that copyright notices are output for primary licenses. + + + + UTF-8 + 1.5 + + + + + + org.apache.creadur.whisker + apache-whisker-plugin4maven + @project.version@ + + + generate-stuff + package + + generate + + + + + descriptor.xml + + + + + + \ No newline at end of file Propchange: creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/verify.groovy URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/verify.groovy?rev=1403848&view=auto ============================================================================== --- creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/verify.groovy (added) +++ creadur/whisker/trunk/apache-whisker-plugin4maven/src/it/primary-license-with-copyright-notice/verify.groovy Tue Oct 30 19:58:12 2012 @@ -0,0 +1,46 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +assert !new File(basedir, "target/NOTICE").exists() + +def license = new File(basedir, "target/LICENSE") +assert license.exists() + +def reader = new BufferedReader(new InputStreamReader(new FileInputStream(license), "UTF-8")) + +def primary = false +def dependent = false + +def line = reader.readLine() +while (line != null) { + if (line.contains("Copyright (c) PRIMARY")) { + primary = true + } + if (line.contains("Copyright (c) DEPENDENT")) { + dependent = true + } + + line = reader.readLine() +} + +assert primary +assert dependent + + +return true; \ No newline at end of file