brett       2004/06/28 02:39:11

  Modified:    .        Tag: MAVEN-1_0-BRANCH build-bootstrap.xml
               src/conf Tag: MAVEN-1_0-BRANCH defaults.properties
               src/java/org/apache/maven Tag: MAVEN-1_0-BRANCH
                        MavenConstants.java MavenSession.java
               src/java/org/apache/maven/jelly Tag: MAVEN-1_0-BRANCH
                        MavenJellyContext.java
               src/java/org/apache/maven/plugin Tag: MAVEN-1_0-BRANCH
                        PluginManager.java
               xdocs    Tag: MAVEN-1_0-BRANCH changes.xml
               xdocs/reference Tag: MAVEN-1_0-BRANCH user-guide.xml
               xdocs/start Tag: MAVEN-1_0-BRANCH install.xml
  Log:
  split plugin cache (now in ~/.maven/cache) from local plugin installations 
(~/.maven/plugins)
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.212.2.11 +2 -2      maven/build-bootstrap.xml
  
  Index: build-bootstrap.xml
  ===================================================================
  RCS file: /home/cvs/maven/build-bootstrap.xml,v
  retrieving revision 1.212.2.10
  retrieving revision 1.212.2.11
  diff -u -r1.212.2.10 -r1.212.2.11
  --- build-bootstrap.xml       27 Jun 2004 23:24:46 -0000      1.212.2.10
  +++ build-bootstrap.xml       28 Jun 2004 09:39:09 -0000      1.212.2.11
  @@ -44,7 +44,7 @@
   |  before bootstrapping.
   |
   |  Maven bootstrap also expands plugins to
  -|  $${user.home}/.maven/plugins
  +|  $${user.home}/.maven/cache
   |  if you do not have the MAVEN_HOME_LOCAL environment
   |  variable or
   |  maven.home.local property set before bootstrapping.
  @@ -438,7 +438,7 @@
       <mkdir dir="${maven.home}/plugins"/>
   
       <!-- cleanup the local plugins dir -->
  -    <delete dir="${maven.home.local}/plugins"/>
  +    <delete dir="${maven.home.local}/cache"/>
   
     </target>
   </project>
  
  
  
  No                   revision
  No                   revision
  1.8.4.5   +2 -1      maven/src/conf/defaults.properties
  
  Index: defaults.properties
  ===================================================================
  RCS file: /home/cvs/maven/src/conf/defaults.properties,v
  retrieving revision 1.8.4.4
  retrieving revision 1.8.4.5
  diff -u -r1.8.4.4 -r1.8.4.5
  --- defaults.properties       13 May 2004 10:15:54 -0000      1.8.4.4
  +++ defaults.properties       28 Jun 2004 09:39:09 -0000      1.8.4.5
  @@ -51,7 +51,8 @@
   # M A V E N  P L U G - I N  D I R E C T O R Y
   # -------------------------------------------------------------------
   maven.plugin.dir = ${maven.home}/plugins
  -maven.plugin.unpacked.dir = ${maven.home.local}/plugins
  +maven.plugin.user.dir = ${maven.home.local}/plugins
  +maven.plugin.unpacked.dir = ${maven.home.local}/cache
   
   # -------------------------------------------------------------------
   # M A V E N  R E M O T E  R E P O S
  
  
  
  No                   revision
  No                   revision
  1.30.4.8  +4 -1      maven/src/java/org/apache/maven/MavenConstants.java
  
  Index: MavenConstants.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/MavenConstants.java,v
  retrieving revision 1.30.4.7
  retrieving revision 1.30.4.8
  diff -u -r1.30.4.7 -r1.30.4.8
  --- MavenConstants.java       27 Jun 2004 07:57:48 -0000      1.30.4.7
  +++ MavenConstants.java       28 Jun 2004 09:39:09 -0000      1.30.4.8
  @@ -105,6 +105,9 @@
       /** MavenSession unpacked plugins context tag **/
       public static final String MAVEN_UNPACKED_PLUGINS_DIR = 
