jvanzyl     2003/12/07 20:41:51

  Modified:    .        MAVEN-2.x.txt
               maven-model/src/java/org/apache/maven/model Build.java
               maven-model/src/test/org/apache/maven/model BuildTest.java
               maven-model-tools/src/java/org/apache/maven/model
                        DefaultModelUnmarshaller.java
               maven-project maven.xml
               maven-project/src/java/org/apache/maven/project
                        DefaultProjectBuilder.java ProjectBuilder.java
               maven-project/src/test/org/apache/maven/project
                        DefaultProjectBuilderTest.java
  Removed:     .        build-all cvsroot maven.xml project.properties
                        project.xml
               maven-project/src/java/org/apache/maven/project Project.java
  Log:
  o cleaning up top-level directory
  o formatting
  
  Revision  Changes    Path
  1.4       +1 -1      maven-components/MAVEN-2.x.txt
  
  Index: MAVEN-2.x.txt
  ===================================================================
  RCS file: /home/cvs/maven-components/MAVEN-2.x.txt,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MAVEN-2.x.txt     12 Oct 2003 18:14:59 -0000      1.3
  +++ MAVEN-2.x.txt     8 Dec 2003 04:41:51 -0000       1.4
  @@ -3,7 +3,7 @@
   
   maven-model:
   
  -This is strictly the model for Maven, so really just plain beans. Eventually
  +This is strictly the model for Maven, so really just plain objects. Eventually
   I would like to be able to generate these from a UML model but that can
   come later. In addition to generating the sources from a UML model I would
   like to generate the XSD or any other artifacts that may be required. This way
  
  
  
  1.7       +13 -6     
maven-components/maven-model/src/java/org/apache/maven/model/Build.java
  
  Index: Build.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-model/src/java/org/apache/maven/model/Build.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Build.java        4 Dec 2003 01:09:53 -0000       1.6
  +++ Build.java        8 Dec 2003 04:41:51 -0000       1.7
  @@ -107,9 +107,6 @@
        */
       public Build()
       {
  -        sourceModifications = new ArrayList();
  -
  -        resources = new ArrayList();
       }
   
       /**
  @@ -139,7 +136,7 @@
        */
       public void addSourceModification( SourceModification sourceModification )
       {
  -        sourceModifications.add( sourceModification );
  +        getSourceModifications().add( sourceModification );
       }
   
       /**
  @@ -159,6 +156,11 @@
        */
       public List getSourceModifications()
       {
  +        if ( sourceModifications == null )
  +        {
  +            sourceModifications = new ArrayList();
  +        }
  +
           return sourceModifications;
       }
   
  @@ -249,7 +251,7 @@
        */
       public void addResource( Resource resource )
       {
  -        resources.add( resource );
  +        getResources().add( resource );
       }
   
       /**
  @@ -269,6 +271,11 @@
        */
       public List getResources()
       {
  +        if ( resources == null )
  +        {
  +            resources = new ArrayList();
  +        }
  +
           return resources;
       }
   }
  
  
  
  1.2       +5 -1      
