Hi, thanks for your response.
I migrated from ant, where I had a libs folder.  I just wanted to keep using
the libs folder for now as I migrate to using repositories.  Is there a way
to direct maven to load libraries from a local folder?  I did it like this:
  <repositories>
      <repository>
          <id>project</id>
          <name>Project Maven Repository</name>
          <layout>default</layout>
          <url>file://${basedir}/src/main/webapp/WEB-INF/lib</url>
      </repository>
  </repositories>

But when I try to load a dependency from that repo:

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-logging-1.1.1</artifactId>
        <version>1.1.1</version>
    </dependency>

I get this:
Downloading:
file:///home/a/src/client_pom/src/main/webapp/WEB-INF/lib/org/apache/commons/commons-logging-1.1.1/1.1.1/commons-logging-1.1.1-1.1.1.pom
Unable to find resource 'org.apache.commons:commons-logging-1.1.1:pom:1.1.1'
in repository project
(file:///home/a/src/client_pom/src/main/webapp/WEB-INF/lib)
Downloading:
http://repo1.maven.org/maven2/org/apache/commons/commons-logging-1.1.1/1.1.1/commons-logging-1.1.1-1.1.1.pom
Unable to find resource 'org.apache.commons:commons-logging-1.1.1:pom:1.1.1'
in repository central (http://repo1.maven.org/maven2)
Downloading:
file:///home/a/src/client_pom/src/main/webapp/WEB-INF/lib/org/apache/commons/commons-logging-1.1.1/1.1.1/commons-logging-1.1.1-1.1.1.jar
Unable to find resource 'org.apache.commons:commons-logging-1.1.1:jar:1.1.1'
in repository project
(file:///home/a/src/client_pom/src/main/webapp/WEB-INF/lib)

Is there a way to just load that file with no questions asked? 

Thank you!!




Wendy Smoak-3 wrote:
> 
> On Sun, Mar 21, 2010 at 6:51 PM, Arrowx7 <aluminum3...@yahoo.com> wrote:
>> Then I write dependencies, such as for apache commons logging
>>    <dependency>
>>        <groupId>org.apache.commons</groupId>
>>        <artifactId>commons-logging-1.1.1</artifactId>
>>        <version></version>
>>    </dependency>
>>
>> It complains because it wants the version, if I give it the version it
>> says
>> it can't find it.  How do I just get this jar in there without setting up
>> your own repository and installing it to repository, generating version
>> etc... I just want to simply linclude that file in there.  I realize that
>> it's bad format, but how do I tell it to just grab that file regardless
>> of
>> version.
> 
> I think you want:
> http://repo2.maven.org/maven2/commons-logging/commons-logging/1.1.1/
> 
> Try this...
> <dependency>
>   <groupId>commons-logging</groupId>
>   <artifactId>commons-logging<artifactId>
>   <version>1.1.1</version>
> </dependency>
> 
> (A Maven repository has a specified layout.  You can't just point at
> any collection of jars.)
> 
> -- 
> Wendy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Including-a-local-jar-in-the-build-tp27977332p27981665.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to