That'll do it too.. I just used type.getExtension().equals("jar").

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, 14 August 2003 10:51 AM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: maven/src/java/org/apache/maven/project 
> Dependency.java
> 
> 
> dion        2003/08/13 17:51:12
> 
>   Modified:    src/java/org/apache/maven/project Tag: MAVEN_RC1_STABLE
>                         Dependency.java
>   Log:
>   dependency code so brett can comment/review etc
>   
>   Revision  Changes    Path
>   No                   revision
>   No                   revision
>   1.34.2.1  +21 -1     
> maven/src/java/org/apache/maven/project/Dependency.java
>   
>   Index: Dependency.java
>   ===================================================================
>   RCS file: 
> /home/cvs/maven/src/java/org/apache/maven/project/Dependency.java,v
>   retrieving revision 1.34
>   retrieving revision 1.34.2.1
>   diff -u -r1.34 -r1.34.2.1
>   --- Dependency.java 18 Jun 2003 21:50:14 -0000      1.34
>   +++ Dependency.java 14 Aug 2003 00:51:12 -0000      1.34.2.1
>   @@ -346,4 +346,24 @@
>                + " ver:" + getVersion() + " ar:" + 
> getArtifact() + " jar:"
>                + getJar() + " ]";
>        }
>   +
>   +    /**
>   +     * Usually only jars and ejbs are added to the classpath
>   +     * 
>   +     * @param d
>   +     * @return true if the given dependency belongs on the 
> classpath
>   +     */
>   +    public boolean isAddedToClasspath()
>   +    {
>   +        String artifactType = type.getType();
>   +        return artifactType.equals("jar") || 
> artifactType.equalsIgnoreCase("ejb");
>   +    }
>   +    
>   +    /**
>   +     * @return true if the dependency is a maven plugin
>   +     */
>   +    public boolean isPlugin()
>   +    {
>   +        return type.getType().equals("plugin");
>   +    }
>    }
>   
>   
>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to