maven-components/maven-model/src/test/org/apache/maven/model/BuildTest.java
  
  Index: BuildTest.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-model/src/test/org/apache/maven/model/BuildTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BuildTest.java    4 Dec 2003 08:13:41 -0000       1.1
  +++ BuildTest.java    8 Dec 2003 04:41:51 -0000       1.2
  @@ -24,6 +24,10 @@
       {
           Build build = new Build();
   
  +        assertNotNull( build.getSourceModifications() );
  +
  +        assertNotNull( build.getResources() );
  +
           build.setSourceDirectory( "sourceDirectory" );
   
           assertEquals( "sourceDirectory", build.getSourceDirectory() );
  
  
  
  1.8       +3 -1      
maven-components/maven-model-tools/src/java/org/apache/maven/model/DefaultModelUnmarshaller.java
  
  Index: DefaultModelUnmarshaller.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-model-tools/src/java/org/apache/maven/model/DefaultModelUnmarshaller.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultModelUnmarshaller.java     7 Dec 2003 15:42:35 -0000       1.7
  +++ DefaultModelUnmarshaller.java     8 Dec 2003 04:41:51 -0000       1.8
  @@ -34,7 +34,9 @@
           Model project = new Model();
   
           XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
  +
           XmlPullParser parser = factory.newPullParser();
  +
           parser.setInput( reader );
   
           int eventType = parser.getEventType();
  
  
  
  1.2       +1 -379    maven-components/maven-project/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-project/maven.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- maven.xml 1 Sep 2003 16:06:20 -0000       1.1
  +++ maven.xml 8 Dec 2003 04:41:51 -0000       1.2
  @@ -1,379 +1 @@
  -<project default="jar"
  -  xmlns:j="jelly:core"
  -  xmlns:u="jelly:util"
  -  xmlns:maven="jelly:maven"
  -  xmlns:m="maven"
  -  xmlns:deploy="deploy">
  -
  -  <goal name="maven:init">
  -    <j:choose>
  -      <j:when test="${systemScope['os.name'].startsWith('Windows')}">
  -        <j:set var="maven.bin.script" value="${maven.home}/bin/maven.bat"/>
  -      </j:when>
  -      <j:otherwise>
  -        <j:set var="maven.bin.script" value="${maven.home}/bin/maven"/>
  -      </j:otherwise>
  -    </j:choose>
  -  </goal>
  -
  -  <!-- ================================================================== -->
  -  <!-- T O U C H S T O N E  B U I L D                                     -->
  -  <!-- ================================================================== -->
  -  <!-- This runs as part of the standard runtime testing in Maven. It is  -->
  -  <!-- a build that tries to exercise as many of Maven's features as      -->
  -  <!-- possible.                                                          -->
  -  <!-- ================================================================== -->
  -  
  -  <!--
  -  <postGoal name="test:test">
  -    <j:if test="${context.getVariable('maven.mode.online')}">
  -      <echo>
  -      
  -      We are online so the touchstone will be run ...
  -      
  -      </echo>
  -      <maven:maven
  -        descriptor="${basedir}/src/test/touchstone-build/project.xml"
  -        goals="clean,java:jar,touchstone-tests"
  -        ignoreFailures="false"
  -      />
  -    </j:if>
  -  </postGoal>
  -  -->
  -
  -  <!-- ================================================================== -->
  -  <!-- B U I L D  P L U G I N S                                           -->
  -  <!-- ================================================================== -->
  -  <!-- Used by the bootstrap process to build all of Maven's plugins.     -->
  -  <!-- ================================================================== -->
  -
  -  <goal 
  -    name="maven:plugins-build"
  -    description="Build each Maven plugin into an installable jar">
  -
  -    <maven:reactor
  -      basedir="${maven.src.dir}/plugins-build"
  -      reactorXml="${maven.src.dir}/plugins-build/reactor.xml"
  -      includes="*/project.xml"
  -      excludes="examples/*"
  -      goals="clean,plugin"
  -      banner="Building"
  -      ignoreFailures="false"
  -    />
  -  </goal>
  -
  -  <goal name="maven:plugins-clean"
  -    description="Build each Maven plugin into an installable jar">
  -
  -      <maven:reactor
  -        basedir="${maven.src.dir}/plugins-build"
  -        includes="*/project.xml"
  -        goals="clean"
  -        banner="Building"
  -        ignoreFailures="false"
  -      />
  -  </goal>
  -
  -  <goal name="maven:plugin-convert-snapshots"
  -    description="Convert snapshot versions into resolved timestamped versions.">
  -
  -      <maven:reactor
  -        basedir="${maven.src.dir}/plugins-build"
  -        includes="*/project.xml"
  -        goals="convert-snapshots-auto"
  -        banner="Resolving snapshot versions"
  -        ignoreFailures="true"
  -      />
  -  </goal>
  -
  -  <goal name="maven:plugin-validate-pom-for-release"
  -    description="Validate the Plugin POMs for release.">
  -
  -      <maven:reactor
  -        basedir="${maven.src.dir}/plugins-build"
  -        includes="*/project.xml"
  -        goals="validate-pom-for-release"
  -        banner="Resolving snapshot versions"
  -        ignoreFailures="false"
  -      />
  -  </goal>
  -
  -  <goal name="maven:plugin-increment-snapshot-version"
  -    description="Graduate Plugin currentVersion element.">
  -
  -      <maven:reactor
  -        basedir="${maven.src.dir}/plugins-build"
  -        includes="*/project.xml"
  -        goals="increment-snapshot-version"
  -        banner="Graduating snapshot version"
  -        ignoreFailures="true"
  -      />
  -  </goal>
  -
  -  <!-- ================================================================== -->
  -  <!-- G E N E R A T E  P L U G I N  D O C U M E N T A T I O N            -->
  -  <!-- ================================================================== -->
  -
  -  <goal name="maven:plugin-docs"
  -    description="Build each Maven plugin's documentation">
  -
  -      <maven:reactor
  -        basedir="${maven.src.dir}/plugins-build"
  -        includes="*/project.xml"
  -        goals="xdoc"
  -        banner="Generating Docs For"
  -        ignoreFailures="false"
  -      />
  -
  -  </goal>
  -  
  -  <goal name="maven:jar-install"
  -        description="Compile Maven and put a new jar in ${maven.home}/lib.">
  -    <attainGoal name="jar:jar"/>
  -    <copy file="${maven.build.dir}/${maven.final.name}.jar"
  -          tofile="${maven.home}/lib/${maven.final.name}.jar"
  -          overwrite="yes"/>
  -    <copy file="${maven.build.dir}/${maven.final.name}.jar"
  -          tofile="${maven.repo.local}/maven/jars/${maven.final.name}.jar"
  -          overwrite="yes"/>
  -  </goal>
  -
  -  <!-- ================================================================== -->
  -  <!-- I N S T A L L   D E F A U L T   G O A L                            -->
  -  <!-- ================================================================== -->
  -  <!-- This is meant to avoid having to bootstrap for such trivial things -->
  -  <!-- as modifying plugins or maven's code.                              -->
  -  <!-- ================================================================== -->
  -
  -  <goal name="maven:install"
  -        description="Build and copy new plugins and a new maven jar to 
${maven.home}">
  -
  -    <attainGoal name="maven:plugins-build"/>
  -    <attainGoal name="maven:plugins-install"/>
  -    <!--
  -      When we'll have online / offline mechanisms, we will check to see if
  -      we have to do anything related to the web.
  -    <attainGoal name="install:from-web"/>
  -    -->
  -  </goal>
  -
  -  <!-- ================================================================== -->
  -  <!-- M A V E N  I N S T A L L E R                                       -->
  -  <!-- ================================================================== -->
  -
  -  <property name="tag" value="${pom.artifactId}-${pom.currentVersion}"/>
  -
  -  <goal name="maven:installer" description="Create a Maven installer jar">
  -
  -    <property name="installersDir" value="installers"/>
  -    <property name="installersBase" value="${installersDir}/${tag}"/>
  -
  -    <delete dir="${installersDir}"/>
  -    <mkdir dir="${installersBase}"/>
  -
  -    <copy todir="${installersBase}">
  -      <fileset dir="${maven.home}">
  -        <include name="plugins/*.jar"/>
  -        <include name="bin/*"/>
  -        <include name="lib/**"/>
  -        <include name="maven-project.xsd"/>
  -      </fileset>
  -    </copy>
  -
  -    <mkdir dir="${installersBase}/repository"/>
  -
  -    <tar longfile="gnu" tarfile="${tag}.tar">
  -      <tarfileset dir="${installersDir}">
  -        <exclude name="**/maven"/>
  -      </tarfileset>
  -      <tarfileset dir="${installersDir}" mode="755">
  -        <include name="**/maven"/>
  -      </tarfileset>
  -    </tar>
  -
  -    <gzip
  -      zipfile="${tag}.tar.gz"
  -      src="${tag}.tar"
  -    />
  -    <copy
  -      file="${maven.build.dir}/${maven.final.name}.jar"
  -      todir="${maven.home}/plugins"
  -    />
  -
  -    <delete file="${tag}.tar"/>
  -
  -    <!-- Create a zip file -->
  -    <zip zipfile="${tag}.zip">
  -      <zipfileset dir="${installersDir}"/>
  -    </zip>
  -
  -  </goal>
  -
  -  <goal name="maven:installer-deploy"
  -    description="Deploy an installable Maven jar to the remote repo??">
  -
  -    <m:user-check user="${maven.username}"/>
  -    <attainGoal name="maven:installer"/>
  -
  -    <tar longfile="gnu" tarfile="installers.tar">
  -      <tarfileset dir="${basedir}">
  -        <include name="${tag}.tar.gz"/>
  -        <include name="${tag}.zip"/>
  -      </tarfileset>
  -    </tar>
  -
  -    <deploy:artifact
  -      artifact="installers.tar"
  -      type="distributions"
  -      assureDirectoryCommand="mkdir -p"
  -      siteCommand="cd @deployDirectory@;tar xUvf installers.tar;chmod -R g+u *;rm 
installers.tar"
  -    />
  -
  -  </goal>
  -
  -  <!-- 
  -    These two goals are the start of the merge of plugin docs and
  -    the main maven documentation. pre-xdoc-transform will be changed
  -    from a 'goal' to a 'preGoal' on 'xdoc:transform'.
  -    'postSite' will be changed to a 'postGoal' on 'site'.
  -    
  -    Plugin docs will generated and then copied into
  -    target/docs/reference/plugins/${plugin}/
  -    
  -    A simple home page listing the plugins and linking to their
  -    docs will be generated in pre xdoc:transform, and processed into
  -    target/docs/reference/plugins/index.html
  -  -->
  -       
  -  <preGoal name="xdoc:transform">
  -     <!-- use a template to create the plugins home page
  -              if it's an xdoc, it must be done before xdoc:transform
  -              and should generate to ${maven.gen.docs}/reference/plugins/index.xml
  -       -->
  -    <mkdir dir="${maven.gen.docs}/reference/plugins/"/>
  -    <j:file name="${maven.gen.docs}/reference/plugins/index.xml"
  -      prettyPrint="true">
  -      <document>
  -        <properties>
  -          <title>Maven Plugins</title>
  -          <author email="[EMAIL PROTECTED]">dIon Gillard</author>
  -        </properties>
  -        <body>
  -          <section name="Plugin Listing">
  -            <p>
  -              The following plugins are provided along with Maven
  -            </p>
  -            <ul>
  -              <fileScanner var="pluginProjects">
  -                <fileset dir="${basedir}">
  -                  <include name="src/plugins-build/*/project.xml" />
  -                </fileset>
  -             </fileScanner>
  -             <j:forEach items="${pluginProjects.iterator()}" var="plugin">
  -               <j:set var="pluginName" value="${plugin.parentFile.name}" />
  -               <li>
  -                 <a href="./${pluginName}/index.html">${pluginName}</a>
  -               </li>
  -             </j:forEach>
  -            </ul>
  -          </section>
  -        </body>
  -      </document>
  -    </j:file>
  -
  -  </preGoal>
  -
  -  <preGoal name="xdoc">
  -     <j:if test="${pluginSite != null}">
  -     
  -      <maven:reactor
  -        basedir="${basedir}"
  -        includes="src/plugins-build/*/project.xml"
  -        goals="site"
  -        banner="Generating site for"
  -        ignoreFailures="false"
  -      />
  -      
  -      <!-- create the parent directory for the docs -->
  -      <mkdir dir="${maven.docs.dest}/reference/plugins" />
  -    
  -      <!-- copy them all to ${maven.docs.dest}/reference/plugins/${plugin.id}/ -->
  -      <fileScanner var="pluginProjects">
  -        <fileset dir="${basedir}">
  -          <include name="src/plugins-build/*/project.xml" />
  -        </fileset>
  -      </fileScanner>
  -      <j:forEach items="${pluginProjects.iterator()}" var="plugin">
  -        <j:set var="pluginName" value="${plugin.parentFile.name}" />
  -        <mkdir dir="${maven.docs.dest}/reference/plugins/${pluginName}/" />
  -        <copy toDir="${maven.docs.dest}/reference/plugins/${pluginName}/">
  -          <fileset dir="src/plugins-build/${pluginName}/target/docs/">
  -            <include name="**" />
  -          </fileset>
  -        </copy>
  -      </j:forEach>
  -    </j:if>
  -  </preGoal>
  -
  -  <!-- ================================================================== -->
  -  <!-- M A V E N  D I S T R I B U T I O N  T E S T  A I D S               -->
  -  <!-- ================================================================== -->
  -  <!-- NOTE:                                                              -->
  -  <!-- Make sure you get rid of as many (all ideally) SNAPSHOT jars       -->
  -  <!-- as possible.                                                       -->
  -  <!-- ================================================================== -->
  -  <!-- 1. (Re)move current Maven installation                             -->
  -  <!-- 2. Bootstrap                                                       -->
  -  <!-- 3. maven maven:installer                                           -->
  -  <!-- 4. Install maven (with the freshly created installer)              -->
  -  <!-- 5. maven                                                           -->
  -  <!-- 6. maven site                                                      -->
  -  <!-- ================================================================== --> 
  -
  -  <postGoal name="java:jar-resources">
  -    <j:if test="${maven.test.distribution}">
  -      <echo>Using test log4j.properties file ...</echo>
  -      <copy 
  -        file="src/test/log4j.properties" 
  -        todir="${maven.build.dest}"
  -        overwrite="true"
  -      />
  -    </j:if>
  -  </postGoal>
  -  
  -  <!-- Use build:start hook to nuke the debug log files -->
  -  
  -  <!--
  -  <postGoal name="build:start">
  -    <j:if test="${maven.test.distribution}">
  -      <delete>
  -        <fileset dir="${basedir}">
  -          <include name="log*"/>
  -        </fileset>
  -      </delete>
  -    </j:if>
  -  </postGoal>
  -  -->
  -  
  -  <!--
  -  <preGoal name="site:generate">
  -    <attainGoal name="clover"/>
  -  </preGoal>
  -  -->
  -  
  -  <!--preGoal name="java:jar-resources">
  -    <!- - We just want a generic config for the CLI (that doesn't have to be 
maintained - ->
  -     <copy file="src/test/org/apache/maven/DefaultMavenTest.xml"
  -               toFile="server/target/classes/org/apache/maven/server/XMLThing.xml"/>
  -  </preGoal-->
  -  
  -  <goal name="build-micro-ant-jar">
  -  
  -  </goal>
  -  
  -     <goal name="script">
  -             <j:forEach var="arti" items="${pom.getArtifacts()}">
  -                     <echo>${arti.File}</echo>
  -             </j:forEach>  
  -     </goal>
  -</project>
  +<project default="jar:jar"/>
  
  
  
  1.7       +8 -8      
maven-components/maven-project/src/java/org/apache/maven/project/DefaultProjectBuilder.java
  
  Index: DefaultProjectBuilder.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-project/src/java/org/apache/maven/project/DefaultProjectBuilder.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DefaultProjectBuilder.java        7 Dec 2003 23:11:24 -0000       1.6
  +++ DefaultProjectBuilder.java        8 Dec 2003 04:41:51 -0000       1.7
  @@ -51,31 +51,31 @@
       public void service( ServiceManager serviceManager )
           throws ServiceException
       {
  -        marshaller = (ModelMarshaller) serviceManager.lookup( ModelMarshaller.ROLE 
);
  -
           unmarshaller = (ModelUnmarshaller) serviceManager.lookup( 
ModelUnmarshaller.ROLE );
  +
  +        marshaller = (ModelMarshaller) serviceManager.lookup( ModelMarshaller.ROLE 
);
       }
   
       // ----------------------------------------------------------------------
       // Protected methods to be used by the Maven facade.
       // ----------------------------------------------------------------------
   
  -    public Project build( File project )
  +    public MavenProject build( File project )
           throws Exception
       {
           return getProject( project, true );
       }
   
  -    public Project getProject( File project )
  +    public MavenProject getProject( File project )
           throws Exception
       {
           return getProject( project, true );
       }
   
  -    public Project getProject( File projectDescriptor, boolean useParentPom )
  +    public MavenProject getProject( File projectDescriptor, boolean useParentPom )
           throws Exception
       {
  -        Project project = new Project();
  +        MavenProject project = new MavenProject();
   
           Map properties = createProjectProperties( projectDescriptor.getParentFile() 
);
   
  @@ -124,7 +124,7 @@
   
               File parentModel = new File( modelToExtend );
   
  -            Project parent = (Project) parentPoms.get( 
parentModel.getCanonicalPath() );
  +            MavenProject parent = (MavenProject) parentPoms.get( 
parentModel.getCanonicalPath() );
   
               if ( parent == null )
               {
  @@ -399,7 +399,7 @@
   
           for ( int i = 0; i < files.length; i++ )
           {
  -            Project p = getProject( new File( files[i] ) );
  +            MavenProject p = getProject( new File( files[i] ) );
               projects.add( p );
           }
   
  
  
  
  1.4       +3 -2      
maven-components/maven-project/src/java/org/apache/maven/project/ProjectBuilder.java
  
  Index: ProjectBuilder.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-project/src/java/org/apache/maven/project/ProjectBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProjectBuilder.java       12 Oct 2003 01:15:17 -0000      1.3
  +++ ProjectBuilder.java       8 Dec 2003 04:41:51 -0000       1.4
  @@ -8,11 +8,12 @@
       static String ROLE = ProjectBuilder.class.getName();
   
       static String DRIVER_PROPERTIES = "driver.properties";
  +
       static String DEFAULTS_PROPERTIES = "driver.properties";
   
  -    Project getProject( File project )
  +    MavenProject getProject( File project )
           throws Exception;
   
  -    Project build( File project )
  +    MavenProject build( File project )
           throws Exception;
   }
  
  
  
  1.6       +1 -1      
maven-components/maven-project/src/test/org/apache/maven/project/DefaultProjectBuilderTest.java
  
  Index: DefaultProjectBuilderTest.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-project/src/test/org/apache/maven/project/DefaultProjectBuilderTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultProjectBuilderTest.java    7 Dec 2003 23:35:31 -0000       1.5
  +++ DefaultProjectBuilderTest.java    8 Dec 2003 04:41:51 -0000       1.6
  @@ -23,7 +23,7 @@
       private ProjectBuilder projectBuilder;
   
       /** Project. */
  -    private Project project;
  +    private MavenProject project;
   
       /**
        *
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to