View Javadoc

1   /*
2    * Copyright 2006-2012 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package de.smartics.maven.util.project;
17  
18  import org.apache.maven.artifact.repository.ArtifactRepository;
19  import org.apache.maven.plugin.logging.Log;
20  import org.apache.maven.profiles.ProfileManager;
21  import org.apache.maven.project.MavenProjectBuilder;
22  import org.codehaus.plexus.PlexusContainer;
23  
24  /**
25   * Simple wrapper arround a plexus container.
26   * 
27   * @author <a href="mailto:robert.reiner@smartics.de">Robert Reiner</a>
28   * @version $Revision: 12040 $
29   */
30  public interface MavenContext
31  {
32    // ********************************* Fields *********************************
33  
34    // --- constants ------------------------------------------------------------
35  
36    // ****************************** Initializer *******************************
37  
38    // ****************************** Inner Classes *****************************
39  
40    // ********************************* Methods ********************************
41  
42    // --- get&set --------------------------------------------------------------
43  
44    /**
45     * Returns the plugin logger. Must return not <code>null</code>.
46     * 
47     * @return the plugin logger.
48     */
49    Log getLog();
50  
51    /**
52     * Returns a reference to the plexus container. May return <code>null</code>.
53     * 
54     * @return the plexus container.
55     */
56    PlexusContainer getContainer();
57  
58    /**
59     * Returns a reference to the configured project builder. Must return not
60     * <code>null</code>.
61     * 
62     * @return the configured project builder.
63     */
64    MavenProjectBuilder getProjectBuilder();
65  
66    /**
67     * Returns a reference to the local artifact repository. Must return not
68     * <code>null</code>.
69     * 
70     * @return the artifact repository.
71     */
72    ArtifactRepository getLocalArtifactRepository();
73  
74    /**
75     * Returns a reference to the profile manager. Must return not
76     * <code>null</code>.
77     * 
78     * @return the profile manager.
79     */
80    ProfileManager getProfileManager();
81  
82    // --- business -------------------------------------------------------------
83  
84    // --- object basics --------------------------------------------------------
85  }