You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Steven Jardine <st...@mjnservices.com> on 2008/11/12 16:47:21 UTC

Using commons-net ftp jar as a dependency

I have a project that uses the commons-net package.  Well it actually 
uses only the commons-net-2.0-ftp.jar file found at 
http://repo1.maven.org/maven2/commons-net/commons-net/2.0/commons-net-2.0-ftp.jar.

It there a way for me to have my project depend on only this jar file 
not the whole commons-net project.  My current dependency is

<dependency>
    <groupId>commons-net</groupId>
    <artifactId>commons-net</artifactId>
    <version>2.0</version>
    <scope>compile</scope>
</dependency>

Thanks,
Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Using commons-net ftp jar as a dependency

Posted by Rusty Wright <ru...@gmail.com>.
If you know you're not going to use the stuff it's dragging in I think you can exclude it;

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${version.springframework}</version>

            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

I use that along with

    <repositories>
        <repository>
            <id>Version99</id>
            <name>Version 99 Does Not Exist Maven repository</name>
            <layout>default</layout>
            <url>http://no-commons-logging.zapto.org/mvn2</url>
        </repository>
    </repositories>

So that I can use SLF4J's commons logging replacement.

But otherwise, I agree with Bruno; I'd let it drag in the other stuff, for example, in case a future version starts using it.

One of the advantages of using maven is learning to let go and stop micromanaging your jars.


Steven Jardine wrote:
> I have a project that uses the commons-net package.  Well it actually 
> uses only the commons-net-2.0-ftp.jar file found at 
> http://repo1.maven.org/maven2/commons-net/commons-net/2.0/commons-net-2.0-ftp.jar. 
> 
> 
> It there a way for me to have my project depend on only this jar file 
> not the whole commons-net project.  My current dependency is
> 
> <dependency>
>    <groupId>commons-net</groupId>
>    <artifactId>commons-net</artifactId>
>    <version>2.0</version>
>    <scope>compile</scope>
> </dependency>
> 
> Thanks,
> Steve
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org