KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > plugin > MavenPluginDiscoverer


1 package org.apache.maven.plugin;
2
3 /*
4  * Copyright 2001-2005 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * 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, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
20 import org.codehaus.plexus.component.discovery.AbstractComponentDiscoverer;
21 import org.codehaus.plexus.component.repository.ComponentSetDescriptor;
22 import org.codehaus.plexus.configuration.PlexusConfigurationException;
23
24 import java.io.Reader JavaDoc;
25
26 /**
27  * @author <a HREF="mailto:jason@maven.org">Jason van Zyl</a>
28  * @author <a HREF="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
29  * @version $Id: MavenPluginDiscoverer.java 169548 2005-05-11 01:04:50Z brett $
30  */

31 public class MavenPluginDiscoverer
32     extends AbstractComponentDiscoverer
33 {
34     private PluginDescriptorBuilder builder;
35
36     public MavenPluginDiscoverer()
37     {
38         builder = new PluginDescriptorBuilder();
39     }
40
41     public String JavaDoc getComponentDescriptorLocation()
42     {
43         return "META-INF/maven/plugin.xml";
44     }
45
46     public ComponentSetDescriptor createComponentDescriptors( Reader JavaDoc componentDescriptorConfiguration, String JavaDoc source )
47         throws PlexusConfigurationException
48     {
49         return builder.build( componentDescriptorConfiguration, source );
50     }
51 }
52
Popular Tags