jvanzyl     2002/11/13 09:47:42

  Modified:    src/java/org/apache/maven MavenConstants.java
                        MavenUtils.java
               src/java/org/apache/maven/app ProjectVerifier.java
  Log:
  o another constant
  
  Revision  Changes    Path
  1.8       +3 -1      
jakarta-turbine-maven/src/java/org/apache/maven/MavenConstants.java
  
  Index: MavenConstants.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/MavenConstants.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- MavenConstants.java       12 Nov 2002 04:04:36 -0000      1.7
  +++ MavenConstants.java       13 Nov 2002 17:47:37 -0000      1.8
  @@ -114,4 +114,6 @@
       /** Proxy password tag. */
       public static final String PROXY_PASSWORD = "maven.proxy.password";
   
  +    /** Snapshot JAR signifier tag. */
  +    public static final String SNAPSHOT_JAR_SIGNIFIER = "SNAPSHOT.jar";
   }
  
  
  
  1.57      +3 -65     jakarta-turbine-maven/src/java/org/apache/maven/MavenUtils.java
  
  Index: MavenUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/MavenUtils.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- MavenUtils.java   12 Nov 2002 16:41:00 -0000      1.56
  +++ MavenUtils.java   13 Nov 2002 17:47:37 -0000      1.57
  @@ -117,14 +117,10 @@
        */
       private static final ThreadLocal xmlReaderPool = new ThreadLocal();
   
  -    /**
  -     * Should we cache and reuse the introspector
  -     */
  +    /** Should we cache and reuse the introspector */
       private static boolean cacheIntrospector = true;
   
  -    /**
  -     * The singleton introspector if caching is enabled
  -     */
  +    /** The singleton introspector if caching is enabled */
       private static XMLIntrospector singletonIntrospector;
   
       /** Project Bean Reader */
  @@ -143,14 +139,6 @@
           return getProject(projectDescriptor, new File("."), null);
       }
   
  -    /*
  -
  -    project.xml [ISO-8859-1]
  -    |
  -    v
  -
  -    */
  -
       /**
        * @return the POM from the given file in the current directory, using the
        * given context as the parent context
  @@ -197,38 +185,6 @@
           String pomToExtend = project.getExtend();
           if (pomToExtend != null)
           {
  -            if (pomToExtend.startsWith("template:"))
  -            {
  -                JellyContext context = null;
  -
  -                if (parentContext != null)
  -                {
  -                    context = new JellyContext(parentContext);
  -                    context.setInherit(true);
  -                }
  -                else
  -                {
  -                    context = new JellyContext();
  -                }
  -
  -                String mavenHome = (String) 
context.findVariable(parentContext.MAVEN_HOME);
  -                StringTokenizer st = new StringTokenizer(pomToExtend, ":");
  -                st.nextToken();
  -                pomToExtend = mavenHome + "/templates/" + st.nextToken() + 
"/project.xml";
  -            }
  -
  -            // Project parent;
  -            // try
  -            // {
  -            //     parent = (Project) projectBeanReader.parse(
  -            //       new File(pomToExtend));
  -            // }
  -            // catch (Exception e)
  -            // {
  -            //     parent = (Project) projectBeanReader.parse(
  -            //       new File(dir, pomToExtend));
  -            // }
  -
               Project parent = (Project)
                   projectBeanReader.parse( new File(dir, pomToExtend ) );
   
  @@ -333,24 +289,6 @@
           // everything to be encoded in "ISO-8859-1".
   
           return projectStream.toString(INTERNAL_ENCODING);
  -    }
  -
  -    /**
  -     * Merge a child and parent Project object.
  -     *
  -     * I would like to use BeanUtils but it doesn't quite work the
  -     * way I need. So I will patch it later.
  -     *
  -     * @param child child object
  -     * @param parent the maven project
  -     * @return the child after project properties have been copied
  -     * @throws Exception when anything goes wrong. FIXME this is bad
  -     */
  -    private static Object mergeBeansX(Object child, Object parent)
  -        throws Exception
  -    {
  -        BeanUtils.copyProperties(child, parent);
  -        return child;
       }
   
       /**
  
  
  
  1.15      +4 -5      
jakarta-turbine-maven/src/java/org/apache/maven/app/ProjectVerifier.java
  
  Index: ProjectVerifier.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/ProjectVerifier.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ProjectVerifier.java      13 Nov 2002 03:21:23 -0000      1.14
  +++ ProjectVerifier.java      13 Nov 2002 17:47:42 -0000      1.15
  @@ -408,10 +408,9 @@
               }
               
               // So we want to pull down the checksum as well the first time
  -            // the resource is pulled down to make sure that everything is
  -            // cool.
  -            
  -            if (jarFile.exists() == false || jar.endsWith("SNAPSHOT.jar"))
  +            // the resource is pulled down to make sure that everything
  +            // is cool.
  +            if (jarFile.exists() == false || 
jar.endsWith(MavenConstants.SNAPSHOT_JAR_SIGNIFIER))
               {
                   // The directory structure for this project may
                   // not exists so create it if missing.
  
  
  

--
To unsubscribe, e-mail:   <mailto:turbine-maven-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-dev-help@;jakarta.apache.org>

Reply via email to