werken      2002/06/27 11:19:17

  Modified:    src/java/org/apache/maven/app Maven.java
               src/templates/build/plugins/core plugin.jelly
  Log:
  Migrating back to the old-style for jar updating.
  
  Revision  Changes    Path
  1.29      +9 -45     jakarta-turbine-maven/src/java/org/apache/maven/app/Maven.java
  
  Index: Maven.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/Maven.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Maven.java        27 Jun 2002 16:18:29 -0000      1.28
  +++ Maven.java        27 Jun 2002 18:19:17 -0000      1.29
  @@ -56,6 +56,7 @@
    * ====================================================================
    */
   
  +import org.apache.maven.UpdateResources;
   import org.apache.maven.build.DescriptorException;
   import org.apache.maven.build.ProjectDescriptor;
   import org.apache.maven.build.RepositoryManager;
  @@ -980,6 +981,8 @@
   
           Session session = new JellySession(output);
   
  +        // 
Thread.currentThread().setContextClassLoader(getAntProject().getClass().getClassLoader());
  +        // Thread.currentThread().setContextClassLoader( 
getClass().getClassLoader() );
           Thread.currentThread().setContextClassLoader(null);
   
           while (goalNameIter.hasNext())
  @@ -1166,54 +1169,15 @@
           }
       }
   
  -    // ------------------------------------------------------------
  -    //     stuff from dIon
  -    // ------------------------------------------------------------
  -
  -    /** 
  -     * <p>Verify the project as done in init: 
  -     * <ol>
  -     *   <li>Update the pom if needed.</li>
  -     *   <li>verify the dependent jars for the project are available in
  -     *      the local repository, downloading as necessary</li>
  -     * </ol>
  -     * </p>
  -     *
  -     * @throws IntrospectionException if there are issues reading a 
  -     *      {@link Project} object 
  -     * @throws FileNotFoundException when a file used is not available during 
  -     *      formatting or transformation
  -     * @throws IOException when errors occur reading or writing
  -     * @throws SAXException when problems occur parsing XML
  -     * @throws Exception when someother component fails
  -     */
  -    public void verifyProject()
  -        throws IntrospectionException, FileNotFoundException, IOException, 
SAXException, Exception
  +    public void verifyProject() throws Exception
       {
  -        if (!getProjectDescriptor().getProject().isPomCurrent())
  -        {
  -            getProjectDescriptor().upgrade( getMavenHome().getPath() );
  -        }
  -        
  -        Map failures = getRepositoryManager().updateJars(
  -            getProjectDescriptor().getProject().getDependentJars());
  +        UpdateResources updater = new UpdateResources();
   
  -        if (!failures.isEmpty())
  -        {
  -            Iterator keys = failures.keySet().iterator();
  -            String key = null;
  -
  -            while (keys.hasNext())
  -            {
  -                key = (String) keys.next();
  -                // log.error(failures.get(key));
  -                System.err.println( failures.get(key) );
  -            }
  -
  -            // throw new IOException("Errors obtaining jars");
  -        }
  +        updater.setBaseUrl( getProperty( "maven.repo.remote" ) );
  +        updater.setDest( new File( getProperty( "maven.repo.local" ) ) );
  +        updater.setMavenProject( getProjectDescriptor().getProject() );
  +        updater.doExecute();
       }
  -    
   
       public RepositoryManager getRepositoryManager()
       {
  
  
  
  1.9       +0 -2      
jakarta-turbine-maven/src/templates/build/plugins/core/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/templates/build/plugins/core/plugin.jelly,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- plugin.jelly      27 Jun 2002 17:16:19 -0000      1.8
  +++ plugin.jelly      27 Jun 2002 18:19:17 -0000      1.9
  @@ -26,8 +26,6 @@
     <!-- ================================================================== -->
   
     <goal name="maven:prepare-filesystem">
  -    <echo message="maven.build.dir= ${maven.build.dir}"/>
  -    <echo message="maven.build.dest= ${maven.build.dest}"/>
       <mkdir dir="${maven.build.dest}"/>
     </goal>
   
  
  
  

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

Reply via email to