1 /**
2 * Copyright 2008 Marvin Herman Froeder
3 * 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
4 * http://www.apache.org/licenses/LICENSE-2.0
5 * 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.
6 *
7 */
8 package org.sonatype.flexmojos.flexcover;
9
10 /*
11 * Copyright 2001-2005 The Apache Software Foundation.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 */
25
26
27 import java.io.File;
28
29 import org.apache.maven.plugin.MojoExecutionException;
30 import org.apache.maven.plugin.MojoFailureException;
31 import org.sonatype.flexmojos.compiler.TestLibraryCompilerMojo;
32
33 /**
34 * Goal which instruments a Flex project with FlexCover metadata
35 *
36 * @extendsPlugin flex-compiler-mojo
37 * @extendsGoal test-compile
38 * @goal instrument-swc
39 * @phase process-test-classes
40 * @requiresDependencyResolution
41 * @requiresProject
42 */
43 public class FlexCoverLibraryMojo
44 extends TestLibraryCompilerMojo
45 {
46 /**
47 * Location of the file.
48 *
49 * @parameter expression="${project.build.directory}/flexcover"
50 * @required
51 */
52 private File outputDirectory;
53
54 @Override
55 public void setUp()
56 throws MojoExecutionException, MojoFailureException
57 {
58 // build.setSourceDirectory("src/test/flex");
59 build.setTestOutputDirectory( "target/flexcover-classes/" );
60 build.setOutputDirectory( "target/flexcover/" );
61 // List<File> paths = Arrays.asList(sourcePaths);
62 // paths.add(new File("src/main/flex"));
63 // sourcePaths = (File[]) paths.toArray();
64 // sourceFile = "TestHarness.mxml";
65 super.setUp();
66 }
67
68 }