1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20 package org.apache.maven.plugin.eclipse.it; 21 22 import java.io.File; 23 import java.util.ArrayList; 24 import java.util.List; 25 import java.util.Properties; 26 27 /** 28 * @author <a href="mailto:baerrach@apache.org">Barrie Treloar</a> 29 * @version $Id: RemoveCacheMojoIT.java 728546 2008-12-21 22:56:51Z bentmann $ 30 */ 31 public class RemoveCacheMojoIT 32 extends AbstractEclipsePluginIT 33 { 34 /** 35 * Project-46 uses which does not have sources/javadocs for biz.aQute:bndlib:0.0.145. Once the repo is seeded with 36 * marker files run remove-cache and verify the marker files no longer exist. 37 * 38 * @throws Exception test failures 39 */ 40 public void testRemoveCache() 41 throws Exception 42 { 43 testProject( "project-46" ); 44 assertNotAvailableMarkerFileExists( "biz.aQute", "bndlib", "0.0.145", null, "sources" ); 45 assertNotAvailableMarkerFileExists( "biz.aQute", "bndlib", "0.0.145", null, "javadoc" ); 46 47 File basedir = getTestFile( "target/test-classes/projects/project-46" ); 48 File pom = new File( basedir, "pom.xml" ); 49 String pluginSpec = getPluginCLISpecification(); 50 List goals = new ArrayList(); 51 goals.add( pluginSpec + ":remove-cache" ); 52 executeMaven( pom, new Properties(), goals ); 53 54 assertNotAvailableMarkerFileDoesNotExist( "biz.aQute", "bndlib", "0.0.145", null, "sources" ); 55 assertNotAvailableMarkerFileDoesNotExist( "biz.aQute", "bndlib", "0.0.145", null, "javadoc" ); 56 } 57 }