jvanzyl     2002/11/24 09:59:05

  Modified:    src/java/org/apache/maven CreateDependencyClasspath.java
  Log:
  refactoring
  
  Revision  Changes    Path
  1.14      +22 -3     
jakarta-turbine-maven/src/java/org/apache/maven/CreateDependencyClasspath.java
  
  Index: CreateDependencyClasspath.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/CreateDependencyClasspath.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- CreateDependencyClasspath.java    15 Nov 2002 19:47:25 -0000      1.13
  +++ CreateDependencyClasspath.java    24 Nov 2002 17:59:04 -0000      1.14
  @@ -67,6 +67,9 @@
   import org.apache.maven.repository.Artifact;
   import org.apache.tools.ant.types.Path;
   
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
  +
   /**
    * Take a valid MavenJellyContext which contains references to the POM, ant
    * project, and all defined properties and create the dependency classpath based
  @@ -84,6 +87,9 @@
       // I N S T A N C E  M E M B E R S
       // ------------------------------------------------------------
   
  +    /** Log. */
  +    private static final Log log = 
LogFactory.getLog(CreateDependencyClasspath.class);
  +
       /** Reference id for the generated classpath. */
       private String refid;
   
  @@ -155,6 +161,10 @@
       public void execute() 
           throws Exception
       {
  +    
  +    try
  +    {
  +    
           // If a maven project hasn't been set explicity then use the one
           // in the jelly context.
           if (getMavenProject() == null)
  @@ -165,6 +175,7 @@
           Object b = context.getVariable(MavenConstants.JAR_OVERRIDE);
           boolean mavenJarOverride = (b != null && b instanceof Boolean &&
                                       ((Boolean) b).booleanValue());
  +        
           String mavenRepoLocal = 
                   (String) context.getVariable(MavenConstants.REPO_LOCAL);
           
  @@ -179,8 +190,7 @@
               Dependency d = (Dependency) i.next();
   
               // Only add jar dependencies to the classpath
  -            if (!(d.isCompileType() || d.isTestType()
  -                  || "jar".equals(d.getType())))
  +            if (!(d.isCompileType() || d.isTestType() || "jar".equals(d.getType())))
               {
                   continue;
               }
  @@ -215,5 +225,14 @@
           {
               antProject.addReference(refid, classpath);
           }
  +
  +    }
  +    catch (Exception e)
  +    {
  +        e.printStackTrace();
  +        throw e;
  +    }
  +
  +
       }
   }
  
  
  

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

Reply via email to