"maven.plugin.unpacked.dir";
   
  +    /** MavenSession local plugins context tag **/
  +    public static final String MAVEN_USER_PLUGINS_DIR = "maven.plugin.user.dir";
  +
       /** MavenSession build file url context tag **/
       public static final String MAVEN_BUILD_FILE_URL = "maven.project.buildFile.url";
   
  
  
  
  1.18.4.13 +2 -2      maven/src/java/org/apache/maven/MavenSession.java
  
  Index: MavenSession.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/MavenSession.java,v
  retrieving revision 1.18.4.12
  retrieving revision 1.18.4.13
  diff -u -r1.18.4.12 -r1.18.4.13
  --- MavenSession.java 20 May 2004 15:34:53 -0000      1.18.4.12
  +++ MavenSession.java 28 Jun 2004 09:39:09 -0000      1.18.4.13
  @@ -62,7 +62,7 @@
       public static final String DRIVER_SCRIPT_NAME = "driver.jelly";
   
       /** The current MavenSession version id */
  -    public static final String APP_VERSION = "1.0-final-SNAPSHOT";
  +    public static final String APP_VERSION = "1.0-rc4";
   
       // ------------------------------------------------------------
       // C L A S S  M E M B E R S
  
  
  
  No                   revision
  No                   revision
  1.35.4.9  +12 -1     maven/src/java/org/apache/maven/jelly/MavenJellyContext.java
  
  Index: MavenJellyContext.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/MavenJellyContext.java,v
  retrieving revision 1.35.4.8
  retrieving revision 1.35.4.9
  diff -u -r1.35.4.8 -r1.35.4.9
  --- MavenJellyContext.java    26 Jun 2004 14:52:05 -0000      1.35.4.8
  +++ MavenJellyContext.java    28 Jun 2004 09:39:09 -0000      1.35.4.9
  @@ -657,6 +657,16 @@
       }
   
       /**
  +     * Get user plugins location.
  +     *
  +     * @return user plugins location.
  +     */
  +    public String getUserPluginsDir()
  +    {
  +        return (String) getVariable( MavenConstants.MAVEN_USER_PLUGINS_DIR );
  +    }
  +
  +    /**
        * Get unpacked plugins location.
        *
        * @return unpacked plugins location.
  @@ -677,6 +687,7 @@
       public void resolveRelativePaths( File basedir )
       {
           resolveRelativePath( basedir, MavenConstants.REPO_LOCAL );
  +        resolveRelativePath( basedir, MavenConstants.MAVEN_USER_PLUGINS_DIR );
           resolveRelativePath( basedir, MavenConstants.MAVEN_UNPACKED_PLUGINS_DIR );
           resolveRelativePath( basedir, MavenConstants.MAVEN_PLUGINS_DIR );
           resolveRelativePath( basedir, MavenConstants.MAVEN_HOME_LOCAL );
  
  
  
  No                   revision
  No                   revision
  1.70.4.48 +31 -6     maven/src/java/org/apache/maven/plugin/PluginManager.java
  
  Index: PluginManager.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginManager.java,v
  retrieving revision 1.70.4.47
  retrieving revision 1.70.4.48
  diff -u -r1.70.4.47 -r1.70.4.48
  --- PluginManager.java        26 Jun 2004 14:52:05 -0000      1.70.4.47
  +++ PluginManager.java        28 Jun 2004 09:39:09 -0000      1.70.4.48
  @@ -119,6 +119,9 @@
       /** The directory where the plugin jars are unpacked to. */
       private File unpackedPluginsDir;
   
  +    /** The directory where the user's plugin jars are installed. */
  +    private File userPluginsDir;
  +
       /** This contains a map of plugins, keyed by id. */
       private final Map pluginHousings = new HashMap();
   
  @@ -224,11 +227,13 @@
   
           setPluginsDir( new File( mavenSession.getRootContext().getPluginsDir() ) );
           setUnpackedPluginsDir( new File( 
mavenSession.getRootContext().getUnpackedPluginsDir() ) );
  +        setUserPluginsDir( new File( 
mavenSession.getRootContext().getUserPluginsDir() ) );
   
           if ( log.isDebugEnabled() )
           {
               log.debug( "Set plugin source directory to " + 
getPluginsDir().getAbsolutePath() );
               log.debug( "Set unpacked plugin directory to " + 
getUnpackedPluginsDir().getAbsolutePath() );
  +            log.debug( "Set user plugin directory to " + 
getUserPluginsDir().getAbsolutePath() );
           }
   
           // plugin profile at this point is all of the JAR files in the plugins 
