001    /**
002     * Copyright (C) 2009 Progress Software, Inc.
003     * http://fusesource.com
004     *
005     * Licensed under the Apache License, Version 2.0 (the "License");
006     * you may not use this file except in compliance with the License.
007     * You may obtain a copy of the License at
008     *
009     *    http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.kuali.maven.plugins.graph;
018    
019    import java.io.File;
020    
021    import org.kuali.maven.plugins.graph.dot.edge.EdgeHandler;
022    import org.kuali.maven.plugins.graph.dot.edge.FlatEdgeHandler;
023    
024    /**
025     * @goal flat
026     * @requiresDependencyResolution compile|test|runtime
027     */
028    public class FlatMojo extends BaseMojo {
029    
030        /**
031         * The file the graph will be written to
032         *
033         * @parameter expression="${graph.file}" default-value="${project.build.directory}/graph/flat.png"
034         */
035        private File file;
036    
037        @Override
038        protected EdgeHandler getEdgeHandler() {
039            return new FlatEdgeHandler();
040        }
041    
042        @Override
043        public File getFile() {
044            return file;
045        }
046    
047        public void setFile(File file) {
048            this.file = file;
049        }
050    
051    }