maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject cvs commit: jakarta-turbine-maven/src/java/org/apache/maven Maven.java
Date Mon, 02 Dec 2002 02:10:46 GMT
jvanzyl     2002/12/01 18:10:46

  Modified:    src/java/org/apache/maven Maven.java
  Log:
  o cleaning up the initialize() method to attempt to make the lifecycle somewhat obvious.
  
  Revision  Changes    Path
  1.4       +35 -13    jakarta-turbine-maven/src/java/org/apache/maven/Maven.java
  
  Index: Maven.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/Maven.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Maven.java	2 Dec 2002 02:03:01 -0000	1.3
  +++ Maven.java	2 Dec 2002 02:10:46 -0000	1.4
  @@ -93,6 +93,8 @@
    *
    * @todo Filter the Maven version number into a Java constant that will change
    *       during compilation.
  + * @todo Get rid of set/getAntProject(). It is only needed by the dvsl bean so
  + *       when we get rid of that we can use the context properly.
    */
   public class Maven
   {
  @@ -239,22 +241,13 @@
       public void initialize()
           throws Exception
       {
  -
           initializeAnt();
           initializeJelly();
           initializeDriver();
  -
  -        // Create the dependency classpath for this plugin so that the
  -        // values can be made available in the plugin.jelly script.
  -        CreateDependencyClasspath cdc = new CreateDependencyClasspath();
  -        cdc.setRefid( MavenConstants.DEPENDENCY_CLASSPATH );
  -        cdc.setContext( getContext() );
  -        cdc.execute();
  -
  -        ProjectVerifier projectVerifier = new ProjectVerifier();
  -        projectVerifier.setContext( getContext() );
  -        getContext().setProjectVerifier( projectVerifier );
  +        initializeDependencyClasspath();
  +        initializeProjectVerifier();
           initializePlugins();
  +
           loadProjectBuildFile();
       }
   
  @@ -330,6 +323,35 @@
                                 null,
                                 getContext(),
                                 getContext().getXMLOutput() );
  +    }
  +
  +    /**
  +     * Initialize dependency classpath.
  +     *
  +     * @throws Exception If an error occurs while initializing the dependency classpath.
  +     */
  +    private void initializeDependencyClasspath()
  +        throws Exception
  +    {
  +        // Create the dependency classpath for this plugin so that the
  +        // values can be made available in the plugin.jelly script.
  +        CreateDependencyClasspath cdc = new CreateDependencyClasspath();
  +        cdc.setRefid( MavenConstants.DEPENDENCY_CLASSPATH );
  +        cdc.setContext( getContext() );
  +        cdc.execute();
  +    }
  +
  +    /**
  +     * Initialize project verifier.
  +     *
  +     * @throws Exception If an error occurs while initializing the project verifier.
  +     */
  +    private void initializeProjectVerifier()
  +        throws Exception
  +    {
  +        ProjectVerifier projectVerifier = new ProjectVerifier();
  +        projectVerifier.setContext( getContext() );
  +        getContext().setProjectVerifier( projectVerifier );
       }
   
       /** Initialize all plugins.
  
  
  

Mime
View raw message