directory and the unpacked plugins dir
  @@ -236,7 +241,7 @@
           // allow further customisation via a profile descriptor.
   
           Map pluginFiles = getPluginFiles( pluginsDir, true );
  -        pluginFiles.putAll( getPluginFiles( unpackedPluginsDir, false ) );
  +        pluginFiles.putAll( getPluginFiles( userPluginsDir, false ) );
           Map pluginDirs = expandPluginFiles( pluginFiles );
   
           cacheManager.loadCache( unpackedPluginsDir );
  @@ -698,6 +703,26 @@
       }
   
       /**
  +     * Sets the directory where the users plugins are located.
  +     *
  +     * @param dir The directory where the users plugins are located.
  +     */
  +    private void setUserPluginsDir( File dir )
  +    {
  +        userPluginsDir = dir;
  +    }
  +
  +    /**
  +     * Gets the directory where the user plugins are located.
  +     *
  +     * @return the directory where the user plugins are located.
  +     */
  +    private File getUserPluginsDir()
  +    {
  +        return userPluginsDir;
  +    }
  +
  +    /**
        * Sets the directory where the unpacked plugins are located.
        *
        * @param dir The directory where the unpacked plugins are located.
  @@ -755,15 +780,15 @@
        * @param parentProject the project to load the installed plugin into
        * @todo remove any old one
        */
  -    public void installPlugin( File file, Project parentProject, boolean 
installToUnpackedPluginDirectory )
  +    public void installPlugin( File file, Project parentProject, boolean 
installToUserPluginDirectory )
           throws MavenException
       {
           log.debug( "Using plugin dependency: " + file );
           try
           {
  -            if ( installToUnpackedPluginDirectory ) 
  +            if ( installToUserPluginDirectory ) 
               {
  -                FileUtils.copyFileToDirectory( file, unpackedPluginsDir );
  +                FileUtils.copyFileToDirectory( file, userPluginsDir );
               }
       
               String pluginName = file.getCanonicalFile().getName();
  @@ -785,7 +810,7 @@
                       housing.parse( transientMapper );
                       // Should only be putting in the transientMapper - but it is 
not consistent with isLoaded
                       housing.parse( mapper );
  -                    if ( installToUnpackedPluginDirectory )
  +                    if ( installToUserPluginDirectory )
                       {
                           cacheManager.registerPlugin( pluginName, housing );
                           housing.parse( cacheManager );
  
  
  
  No                   revision
  No                   revision
  1.14.4.25 +10 -0     maven/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven/xdocs/changes.xml,v
  retrieving revision 1.14.4.24
  retrieving revision 1.14.4.25
  diff -u -r1.14.4.24 -r1.14.4.25
  --- changes.xml       27 Jun 2004 07:57:49 -0000      1.14.4.24
  +++ changes.xml       28 Jun 2004 09:39:10 -0000      1.14.4.25
  @@ -25,6 +25,16 @@
     </properties>
     <body>
       <release version="1.0-final-SNAPSHOT" date="in CVS">
  +      <action dev="brett" type="update">
  +        Set maven.plugin.user.dir to ${maven.home.local}/plugins by default, move 
maven.plugin.unpacked.dir to
  +        ${maven.home.local}/cache.
  +      </action>
  +      <action dev="brett" type="update">
  +        Read local plugin jars from maven.plugin.user.dir instead of 
maven.plugin.unpacked.dir.
  +      </action>
  +      <action dev="brett" type="update">
  +        Use commons-httpclient for http downloads from the repository.
  +      </action>
         <action dev="brett" type="add" issue="MAVEN-1332" due-to="george wang">
           Support NTLM authentication on a remote repository.
         </action>
  
  
  
  No                   revision
  No                   revision
  1.63.4.9  +9 -1      maven/xdocs/reference/user-guide.xml
  
  Index: user-guide.xml
  ===================================================================
  RCS file: /home/cvs/maven/xdocs/reference/user-guide.xml,v
  retrieving revision 1.63.4.8
  retrieving revision 1.63.4.9
  diff -u -r1.63.4.8 -r1.63.4.9
  --- user-guide.xml    27 Jun 2004 07:57:49 -0000      1.63.4.8
  +++ user-guide.xml    28 Jun 2004 09:39:10 -0000      1.63.4.9
  @@ -722,11 +722,19 @@
               </tr>
   
               <tr>
  +              <td>maven.plugin.user.dir</td>
  +              <td>
  +                Where maven can find plugins for this user only.
  +              </td>
  +              <td>${maven.home.local}/plugins</td>
  +            </tr>
  +
  +            <tr>
                 <td>maven.plugin.unpacked.dir</td>
                 <td>
                   Where maven expands installed plugins for processing.
                 </td>
  -              <td>${maven.home.local}/plugins</td>
  +              <td>${maven.home.local}/cache</td>
               </tr>
   
               <tr>
  
  
  
  No                   revision
  No                   revision
  1.15.4.7  +2 -10     maven/xdocs/start/install.xml
  
  Index: install.xml
  ===================================================================
  RCS file: /home/cvs/maven/xdocs/start/install.xml,v
  retrieving revision 1.15.4.6
  retrieving revision 1.15.4.7
  diff -u -r1.15.4.6 -r1.15.4.7
  --- install.xml       27 Jun 2004 11:48:04 -0000      1.15.4.6
  +++ install.xml       28 Jun 2004 09:39:11 -0000      1.15.4.7
  @@ -60,16 +60,8 @@
         </p>
   
         <p>
  -        If you are upgrading from a previous version of Maven, you should
  -        remove your local plugin directory, specified by 
  -        <code>MAVEN_HOME_LOCAL</code>. The default location for this is
  -        <code>HOME/.maven/plugins</code>
  -      </p>
  -
  -      <p>
  -        <b>WARNING</b>: the following step currently does not work on
  -        Windows 95, 98, ME.
  -        You can safely skip it - Maven will download the dependencies instead
  +        <b>Note</b>: you can safely skip the following step if you have any 
problems.
  +        If you do skip it, Maven will download the dependencies instead
           of copying them from the <code>lib</code> directory.
         </p>
   
  
  
  

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

Reply via email to