1/******************************************************************************* 2 * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors 3 * This program and the accompanying materials are made available under 4 * the terms of the Eclipse Public License 2.0 which is available at 5 * http://www.eclipse.org/legal/epl-2.0 6 * 7 * SPDX-License-Identifier: EPL-2.0 8 * 9 * Contributors: 10 * Evgeny Mandrikov - initial API and implementation 11 * 12 *******************************************************************************/ 13import java.io.*; 14import org.codehaus.plexus.util.*; 15 16String agentOptions = "excludes=**/FileUtil*:**/TestUtil*"; 17 18String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) ); 19if ( buildLog.indexOf( agentOptions ) < 0 ) { 20 throw new RuntimeException("Include/Exclude was not configured correct" ); 21} 22 23File databaseUtilReportFile = new File( basedir, "target/site/jacoco/org.project/DatabaseUtil.html" ); 24if ( !databaseUtilReportFile.isFile() ) 25{ 26 throw new FileNotFoundException( "DatabaseUtil should NOT be excluded: " + databaseUtilReportFile ); 27} 28 29File testUtilReportFile = new File( basedir, "target/site/jacoco/org.project/TestUtil.html" ); 30if ( testUtilReportFile.isFile() ) 31{ 32 throw new RuntimeException( "TestUtil SHOULD be excluded: " + testUtilReportFile ); 33} 34