You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by laredotornado <la...@gmail.com> on 2009/10/09 17:43:43 UTC

Why doesn't maven look for dependency in the local repo?

Hi,

I'm using Maven 1.1.  I have this dependency in my project.xml file ...

    <dependency>
      <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
     
<artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
      <version>${currentVersion}</version>
      <type>war</type>
    </dependency>

However when running a maven command (e.g. maven test:test), I get a failed
dependency error, even though the dependency exists in my local repo.  How
do I force maven to check the local repo? 

maven test:test
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.1

Trying to get missing dependencies (and updated snapshots) required by
myco-oit-governor-citizen-assistanceUtility-test:
- Attempting to download
myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
from http://localhost:9999/maven
Error retrieving artifact from [http://localhost:9999/maven]:
org.apache.maven.wagon.TransferFailedException: Connection refused
- Attempting to download
myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
from http://localhost:9999/maven-external
Error retrieving artifact from [http://localhost:9999/maven-external]:
org.apache.maven.wagon.TransferFailedException: Connection refused
- Attempting to download
myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
from http://localhost:9999/maven-remotebox
Error retrieving artifact from [http://localhost:9999/maven-remotebox]:
org.apache.maven.wagon.TransferFailedException: Connection refused
- Attempting to download
myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
from http://localhost:9999/maven-external-indiana
Error retrieving artifact from
[http://localhost:9999/maven-external-indiana]:
org.apache.maven.wagon.TransferFailedException: Connection refused
- Attempting to download
myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
from http://software.ais.pl/repository
- Attempting to download
myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
from http://download.java.net/maven/1/
- Attempting to download
myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
from http://repo1.maven.org/maven
- Attempting to download
myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
from http://people.apache.org/repo/m1-snapshot-repository/
- Attempting to download
myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
from http://mirrors.sunsite.dk/maven
-------------------------------------------------------------------------------
>> The build cannot continue because of the following unsatisfied
>> dependency:
-
myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war

-------------------------------------------------------------------------------
BUILD FAILED
-------------------------------------------------------------------------------

-- 
View this message in context: http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Why doesn't maven look for dependency in the local repo?

Posted by laredotornado <la...@gmail.com>.
I did as you suggested, but got the parse error ...

maven war:war
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.1

-------------------------------------------------------------------------------
>> Error parsing project.xml
>> '/Users/dalvarado/source/assistanceUtility/webapp/project.xml'
>> ParseError at [row,col]:[231,23]
Message: Unrecognised tag: 'pluginManagement'
-------------------------------------------------------------------------------
BUILD FAILED
-------------------------------------------------------------------------------
Total time   : 0 seconds 
Finished at  : Tuesday, October 13, 2009 8:06:08 AM MDT
Final Memory : 1M/2M
-------------------------------------------------------------------------------


Do you think its the version of Maven that I'm using (1.1)?  Is the syntax
different for that version?  Here's the snippet from the project.xml file
...

  <build>
    <pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>1.6.3</version>
        <configuration>
          <attachClasses>true</attachClasses>
        </configuration>
      </plugin>
    </plugins>
    </pluginManagement>
    ...
  </build>





Quintin Beukes-2 wrote:
> 
> You have to wrap <plugins> in <pluginManagement>. The examples in the
> documentation doesn't seem to mention this either, so it's a common
> mistake for me as well. Ex:
> 
>     <build>
>         <pluginManagement>
>             <plugins>
>                 <plugin>
>                     .....
>                 </plugin>
> 
> Quintin Beukes
> 
> 
> 
> On Tue, Oct 13, 2009 at 3:41 PM, laredotornado <la...@gmail.com>
> wrote:
>>
>> I wanted to give you an update as to where I am with this as what you
>> included seems exactly like my problem.  However, when I included the
>> "plugins" directive in the project.xml from where I build my webapp,
>>
>>
>>  <build>
>>    <plugins>
>>      <plugin>
>>        <artifactId>maven-war-plugin</artifactId>
>>        <version>1.6.3</version>
>>        <configuration>
>>          <attachClasses>true</attachClasses>
>>        </configuration>
>>      </plugin>
>>    </plugins>
>>    ...
>>  </build>
>>
>> I get this error ...
>>
>> maven war:war
>>  __  __
>> |  \/  |__ _Apache__ ___
>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>
>> -------------------------------------------------------------------------------
>>>> Error parsing project.xml
>>>> '/Users/dalvarado/source/assistanceUtility/webapp/project.xml'
>>>> ParseError at [row,col]:[231,14]
>> Message: Unrecognised tag: 'plugins'
>> -------------------------------------------------------------------------------
>> BUILD FAILED
>> -------------------------------------------------------------------------------
>> Total time   : 0 seconds
>> Finished at  : Tuesday, October 13, 2009 7:32:52 AM MDT
>> Final Memory : 1M/2M
>> -------------------------------------------------------------------------------
>>
>>
>> Is "plugins" in the wrong place?  Thanks, - Dave
>>
>>
>>
>>
>>
>> Quintin Beukes-2 wrote:
>>>
>>> Hey,
>>>
>>> This might help:
>>> http://is.gd/4bPYH
>>>
>>> If you have 2.1 of the WAR maven plugin, then it would work. Otherwise
>>> you can just use the SNAPSHOT (all described on the thread).
>>>
>>> Then, when you build it, the WAR will be installed into your local
>>> repo, as well as an additional JAR (which only has the classes).
>>>
>>> Then you can reference the WAR as a dependency in your POM, by adding
>>> the <classifier>classes</classifier> element into the <dependency>
>>> element.
>>>
>>> Quintin Beukes
>>>
>>>
>>>
>>> On Sat, Oct 10, 2009 at 12:49 PM, Quintin Beukes <qu...@skywalk.co.za>
>>> wrote:
>>>> Are you referring to this entry:
>>>> <classpathentry kind="src"
>>>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>>>
>>>> If so, try changing it to reference:
>>>> /myco-oit-governor-citizen-assistanceUtility-webapp/WEB-INF/classes
>>>>
>>>> Unless Maven notices it's a WAR, and transforms the classpath entry to
>>>> reference the classes directory, it won't work. Maybe there is a
>>>> different "kind" attribute? something like kind="war"? I tried to find
>>>> the documentation for <classpathentry>, but was unsuccessful.
>>>>
>>>> Quintin Beukes
>>>>
>>>>
>>>>
>>>> On Fri, Oct 9, 2009 at 8:50 PM, laredotornado <la...@gmail.com>
>>>> wrote:
>>>>>
>>>>> First off, thanks so much for taking the time to respond.  To answer
>>>>> your
>>>>> questions ...
>>>>>
>>>>>> In your classpath, is that in fact where the files are put? Can you
>>>>> confirm, from your project root, whether or not you can access those
>>>>> classes using the relative/absolute paths specified in your classpath.
>>>>>
>>>>> No where do I explicitly list a classpath . I thought that the
>>>>> classpath
>>>>> was
>>>>> built from the dependency list.  Is this not correct, or is there some
>>>>> exception for war dependencies?
>>>>>
>>>>>> Does it return anything?
>>>>>
>>>>> No.  there is nothing in the target/classes directory.  The class in
>>>>> question is in the war's WEB-INF/classes directory.  But if maven
>>>>> ignores
>>>>> wars, then I should resort to something else?
>>>>>
>>>>> Thanks ,- Dave
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Quintin Beukes-2 wrote:
>>>>>>
>>>>>> In your classpath, is that in fact where the files are put? Can you
>>>>>> confirm, from your project root, whether or not you can access those
>>>>>> classes using the relative/absolute paths specified in your
>>>>>> classpath.
>>>>>>
>>>>>> Specifically, when in your project's root, type: ls -ld
>>>>>> target/classes/myco/oit/governor/citizen/assistanceUtility/Constants.class
>>>>>>
>>>>>> Does it return anything?
>>>>>>
>>>>>> Quintin Beukes
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Oct 9, 2009 at 6:59 PM, laredotornado
>>>>>> <la...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> Thanks, for now, I hard-coded the version to make this error go
>>>>>>> away.
>>>>>>> Problem now is that it doesn't seem the dependency is getting
>>>>>>> included
>>>>>>> in
>>>>>>> my
>>>>>>> classpath, because I get compilation errors (for classes that are
>>>>>>> included
>>>>>>> in the dependency in question) now when I try to run, such as ...
>>>>>>>
>>>>>>>  maven test:test
>>>>>>>  __  __
>>>>>>> |  \/  |__ _Apache__ ___
>>>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>>>
>>>>>>> build:start:
>>>>>>>
>>>>>>> test:test:
>>>>>>> java:prepare-filesystem:
>>>>>>>
>>>>>>> java:init:
>>>>>>>
>>>>>>> java:compile:
>>>>>>>    [echo] No java source files to compile.
>>>>>>>
>>>>>>> java:jar-resources:
>>>>>>>
>>>>>>> test:prepare-filesystem:
>>>>>>>
>>>>>>> test:test-resources:
>>>>>>> Copying 4 files to
>>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>>>>
>>>>>>> test:compile:
>>>>>>>    [javac] Compiling 8 source files to
>>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>>>>    [javac]
>>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/src/test/myco/oit/governor/citizen/assistanceUtility/test/env/BaseEnvTest.java:16:
>>>>>>> cannot find symbol
>>>>>>>    [javac] symbol  : class Constants
>>>>>>>    [javac] location: package
>>>>>>> myco.oit.governor.citizen.assistanceUtility
>>>>>>>    [javac] import
>>>>>>> myco.oit.governor.citizen.assistanceUtility.Constants;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I still don't think maven is looking in the right place because when
>>>>>>> I
>>>>>>> run
>>>>>>> the command "maven eclipse:generate-classpath", the generated
>>>>>>> .classpath
>>>>>>> file is looking for the repo in question,
>>>>>>> "myco-oit-governor-citizen-assistanceUtility-webapp", in another
>>>>>>> directory
>>>>>>> besides MAVEN_REPO (contents of .classpath below).  Any ideas why?
>>>>>>>
>>>>>>>
>>>>>>> <classpath>
>>>>>>>  <classpathentry kind="con"
>>>>>>> path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry>
>>>>>>>  <classpathentry output="target/test-classes" kind="src"
>>>>>>> path="src/test"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"></classpathentry>
>>>>>>>  <classpathentry kind="src"
>>>>>>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/org.springframework/jars/spring-1.2.8.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/org.springframework/jars/spring-mock-1.2.8.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-lang/jars/commons-lang-2.3.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-core-1.4.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/htmlunit-1.11.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-htmlunit-plugin-1.4.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/org.apache.regexp/jars/regexp-1.3.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/jaxen/jars/jaxen-1.1.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.0.1.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-io/jars/commons-io-1.3.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-collections/jars/commons-collections-3.2.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/js/jars/js-1.6R5.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/nekohtml/jars/nekohtml-0.9.5.jar"></classpathentry>
>>>>>>>  <classpathentry kind="output"
>>>>>>> path="target/classes"></classpathentry>
>>>>>>> </classpath>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Quintin Beukes-2 wrote:
>>>>>>>>
>>>>>>>> Perhaps you meant "${project.version}" instead of
>>>>>>>> "${currentVersion}"
>>>>>>>> ?
>>>>>>>>
>>>>>>>> Quintin Beukes
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Oct 9, 2009 at 5:43 PM, laredotornado
>>>>>>>> <la...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I'm using Maven 1.1.  I have this dependency in my project.xml
>>>>>>>>> file
>>>>>>>>> ...
>>>>>>>>>
>>>>>>>>>    <dependency>
>>>>>>>>>    
>>>>>>>>>  <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
>>>>>>>>>
>>>>>>>>> <artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
>>>>>>>>>      <version>${currentVersion}</version>
>>>>>>>>>      <type>war</type>
>>>>>>>>>    </dependency>
>>>>>>>>>
>>>>>>>>> However when running a maven command (e.g. maven test:test), I get
>>>>>>>>> a
>>>>>>>>> failed
>>>>>>>>> dependency error, even though the dependency exists in my local
>>>>>>>>> repo.
>>>>>>>>>  How
>>>>>>>>> do I force maven to check the local repo?
>>>>>>>>>
>>>>>>>>> maven test:test
>>>>>>>>>  __  __
>>>>>>>>> |  \/  |__ _Apache__ ___
>>>>>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>>>>>
>>>>>>>>> Trying to get missing dependencies (and updated snapshots)
>>>>>>>>> required
>>>>>>>>> by
>>>>>>>>> myco-oit-governor-citizen-assistanceUtility-test:
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://localhost:9999/maven
>>>>>>>>> Error retrieving artifact from [http://localhost:9999/maven]:
>>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://localhost:9999/maven-external
>>>>>>>>> Error retrieving artifact from
>>>>>>>>> [http://localhost:9999/maven-external]:
>>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://localhost:9999/maven-remotebox
>>>>>>>>> Error retrieving artifact from
>>>>>>>>> [http://localhost:9999/maven-remotebox]:
>>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://localhost:9999/maven-external-indiana
>>>>>>>>> Error retrieving artifact from
>>>>>>>>> [http://localhost:9999/maven-external-indiana]:
>>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://software.ais.pl/repository
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://download.java.net/maven/1/
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://repo1.maven.org/maven
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://people.apache.org/repo/m1-snapshot-repository/
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://mirrors.sunsite.dk/maven
>>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>>>>> The build cannot continue because of the following unsatisfied
>>>>>>>>>>> dependency:
>>>>>>>>> -
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>>
>>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>>> BUILD FAILED
>>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
>>>>>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25824586.html
>>>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25826148.html
>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25873112.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25873609.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Why doesn't maven look for dependency in the local repo?

Posted by Quintin Beukes <qu...@skywalk.co.za>.
You have to wrap <plugins> in <pluginManagement>. The examples in the
documentation doesn't seem to mention this either, so it's a common
mistake for me as well. Ex:

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    .....
                </plugin>

Quintin Beukes



On Tue, Oct 13, 2009 at 3:41 PM, laredotornado <la...@gmail.com> wrote:
>
> I wanted to give you an update as to where I am with this as what you
> included seems exactly like my problem.  However, when I included the
> "plugins" directive in the project.xml from where I build my webapp,
>
>
>  <build>
>    <plugins>
>      <plugin>
>        <artifactId>maven-war-plugin</artifactId>
>        <version>1.6.3</version>
>        <configuration>
>          <attachClasses>true</attachClasses>
>        </configuration>
>      </plugin>
>    </plugins>
>    ...
>  </build>
>
> I get this error ...
>
> maven war:war
>  __  __
> |  \/  |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>
> -------------------------------------------------------------------------------
>>> Error parsing project.xml
>>> '/Users/dalvarado/source/assistanceUtility/webapp/project.xml'
>>> ParseError at [row,col]:[231,14]
> Message: Unrecognised tag: 'plugins'
> -------------------------------------------------------------------------------
> BUILD FAILED
> -------------------------------------------------------------------------------
> Total time   : 0 seconds
> Finished at  : Tuesday, October 13, 2009 7:32:52 AM MDT
> Final Memory : 1M/2M
> -------------------------------------------------------------------------------
>
>
> Is "plugins" in the wrong place?  Thanks, - Dave
>
>
>
>
>
> Quintin Beukes-2 wrote:
>>
>> Hey,
>>
>> This might help:
>> http://is.gd/4bPYH
>>
>> If you have 2.1 of the WAR maven plugin, then it would work. Otherwise
>> you can just use the SNAPSHOT (all described on the thread).
>>
>> Then, when you build it, the WAR will be installed into your local
>> repo, as well as an additional JAR (which only has the classes).
>>
>> Then you can reference the WAR as a dependency in your POM, by adding
>> the <classifier>classes</classifier> element into the <dependency>
>> element.
>>
>> Quintin Beukes
>>
>>
>>
>> On Sat, Oct 10, 2009 at 12:49 PM, Quintin Beukes <qu...@skywalk.co.za>
>> wrote:
>>> Are you referring to this entry:
>>> <classpathentry kind="src"
>>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>>
>>> If so, try changing it to reference:
>>> /myco-oit-governor-citizen-assistanceUtility-webapp/WEB-INF/classes
>>>
>>> Unless Maven notices it's a WAR, and transforms the classpath entry to
>>> reference the classes directory, it won't work. Maybe there is a
>>> different "kind" attribute? something like kind="war"? I tried to find
>>> the documentation for <classpathentry>, but was unsuccessful.
>>>
>>> Quintin Beukes
>>>
>>>
>>>
>>> On Fri, Oct 9, 2009 at 8:50 PM, laredotornado <la...@gmail.com>
>>> wrote:
>>>>
>>>> First off, thanks so much for taking the time to respond.  To answer
>>>> your
>>>> questions ...
>>>>
>>>>> In your classpath, is that in fact where the files are put? Can you
>>>> confirm, from your project root, whether or not you can access those
>>>> classes using the relative/absolute paths specified in your classpath.
>>>>
>>>> No where do I explicitly list a classpath . I thought that the classpath
>>>> was
>>>> built from the dependency list.  Is this not correct, or is there some
>>>> exception for war dependencies?
>>>>
>>>>> Does it return anything?
>>>>
>>>> No.  there is nothing in the target/classes directory.  The class in
>>>> question is in the war's WEB-INF/classes directory.  But if maven
>>>> ignores
>>>> wars, then I should resort to something else?
>>>>
>>>> Thanks ,- Dave
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Quintin Beukes-2 wrote:
>>>>>
>>>>> In your classpath, is that in fact where the files are put? Can you
>>>>> confirm, from your project root, whether or not you can access those
>>>>> classes using the relative/absolute paths specified in your classpath.
>>>>>
>>>>> Specifically, when in your project's root, type: ls -ld
>>>>> target/classes/myco/oit/governor/citizen/assistanceUtility/Constants.class
>>>>>
>>>>> Does it return anything?
>>>>>
>>>>> Quintin Beukes
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Oct 9, 2009 at 6:59 PM, laredotornado <la...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Thanks, for now, I hard-coded the version to make this error go away.
>>>>>> Problem now is that it doesn't seem the dependency is getting included
>>>>>> in
>>>>>> my
>>>>>> classpath, because I get compilation errors (for classes that are
>>>>>> included
>>>>>> in the dependency in question) now when I try to run, such as ...
>>>>>>
>>>>>>  maven test:test
>>>>>>  __  __
>>>>>> |  \/  |__ _Apache__ ___
>>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>>
>>>>>> build:start:
>>>>>>
>>>>>> test:test:
>>>>>> java:prepare-filesystem:
>>>>>>
>>>>>> java:init:
>>>>>>
>>>>>> java:compile:
>>>>>>    [echo] No java source files to compile.
>>>>>>
>>>>>> java:jar-resources:
>>>>>>
>>>>>> test:prepare-filesystem:
>>>>>>
>>>>>> test:test-resources:
>>>>>> Copying 4 files to
>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>>>
>>>>>> test:compile:
>>>>>>    [javac] Compiling 8 source files to
>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>>>    [javac]
>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/src/test/myco/oit/governor/citizen/assistanceUtility/test/env/BaseEnvTest.java:16:
>>>>>> cannot find symbol
>>>>>>    [javac] symbol  : class Constants
>>>>>>    [javac] location: package
>>>>>> myco.oit.governor.citizen.assistanceUtility
>>>>>>    [javac] import
>>>>>> myco.oit.governor.citizen.assistanceUtility.Constants;
>>>>>>
>>>>>>
>>>>>>
>>>>>> I still don't think maven is looking in the right place because when I
>>>>>> run
>>>>>> the command "maven eclipse:generate-classpath", the generated
>>>>>> .classpath
>>>>>> file is looking for the repo in question,
>>>>>> "myco-oit-governor-citizen-assistanceUtility-webapp", in another
>>>>>> directory
>>>>>> besides MAVEN_REPO (contents of .classpath below).  Any ideas why?
>>>>>>
>>>>>>
>>>>>> <classpath>
>>>>>>  <classpathentry kind="con"
>>>>>> path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry>
>>>>>>  <classpathentry output="target/test-classes" kind="src"
>>>>>> path="src/test"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"></classpathentry>
>>>>>>  <classpathentry kind="src"
>>>>>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/org.springframework/jars/spring-1.2.8.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/org.springframework/jars/spring-mock-1.2.8.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-lang/jars/commons-lang-2.3.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-core-1.4.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/htmlunit-1.11.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-htmlunit-plugin-1.4.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/org.apache.regexp/jars/regexp-1.3.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/jaxen/jars/jaxen-1.1.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.0.1.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-io/jars/commons-io-1.3.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-collections/jars/commons-collections-3.2.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/js/jars/js-1.6R5.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/nekohtml/jars/nekohtml-0.9.5.jar"></classpathentry>
>>>>>>  <classpathentry kind="output" path="target/classes"></classpathentry>
>>>>>> </classpath>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Quintin Beukes-2 wrote:
>>>>>>>
>>>>>>> Perhaps you meant "${project.version}" instead of "${currentVersion}"
>>>>>>> ?
>>>>>>>
>>>>>>> Quintin Beukes
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Oct 9, 2009 at 5:43 PM, laredotornado
>>>>>>> <la...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I'm using Maven 1.1.  I have this dependency in my project.xml file
>>>>>>>> ...
>>>>>>>>
>>>>>>>>    <dependency>
>>>>>>>>      <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
>>>>>>>>
>>>>>>>> <artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
>>>>>>>>      <version>${currentVersion}</version>
>>>>>>>>      <type>war</type>
>>>>>>>>    </dependency>
>>>>>>>>
>>>>>>>> However when running a maven command (e.g. maven test:test), I get a
>>>>>>>> failed
>>>>>>>> dependency error, even though the dependency exists in my local
>>>>>>>> repo.
>>>>>>>>  How
>>>>>>>> do I force maven to check the local repo?
>>>>>>>>
>>>>>>>> maven test:test
>>>>>>>>  __  __
>>>>>>>> |  \/  |__ _Apache__ ___
>>>>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>>>>
>>>>>>>> Trying to get missing dependencies (and updated snapshots) required
>>>>>>>> by
>>>>>>>> myco-oit-governor-citizen-assistanceUtility-test:
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://localhost:9999/maven
>>>>>>>> Error retrieving artifact from [http://localhost:9999/maven]:
>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://localhost:9999/maven-external
>>>>>>>> Error retrieving artifact from
>>>>>>>> [http://localhost:9999/maven-external]:
>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://localhost:9999/maven-remotebox
>>>>>>>> Error retrieving artifact from
>>>>>>>> [http://localhost:9999/maven-remotebox]:
>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://localhost:9999/maven-external-indiana
>>>>>>>> Error retrieving artifact from
>>>>>>>> [http://localhost:9999/maven-external-indiana]:
>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://software.ais.pl/repository
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://download.java.net/maven/1/
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://repo1.maven.org/maven
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://people.apache.org/repo/m1-snapshot-repository/
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://mirrors.sunsite.dk/maven
>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>>>> The build cannot continue because of the following unsatisfied
>>>>>>>>>> dependency:
>>>>>>>> -
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>
>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>> BUILD FAILED
>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
>>>>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25824586.html
>>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25826148.html
>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25873112.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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


Re: Why doesn't maven look for dependency in the local repo?

Posted by laredotornado <la...@gmail.com>.
Thanks.  I'm getting closer.  I now have this in my dependency list ...

    <dependency>
        <groupId>maven-war-plugin</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>1.6.3</version>
        <type>plugin</type>
        <configuration>
          <attachClasses>true</attachClasses>
        </configuration>
    </dependency>

but I'm getting the error

>> Error parsing project.xml
>> '/Users/dalvarado/source/assistanceUtility/webapp/project.xml'
>> ParseError at [row,col]:[232,24]
Message: Unrecognised tag: 'configuration'


My goal is to build some kind of "-classes.jar" file in addition to my WAR
because when I try and include my WAR as a dependency in another test
project, maven cannot recognizes the classes inside that war.

Thanks to all, - Dave








Lukas Theussl-4 wrote:
> 
> 
> You are mixing up the maven 2 pom with maven 1's project.xml, the maven 1
> model 
> description is here:
> 
> http://maven.apache.org/maven-1.x/reference/maven-model/3.0.2/maven.html
> 
> In maven 1 you don't specify the plugins in the build section of your pom,
> you 
> either install them with 'maven plugin:install...' or declare them as
> dependencies 
> with type 'plugin'. You should browse the m1 docs (it's old!), eg
> 
> http://maven.apache.org/maven-1.x/using/managing-dependencies.html
> http://maven.apache.org/maven-1.x/using/war.html
> http://maven.apache.org/maven-1.x/plugins/war/
> 
> HTH,
> -Lukas
> 
> 
> laredotornado wrote:
>> I wanted to give you an update as to where I am with this as what you
>> included seems exactly like my problem.  However, when I included the
>> "plugins" directive in the project.xml from where I build my webapp, 
>> 
>> 
>>   <build>
>>     <plugins>
>>       <plugin>
>>         <artifactId>maven-war-plugin</artifactId>
>>         <version>1.6.3</version>
>>         <configuration>
>>           <attachClasses>true</attachClasses>
>>         </configuration>
>>       </plugin>
>>     </plugins>
>>     ...
>>   </build>
>> 
>> I get this error ...
>> 
>> maven war:war
>>  __  __
>> |  \/  |__ _Apache__ ___
>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>> 
>> -------------------------------------------------------------------------------
>>>> Error parsing project.xml
>>>> '/Users/dalvarado/source/assistanceUtility/webapp/project.xml'
>>>> ParseError at [row,col]:[231,14]
>> Message: Unrecognised tag: 'plugins'
>> -------------------------------------------------------------------------------
>> BUILD FAILED
>> -------------------------------------------------------------------------------
>> Total time   : 0 seconds 
>> Finished at  : Tuesday, October 13, 2009 7:32:52 AM MDT
>> Final Memory : 1M/2M
>> -------------------------------------------------------------------------------
>> 
>> 
>> Is "plugins" in the wrong place?  Thanks, - Dave
>> 
>> 
>> 
>> 
>> 
>> Quintin Beukes-2 wrote:
>>> Hey,
>>>
>>> This might help:
>>> http://is.gd/4bPYH
>>>
>>> If you have 2.1 of the WAR maven plugin, then it would work. Otherwise
>>> you can just use the SNAPSHOT (all described on the thread).
>>>
>>> Then, when you build it, the WAR will be installed into your local
>>> repo, as well as an additional JAR (which only has the classes).
>>>
>>> Then you can reference the WAR as a dependency in your POM, by adding
>>> the <classifier>classes</classifier> element into the <dependency>
>>> element.
>>>
>>> Quintin Beukes
>>>
>>>
>>>
>>> On Sat, Oct 10, 2009 at 12:49 PM, Quintin Beukes <qu...@skywalk.co.za>
>>> wrote:
>>>> Are you referring to this entry:
>>>> <classpathentry kind="src"
>>>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>>>
>>>> If so, try changing it to reference:
>>>> /myco-oit-governor-citizen-assistanceUtility-webapp/WEB-INF/classes
>>>>
>>>> Unless Maven notices it's a WAR, and transforms the classpath entry to
>>>> reference the classes directory, it won't work. Maybe there is a
>>>> different "kind" attribute? something like kind="war"? I tried to find
>>>> the documentation for <classpathentry>, but was unsuccessful.
>>>>
>>>> Quintin Beukes
>>>>
>>>>
>>>>
>>>> On Fri, Oct 9, 2009 at 8:50 PM, laredotornado <la...@gmail.com>
>>>> wrote:
>>>>> First off, thanks so much for taking the time to respond.  To answer
>>>>> your
>>>>> questions ...
>>>>>
>>>>>> In your classpath, is that in fact where the files are put? Can you
>>>>> confirm, from your project root, whether or not you can access those
>>>>> classes using the relative/absolute paths specified in your classpath.
>>>>>
>>>>> No where do I explicitly list a classpath . I thought that the
>>>>> classpath
>>>>> was
>>>>> built from the dependency list.  Is this not correct, or is there some
>>>>> exception for war dependencies?
>>>>>
>>>>>> Does it return anything?
>>>>> No.  there is nothing in the target/classes directory.  The class in
>>>>> question is in the war's WEB-INF/classes directory.  But if maven
>>>>> ignores
>>>>> wars, then I should resort to something else?
>>>>>
>>>>> Thanks ,- Dave
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Quintin Beukes-2 wrote:
>>>>>> In your classpath, is that in fact where the files are put? Can you
>>>>>> confirm, from your project root, whether or not you can access those
>>>>>> classes using the relative/absolute paths specified in your
>>>>>> classpath.
>>>>>>
>>>>>> Specifically, when in your project's root, type: ls -ld
>>>>>> target/classes/myco/oit/governor/citizen/assistanceUtility/Constants.class
>>>>>>
>>>>>> Does it return anything?
>>>>>>
>>>>>> Quintin Beukes
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Oct 9, 2009 at 6:59 PM, laredotornado
>>>>>> <la...@gmail.com>
>>>>>> wrote:
>>>>>>> Thanks, for now, I hard-coded the version to make this error go
>>>>>>> away.
>>>>>>> Problem now is that it doesn't seem the dependency is getting
>>>>>>> included
>>>>>>> in
>>>>>>> my
>>>>>>> classpath, because I get compilation errors (for classes that are
>>>>>>> included
>>>>>>> in the dependency in question) now when I try to run, such as ...
>>>>>>>
>>>>>>>  maven test:test
>>>>>>>  __  __
>>>>>>> |  \/  |__ _Apache__ ___
>>>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>>>
>>>>>>> build:start:
>>>>>>>
>>>>>>> test:test:
>>>>>>> java:prepare-filesystem:
>>>>>>>
>>>>>>> java:init:
>>>>>>>
>>>>>>> java:compile:
>>>>>>>    [echo] No java source files to compile.
>>>>>>>
>>>>>>> java:jar-resources:
>>>>>>>
>>>>>>> test:prepare-filesystem:
>>>>>>>
>>>>>>> test:test-resources:
>>>>>>> Copying 4 files to
>>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>>>>
>>>>>>> test:compile:
>>>>>>>    [javac] Compiling 8 source files to
>>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>>>>    [javac]
>>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/src/test/myco/oit/governor/citizen/assistanceUtility/test/env/BaseEnvTest.java:16:
>>>>>>> cannot find symbol
>>>>>>>    [javac] symbol  : class Constants
>>>>>>>    [javac] location: package
>>>>>>> myco.oit.governor.citizen.assistanceUtility
>>>>>>>    [javac] import
>>>>>>> myco.oit.governor.citizen.assistanceUtility.Constants;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I still don't think maven is looking in the right place because when
>>>>>>> I
>>>>>>> run
>>>>>>> the command "maven eclipse:generate-classpath", the generated
>>>>>>> .classpath
>>>>>>> file is looking for the repo in question,
>>>>>>> "myco-oit-governor-citizen-assistanceUtility-webapp", in another
>>>>>>> directory
>>>>>>> besides MAVEN_REPO (contents of .classpath below).  Any ideas why?
>>>>>>>
>>>>>>>
>>>>>>> <classpath>
>>>>>>>  <classpathentry kind="con"
>>>>>>> path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry>
>>>>>>>  <classpathentry output="target/test-classes" kind="src"
>>>>>>> path="src/test"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"></classpathentry>
>>>>>>>  <classpathentry kind="src"
>>>>>>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/org.springframework/jars/spring-1.2.8.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/org.springframework/jars/spring-mock-1.2.8.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-lang/jars/commons-lang-2.3.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-core-1.4.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/htmlunit-1.11.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-htmlunit-plugin-1.4.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/org.apache.regexp/jars/regexp-1.3.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/jaxen/jars/jaxen-1.1.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.0.1.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-io/jars/commons-io-1.3.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-collections/jars/commons-collections-3.2.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/js/jars/js-1.6R5.jar"></classpathentry>
>>>>>>>  <classpathentry kind="var"
>>>>>>> path="MAVEN_REPO/nekohtml/jars/nekohtml-0.9.5.jar"></classpathentry>
>>>>>>>  <classpathentry kind="output"
>>>>>>> path="target/classes"></classpathentry>
>>>>>>> </classpath>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Quintin Beukes-2 wrote:
>>>>>>>> Perhaps you meant "${project.version}" instead of
>>>>>>>> "${currentVersion}"
>>>>>>>> ?
>>>>>>>>
>>>>>>>> Quintin Beukes
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Oct 9, 2009 at 5:43 PM, laredotornado
>>>>>>>> <la...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I'm using Maven 1.1.  I have this dependency in my project.xml
>>>>>>>>> file
>>>>>>>>> ...
>>>>>>>>>
>>>>>>>>>    <dependency>
>>>>>>>>>     
>>>>>>>>> <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
>>>>>>>>>
>>>>>>>>> <artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
>>>>>>>>>      <version>${currentVersion}</version>
>>>>>>>>>      <type>war</type>
>>>>>>>>>    </dependency>
>>>>>>>>>
>>>>>>>>> However when running a maven command (e.g. maven test:test), I get
>>>>>>>>> a
>>>>>>>>> failed
>>>>>>>>> dependency error, even though the dependency exists in my local
>>>>>>>>> repo.
>>>>>>>>>  How
>>>>>>>>> do I force maven to check the local repo?
>>>>>>>>>
>>>>>>>>> maven test:test
>>>>>>>>>  __  __
>>>>>>>>> |  \/  |__ _Apache__ ___
>>>>>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>>>>>
>>>>>>>>> Trying to get missing dependencies (and updated snapshots)
>>>>>>>>> required
>>>>>>>>> by
>>>>>>>>> myco-oit-governor-citizen-assistanceUtility-test:
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://localhost:9999/maven
>>>>>>>>> Error retrieving artifact from [http://localhost:9999/maven]:
>>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://localhost:9999/maven-external
>>>>>>>>> Error retrieving artifact from
>>>>>>>>> [http://localhost:9999/maven-external]:
>>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://localhost:9999/maven-remotebox
>>>>>>>>> Error retrieving artifact from
>>>>>>>>> [http://localhost:9999/maven-remotebox]:
>>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://localhost:9999/maven-external-indiana
>>>>>>>>> Error retrieving artifact from
>>>>>>>>> [http://localhost:9999/maven-external-indiana]:
>>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://software.ais.pl/repository
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://download.java.net/maven/1/
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://repo1.maven.org/maven
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://people.apache.org/repo/m1-snapshot-repository/
>>>>>>>>> - Attempting to download
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>> from http://mirrors.sunsite.dk/maven
>>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>>>>> The build cannot continue because of the following unsatisfied
>>>>>>>>>>> dependency:
>>>>>>>>> -
>>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>>
>>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>>> BUILD FAILED
>>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
>>>>>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25824586.html
>>>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25826148.html
>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>>>
>>>
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25874002.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Why doesn't maven look for dependency in the local repo?

Posted by Lukas Theussl <lt...@apache.org>.
You are mixing up the maven 2 pom with maven 1's project.xml, the maven 1 model 
description is here:

http://maven.apache.org/maven-1.x/reference/maven-model/3.0.2/maven.html

In maven 1 you don't specify the plugins in the build section of your pom, you 
either install them with 'maven plugin:install...' or declare them as dependencies 
with type 'plugin'. You should browse the m1 docs (it's old!), eg

http://maven.apache.org/maven-1.x/using/managing-dependencies.html
http://maven.apache.org/maven-1.x/using/war.html
http://maven.apache.org/maven-1.x/plugins/war/

HTH,
-Lukas


laredotornado wrote:
> I wanted to give you an update as to where I am with this as what you
> included seems exactly like my problem.  However, when I included the
> "plugins" directive in the project.xml from where I build my webapp, 
> 
> 
>   <build>
>     <plugins>
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>1.6.3</version>
>         <configuration>
>           <attachClasses>true</attachClasses>
>         </configuration>
>       </plugin>
>     </plugins>
>     ...
>   </build>
> 
> I get this error ...
> 
> maven war:war
>  __  __
> |  \/  |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
> 
> -------------------------------------------------------------------------------
>>> Error parsing project.xml
>>> '/Users/dalvarado/source/assistanceUtility/webapp/project.xml'
>>> ParseError at [row,col]:[231,14]
> Message: Unrecognised tag: 'plugins'
> -------------------------------------------------------------------------------
> BUILD FAILED
> -------------------------------------------------------------------------------
> Total time   : 0 seconds 
> Finished at  : Tuesday, October 13, 2009 7:32:52 AM MDT
> Final Memory : 1M/2M
> -------------------------------------------------------------------------------
> 
> 
> Is "plugins" in the wrong place?  Thanks, - Dave
> 
> 
> 
> 
> 
> Quintin Beukes-2 wrote:
>> Hey,
>>
>> This might help:
>> http://is.gd/4bPYH
>>
>> If you have 2.1 of the WAR maven plugin, then it would work. Otherwise
>> you can just use the SNAPSHOT (all described on the thread).
>>
>> Then, when you build it, the WAR will be installed into your local
>> repo, as well as an additional JAR (which only has the classes).
>>
>> Then you can reference the WAR as a dependency in your POM, by adding
>> the <classifier>classes</classifier> element into the <dependency>
>> element.
>>
>> Quintin Beukes
>>
>>
>>
>> On Sat, Oct 10, 2009 at 12:49 PM, Quintin Beukes <qu...@skywalk.co.za>
>> wrote:
>>> Are you referring to this entry:
>>> <classpathentry kind="src"
>>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>>
>>> If so, try changing it to reference:
>>> /myco-oit-governor-citizen-assistanceUtility-webapp/WEB-INF/classes
>>>
>>> Unless Maven notices it's a WAR, and transforms the classpath entry to
>>> reference the classes directory, it won't work. Maybe there is a
>>> different "kind" attribute? something like kind="war"? I tried to find
>>> the documentation for <classpathentry>, but was unsuccessful.
>>>
>>> Quintin Beukes
>>>
>>>
>>>
>>> On Fri, Oct 9, 2009 at 8:50 PM, laredotornado <la...@gmail.com>
>>> wrote:
>>>> First off, thanks so much for taking the time to respond.  To answer
>>>> your
>>>> questions ...
>>>>
>>>>> In your classpath, is that in fact where the files are put? Can you
>>>> confirm, from your project root, whether or not you can access those
>>>> classes using the relative/absolute paths specified in your classpath.
>>>>
>>>> No where do I explicitly list a classpath . I thought that the classpath
>>>> was
>>>> built from the dependency list.  Is this not correct, or is there some
>>>> exception for war dependencies?
>>>>
>>>>> Does it return anything?
>>>> No.  there is nothing in the target/classes directory.  The class in
>>>> question is in the war's WEB-INF/classes directory.  But if maven
>>>> ignores
>>>> wars, then I should resort to something else?
>>>>
>>>> Thanks ,- Dave
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Quintin Beukes-2 wrote:
>>>>> In your classpath, is that in fact where the files are put? Can you
>>>>> confirm, from your project root, whether or not you can access those
>>>>> classes using the relative/absolute paths specified in your classpath.
>>>>>
>>>>> Specifically, when in your project's root, type: ls -ld
>>>>> target/classes/myco/oit/governor/citizen/assistanceUtility/Constants.class
>>>>>
>>>>> Does it return anything?
>>>>>
>>>>> Quintin Beukes
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Oct 9, 2009 at 6:59 PM, laredotornado <la...@gmail.com>
>>>>> wrote:
>>>>>> Thanks, for now, I hard-coded the version to make this error go away.
>>>>>> Problem now is that it doesn't seem the dependency is getting included
>>>>>> in
>>>>>> my
>>>>>> classpath, because I get compilation errors (for classes that are
>>>>>> included
>>>>>> in the dependency in question) now when I try to run, such as ...
>>>>>>
>>>>>>  maven test:test
>>>>>>  __  __
>>>>>> |  \/  |__ _Apache__ ___
>>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>>
>>>>>> build:start:
>>>>>>
>>>>>> test:test:
>>>>>> java:prepare-filesystem:
>>>>>>
>>>>>> java:init:
>>>>>>
>>>>>> java:compile:
>>>>>>    [echo] No java source files to compile.
>>>>>>
>>>>>> java:jar-resources:
>>>>>>
>>>>>> test:prepare-filesystem:
>>>>>>
>>>>>> test:test-resources:
>>>>>> Copying 4 files to
>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>>>
>>>>>> test:compile:
>>>>>>    [javac] Compiling 8 source files to
>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>>>    [javac]
>>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/src/test/myco/oit/governor/citizen/assistanceUtility/test/env/BaseEnvTest.java:16:
>>>>>> cannot find symbol
>>>>>>    [javac] symbol  : class Constants
>>>>>>    [javac] location: package
>>>>>> myco.oit.governor.citizen.assistanceUtility
>>>>>>    [javac] import
>>>>>> myco.oit.governor.citizen.assistanceUtility.Constants;
>>>>>>
>>>>>>
>>>>>>
>>>>>> I still don't think maven is looking in the right place because when I
>>>>>> run
>>>>>> the command "maven eclipse:generate-classpath", the generated
>>>>>> .classpath
>>>>>> file is looking for the repo in question,
>>>>>> "myco-oit-governor-citizen-assistanceUtility-webapp", in another
>>>>>> directory
>>>>>> besides MAVEN_REPO (contents of .classpath below).  Any ideas why?
>>>>>>
>>>>>>
>>>>>> <classpath>
>>>>>>  <classpathentry kind="con"
>>>>>> path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry>
>>>>>>  <classpathentry output="target/test-classes" kind="src"
>>>>>> path="src/test"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"></classpathentry>
>>>>>>  <classpathentry kind="src"
>>>>>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/org.springframework/jars/spring-1.2.8.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/org.springframework/jars/spring-mock-1.2.8.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-lang/jars/commons-lang-2.3.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-core-1.4.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/htmlunit-1.11.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-htmlunit-plugin-1.4.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/org.apache.regexp/jars/regexp-1.3.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/jaxen/jars/jaxen-1.1.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.0.1.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-io/jars/commons-io-1.3.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-collections/jars/commons-collections-3.2.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/js/jars/js-1.6R5.jar"></classpathentry>
>>>>>>  <classpathentry kind="var"
>>>>>> path="MAVEN_REPO/nekohtml/jars/nekohtml-0.9.5.jar"></classpathentry>
>>>>>>  <classpathentry kind="output" path="target/classes"></classpathentry>
>>>>>> </classpath>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Quintin Beukes-2 wrote:
>>>>>>> Perhaps you meant "${project.version}" instead of "${currentVersion}"
>>>>>>> ?
>>>>>>>
>>>>>>> Quintin Beukes
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Oct 9, 2009 at 5:43 PM, laredotornado
>>>>>>> <la...@gmail.com>
>>>>>>> wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I'm using Maven 1.1.  I have this dependency in my project.xml file
>>>>>>>> ...
>>>>>>>>
>>>>>>>>    <dependency>
>>>>>>>>      <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
>>>>>>>>
>>>>>>>> <artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
>>>>>>>>      <version>${currentVersion}</version>
>>>>>>>>      <type>war</type>
>>>>>>>>    </dependency>
>>>>>>>>
>>>>>>>> However when running a maven command (e.g. maven test:test), I get a
>>>>>>>> failed
>>>>>>>> dependency error, even though the dependency exists in my local
>>>>>>>> repo.
>>>>>>>>  How
>>>>>>>> do I force maven to check the local repo?
>>>>>>>>
>>>>>>>> maven test:test
>>>>>>>>  __  __
>>>>>>>> |  \/  |__ _Apache__ ___
>>>>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>>>>
>>>>>>>> Trying to get missing dependencies (and updated snapshots) required
>>>>>>>> by
>>>>>>>> myco-oit-governor-citizen-assistanceUtility-test:
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://localhost:9999/maven
>>>>>>>> Error retrieving artifact from [http://localhost:9999/maven]:
>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://localhost:9999/maven-external
>>>>>>>> Error retrieving artifact from
>>>>>>>> [http://localhost:9999/maven-external]:
>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://localhost:9999/maven-remotebox
>>>>>>>> Error retrieving artifact from
>>>>>>>> [http://localhost:9999/maven-remotebox]:
>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://localhost:9999/maven-external-indiana
>>>>>>>> Error retrieving artifact from
>>>>>>>> [http://localhost:9999/maven-external-indiana]:
>>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://software.ais.pl/repository
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://download.java.net/maven/1/
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://repo1.maven.org/maven
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://people.apache.org/repo/m1-snapshot-repository/
>>>>>>>> - Attempting to download
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>> from http://mirrors.sunsite.dk/maven
>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>>>> The build cannot continue because of the following unsatisfied
>>>>>>>>>> dependency:
>>>>>>>> -
>>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>>
>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>> BUILD FAILED
>>>>>>>> -------------------------------------------------------------------------------
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
>>>>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25824586.html
>>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>>>>>
>>>>>
>>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25826148.html
>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>>
> 

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


Re: Why doesn't maven look for dependency in the local repo?

Posted by laredotornado <la...@gmail.com>.
I wanted to give you an update as to where I am with this as what you
included seems exactly like my problem.  However, when I included the
"plugins" directive in the project.xml from where I build my webapp, 


  <build>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>1.6.3</version>
        <configuration>
          <attachClasses>true</attachClasses>
        </configuration>
      </plugin>
    </plugins>
    ...
  </build>

I get this error ...

maven war:war
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.1

-------------------------------------------------------------------------------
>> Error parsing project.xml
>> '/Users/dalvarado/source/assistanceUtility/webapp/project.xml'
>> ParseError at [row,col]:[231,14]
Message: Unrecognised tag: 'plugins'
-------------------------------------------------------------------------------
BUILD FAILED
-------------------------------------------------------------------------------
Total time   : 0 seconds 
Finished at  : Tuesday, October 13, 2009 7:32:52 AM MDT
Final Memory : 1M/2M
-------------------------------------------------------------------------------


Is "plugins" in the wrong place?  Thanks, - Dave





Quintin Beukes-2 wrote:
> 
> Hey,
> 
> This might help:
> http://is.gd/4bPYH
> 
> If you have 2.1 of the WAR maven plugin, then it would work. Otherwise
> you can just use the SNAPSHOT (all described on the thread).
> 
> Then, when you build it, the WAR will be installed into your local
> repo, as well as an additional JAR (which only has the classes).
> 
> Then you can reference the WAR as a dependency in your POM, by adding
> the <classifier>classes</classifier> element into the <dependency>
> element.
> 
> Quintin Beukes
> 
> 
> 
> On Sat, Oct 10, 2009 at 12:49 PM, Quintin Beukes <qu...@skywalk.co.za>
> wrote:
>> Are you referring to this entry:
>> <classpathentry kind="src"
>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>
>> If so, try changing it to reference:
>> /myco-oit-governor-citizen-assistanceUtility-webapp/WEB-INF/classes
>>
>> Unless Maven notices it's a WAR, and transforms the classpath entry to
>> reference the classes directory, it won't work. Maybe there is a
>> different "kind" attribute? something like kind="war"? I tried to find
>> the documentation for <classpathentry>, but was unsuccessful.
>>
>> Quintin Beukes
>>
>>
>>
>> On Fri, Oct 9, 2009 at 8:50 PM, laredotornado <la...@gmail.com>
>> wrote:
>>>
>>> First off, thanks so much for taking the time to respond.  To answer
>>> your
>>> questions ...
>>>
>>>> In your classpath, is that in fact where the files are put? Can you
>>> confirm, from your project root, whether or not you can access those
>>> classes using the relative/absolute paths specified in your classpath.
>>>
>>> No where do I explicitly list a classpath . I thought that the classpath
>>> was
>>> built from the dependency list.  Is this not correct, or is there some
>>> exception for war dependencies?
>>>
>>>> Does it return anything?
>>>
>>> No.  there is nothing in the target/classes directory.  The class in
>>> question is in the war's WEB-INF/classes directory.  But if maven
>>> ignores
>>> wars, then I should resort to something else?
>>>
>>> Thanks ,- Dave
>>>
>>>
>>>
>>>
>>>
>>>
>>> Quintin Beukes-2 wrote:
>>>>
>>>> In your classpath, is that in fact where the files are put? Can you
>>>> confirm, from your project root, whether or not you can access those
>>>> classes using the relative/absolute paths specified in your classpath.
>>>>
>>>> Specifically, when in your project's root, type: ls -ld
>>>> target/classes/myco/oit/governor/citizen/assistanceUtility/Constants.class
>>>>
>>>> Does it return anything?
>>>>
>>>> Quintin Beukes
>>>>
>>>>
>>>>
>>>> On Fri, Oct 9, 2009 at 6:59 PM, laredotornado <la...@gmail.com>
>>>> wrote:
>>>>>
>>>>> Thanks, for now, I hard-coded the version to make this error go away.
>>>>> Problem now is that it doesn't seem the dependency is getting included
>>>>> in
>>>>> my
>>>>> classpath, because I get compilation errors (for classes that are
>>>>> included
>>>>> in the dependency in question) now when I try to run, such as ...
>>>>>
>>>>>  maven test:test
>>>>>  __  __
>>>>> |  \/  |__ _Apache__ ___
>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>
>>>>> build:start:
>>>>>
>>>>> test:test:
>>>>> java:prepare-filesystem:
>>>>>
>>>>> java:init:
>>>>>
>>>>> java:compile:
>>>>>    [echo] No java source files to compile.
>>>>>
>>>>> java:jar-resources:
>>>>>
>>>>> test:prepare-filesystem:
>>>>>
>>>>> test:test-resources:
>>>>> Copying 4 files to
>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>>
>>>>> test:compile:
>>>>>    [javac] Compiling 8 source files to
>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>>    [javac]
>>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/src/test/myco/oit/governor/citizen/assistanceUtility/test/env/BaseEnvTest.java:16:
>>>>> cannot find symbol
>>>>>    [javac] symbol  : class Constants
>>>>>    [javac] location: package
>>>>> myco.oit.governor.citizen.assistanceUtility
>>>>>    [javac] import
>>>>> myco.oit.governor.citizen.assistanceUtility.Constants;
>>>>>
>>>>>
>>>>>
>>>>> I still don't think maven is looking in the right place because when I
>>>>> run
>>>>> the command "maven eclipse:generate-classpath", the generated
>>>>> .classpath
>>>>> file is looking for the repo in question,
>>>>> "myco-oit-governor-citizen-assistanceUtility-webapp", in another
>>>>> directory
>>>>> besides MAVEN_REPO (contents of .classpath below).  Any ideas why?
>>>>>
>>>>>
>>>>> <classpath>
>>>>>  <classpathentry kind="con"
>>>>> path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry>
>>>>>  <classpathentry output="target/test-classes" kind="src"
>>>>> path="src/test"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"></classpathentry>
>>>>>  <classpathentry kind="src"
>>>>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/org.springframework/jars/spring-1.2.8.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/org.springframework/jars/spring-mock-1.2.8.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/commons-lang/jars/commons-lang-2.3.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-core-1.4.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/htmlunit-1.11.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-htmlunit-plugin-1.4.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/org.apache.regexp/jars/regexp-1.3.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/jaxen/jars/jaxen-1.1.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.0.1.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/commons-io/jars/commons-io-1.3.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/commons-collections/jars/commons-collections-3.2.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/js/jars/js-1.6R5.jar"></classpathentry>
>>>>>  <classpathentry kind="var"
>>>>> path="MAVEN_REPO/nekohtml/jars/nekohtml-0.9.5.jar"></classpathentry>
>>>>>  <classpathentry kind="output" path="target/classes"></classpathentry>
>>>>> </classpath>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Quintin Beukes-2 wrote:
>>>>>>
>>>>>> Perhaps you meant "${project.version}" instead of "${currentVersion}"
>>>>>> ?
>>>>>>
>>>>>> Quintin Beukes
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Oct 9, 2009 at 5:43 PM, laredotornado
>>>>>> <la...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm using Maven 1.1.  I have this dependency in my project.xml file
>>>>>>> ...
>>>>>>>
>>>>>>>    <dependency>
>>>>>>>      <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
>>>>>>>
>>>>>>> <artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
>>>>>>>      <version>${currentVersion}</version>
>>>>>>>      <type>war</type>
>>>>>>>    </dependency>
>>>>>>>
>>>>>>> However when running a maven command (e.g. maven test:test), I get a
>>>>>>> failed
>>>>>>> dependency error, even though the dependency exists in my local
>>>>>>> repo.
>>>>>>>  How
>>>>>>> do I force maven to check the local repo?
>>>>>>>
>>>>>>> maven test:test
>>>>>>>  __  __
>>>>>>> |  \/  |__ _Apache__ ___
>>>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>>>
>>>>>>> Trying to get missing dependencies (and updated snapshots) required
>>>>>>> by
>>>>>>> myco-oit-governor-citizen-assistanceUtility-test:
>>>>>>> - Attempting to download
>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>> from http://localhost:9999/maven
>>>>>>> Error retrieving artifact from [http://localhost:9999/maven]:
>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>> - Attempting to download
>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>> from http://localhost:9999/maven-external
>>>>>>> Error retrieving artifact from
>>>>>>> [http://localhost:9999/maven-external]:
>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>> - Attempting to download
>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>> from http://localhost:9999/maven-remotebox
>>>>>>> Error retrieving artifact from
>>>>>>> [http://localhost:9999/maven-remotebox]:
>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>> - Attempting to download
>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>> from http://localhost:9999/maven-external-indiana
>>>>>>> Error retrieving artifact from
>>>>>>> [http://localhost:9999/maven-external-indiana]:
>>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>>> - Attempting to download
>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>> from http://software.ais.pl/repository
>>>>>>> - Attempting to download
>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>> from http://download.java.net/maven/1/
>>>>>>> - Attempting to download
>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>> from http://repo1.maven.org/maven
>>>>>>> - Attempting to download
>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>> from http://people.apache.org/repo/m1-snapshot-repository/
>>>>>>> - Attempting to download
>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>> from http://mirrors.sunsite.dk/maven
>>>>>>> -------------------------------------------------------------------------------
>>>>>>>>> The build cannot continue because of the following unsatisfied
>>>>>>>>> dependency:
>>>>>>> -
>>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>>
>>>>>>> -------------------------------------------------------------------------------
>>>>>>> BUILD FAILED
>>>>>>> -------------------------------------------------------------------------------
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
>>>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25824586.html
>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25826148.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25873112.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Why doesn't maven look for dependency in the local repo?

Posted by Quintin Beukes <qu...@skywalk.co.za>.
Hey,

This might help:
http://is.gd/4bPYH

If you have 2.1 of the WAR maven plugin, then it would work. Otherwise
you can just use the SNAPSHOT (all described on the thread).

Then, when you build it, the WAR will be installed into your local
repo, as well as an additional JAR (which only has the classes).

Then you can reference the WAR as a dependency in your POM, by adding
the <classifier>classes</classifier> element into the <dependency>
element.

Quintin Beukes



On Sat, Oct 10, 2009 at 12:49 PM, Quintin Beukes <qu...@skywalk.co.za> wrote:
> Are you referring to this entry:
> <classpathentry kind="src"
> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>
> If so, try changing it to reference:
> /myco-oit-governor-citizen-assistanceUtility-webapp/WEB-INF/classes
>
> Unless Maven notices it's a WAR, and transforms the classpath entry to
> reference the classes directory, it won't work. Maybe there is a
> different "kind" attribute? something like kind="war"? I tried to find
> the documentation for <classpathentry>, but was unsuccessful.
>
> Quintin Beukes
>
>
>
> On Fri, Oct 9, 2009 at 8:50 PM, laredotornado <la...@gmail.com> wrote:
>>
>> First off, thanks so much for taking the time to respond.  To answer your
>> questions ...
>>
>>> In your classpath, is that in fact where the files are put? Can you
>> confirm, from your project root, whether or not you can access those
>> classes using the relative/absolute paths specified in your classpath.
>>
>> No where do I explicitly list a classpath . I thought that the classpath was
>> built from the dependency list.  Is this not correct, or is there some
>> exception for war dependencies?
>>
>>> Does it return anything?
>>
>> No.  there is nothing in the target/classes directory.  The class in
>> question is in the war's WEB-INF/classes directory.  But if maven ignores
>> wars, then I should resort to something else?
>>
>> Thanks ,- Dave
>>
>>
>>
>>
>>
>>
>> Quintin Beukes-2 wrote:
>>>
>>> In your classpath, is that in fact where the files are put? Can you
>>> confirm, from your project root, whether or not you can access those
>>> classes using the relative/absolute paths specified in your classpath.
>>>
>>> Specifically, when in your project's root, type: ls -ld
>>> target/classes/myco/oit/governor/citizen/assistanceUtility/Constants.class
>>>
>>> Does it return anything?
>>>
>>> Quintin Beukes
>>>
>>>
>>>
>>> On Fri, Oct 9, 2009 at 6:59 PM, laredotornado <la...@gmail.com>
>>> wrote:
>>>>
>>>> Thanks, for now, I hard-coded the version to make this error go away.
>>>> Problem now is that it doesn't seem the dependency is getting included in
>>>> my
>>>> classpath, because I get compilation errors (for classes that are
>>>> included
>>>> in the dependency in question) now when I try to run, such as ...
>>>>
>>>>  maven test:test
>>>>  __  __
>>>> |  \/  |__ _Apache__ ___
>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>
>>>> build:start:
>>>>
>>>> test:test:
>>>> java:prepare-filesystem:
>>>>
>>>> java:init:
>>>>
>>>> java:compile:
>>>>    [echo] No java source files to compile.
>>>>
>>>> java:jar-resources:
>>>>
>>>> test:prepare-filesystem:
>>>>
>>>> test:test-resources:
>>>> Copying 4 files to
>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>
>>>> test:compile:
>>>>    [javac] Compiling 8 source files to
>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>>    [javac]
>>>> /Users/dalvarado/source/assistanceUtility.cvs/test/src/test/myco/oit/governor/citizen/assistanceUtility/test/env/BaseEnvTest.java:16:
>>>> cannot find symbol
>>>>    [javac] symbol  : class Constants
>>>>    [javac] location: package myco.oit.governor.citizen.assistanceUtility
>>>>    [javac] import myco.oit.governor.citizen.assistanceUtility.Constants;
>>>>
>>>>
>>>>
>>>> I still don't think maven is looking in the right place because when I
>>>> run
>>>> the command "maven eclipse:generate-classpath", the generated .classpath
>>>> file is looking for the repo in question,
>>>> "myco-oit-governor-citizen-assistanceUtility-webapp", in another
>>>> directory
>>>> besides MAVEN_REPO (contents of .classpath below).  Any ideas why?
>>>>
>>>>
>>>> <classpath>
>>>>  <classpathentry kind="con"
>>>> path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry>
>>>>  <classpathentry output="target/test-classes" kind="src"
>>>> path="src/test"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"></classpathentry>
>>>>  <classpathentry kind="src"
>>>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/org.springframework/jars/spring-1.2.8.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/org.springframework/jars/spring-mock-1.2.8.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/commons-lang/jars/commons-lang-2.3.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-core-1.4.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/htmlunit-1.11.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-htmlunit-plugin-1.4.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/org.apache.regexp/jars/regexp-1.3.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/jaxen/jars/jaxen-1.1.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.0.1.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/commons-io/jars/commons-io-1.3.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/commons-collections/jars/commons-collections-3.2.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/js/jars/js-1.6R5.jar"></classpathentry>
>>>>  <classpathentry kind="var"
>>>> path="MAVEN_REPO/nekohtml/jars/nekohtml-0.9.5.jar"></classpathentry>
>>>>  <classpathentry kind="output" path="target/classes"></classpathentry>
>>>> </classpath>
>>>>
>>>>
>>>>
>>>>
>>>> Quintin Beukes-2 wrote:
>>>>>
>>>>> Perhaps you meant "${project.version}" instead of "${currentVersion}" ?
>>>>>
>>>>> Quintin Beukes
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Oct 9, 2009 at 5:43 PM, laredotornado <la...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm using Maven 1.1.  I have this dependency in my project.xml file ...
>>>>>>
>>>>>>    <dependency>
>>>>>>      <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
>>>>>>
>>>>>> <artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
>>>>>>      <version>${currentVersion}</version>
>>>>>>      <type>war</type>
>>>>>>    </dependency>
>>>>>>
>>>>>> However when running a maven command (e.g. maven test:test), I get a
>>>>>> failed
>>>>>> dependency error, even though the dependency exists in my local repo.
>>>>>>  How
>>>>>> do I force maven to check the local repo?
>>>>>>
>>>>>> maven test:test
>>>>>>  __  __
>>>>>> |  \/  |__ _Apache__ ___
>>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>>
>>>>>> Trying to get missing dependencies (and updated snapshots) required by
>>>>>> myco-oit-governor-citizen-assistanceUtility-test:
>>>>>> - Attempting to download
>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>> from http://localhost:9999/maven
>>>>>> Error retrieving artifact from [http://localhost:9999/maven]:
>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>> - Attempting to download
>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>> from http://localhost:9999/maven-external
>>>>>> Error retrieving artifact from [http://localhost:9999/maven-external]:
>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>> - Attempting to download
>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>> from http://localhost:9999/maven-remotebox
>>>>>> Error retrieving artifact from [http://localhost:9999/maven-remotebox]:
>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>> - Attempting to download
>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>> from http://localhost:9999/maven-external-indiana
>>>>>> Error retrieving artifact from
>>>>>> [http://localhost:9999/maven-external-indiana]:
>>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>>> - Attempting to download
>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>> from http://software.ais.pl/repository
>>>>>> - Attempting to download
>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>> from http://download.java.net/maven/1/
>>>>>> - Attempting to download
>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>> from http://repo1.maven.org/maven
>>>>>> - Attempting to download
>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>> from http://people.apache.org/repo/m1-snapshot-repository/
>>>>>> - Attempting to download
>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>> from http://mirrors.sunsite.dk/maven
>>>>>> -------------------------------------------------------------------------------
>>>>>>>> The build cannot continue because of the following unsatisfied
>>>>>>>> dependency:
>>>>>> -
>>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>>
>>>>>> -------------------------------------------------------------------------------
>>>>>> BUILD FAILED
>>>>>> -------------------------------------------------------------------------------
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
>>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25824586.html
>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25826148.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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


Re: Why doesn't maven look for dependency in the local repo?

Posted by Quintin Beukes <qu...@skywalk.co.za>.
Are you referring to this entry:
<classpathentry kind="src"
path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>

If so, try changing it to reference:
/myco-oit-governor-citizen-assistanceUtility-webapp/WEB-INF/classes

Unless Maven notices it's a WAR, and transforms the classpath entry to
reference the classes directory, it won't work. Maybe there is a
different "kind" attribute? something like kind="war"? I tried to find
the documentation for <classpathentry>, but was unsuccessful.

Quintin Beukes



On Fri, Oct 9, 2009 at 8:50 PM, laredotornado <la...@gmail.com> wrote:
>
> First off, thanks so much for taking the time to respond.  To answer your
> questions ...
>
>> In your classpath, is that in fact where the files are put? Can you
> confirm, from your project root, whether or not you can access those
> classes using the relative/absolute paths specified in your classpath.
>
> No where do I explicitly list a classpath . I thought that the classpath was
> built from the dependency list.  Is this not correct, or is there some
> exception for war dependencies?
>
>> Does it return anything?
>
> No.  there is nothing in the target/classes directory.  The class in
> question is in the war's WEB-INF/classes directory.  But if maven ignores
> wars, then I should resort to something else?
>
> Thanks ,- Dave
>
>
>
>
>
>
> Quintin Beukes-2 wrote:
>>
>> In your classpath, is that in fact where the files are put? Can you
>> confirm, from your project root, whether or not you can access those
>> classes using the relative/absolute paths specified in your classpath.
>>
>> Specifically, when in your project's root, type: ls -ld
>> target/classes/myco/oit/governor/citizen/assistanceUtility/Constants.class
>>
>> Does it return anything?
>>
>> Quintin Beukes
>>
>>
>>
>> On Fri, Oct 9, 2009 at 6:59 PM, laredotornado <la...@gmail.com>
>> wrote:
>>>
>>> Thanks, for now, I hard-coded the version to make this error go away.
>>> Problem now is that it doesn't seem the dependency is getting included in
>>> my
>>> classpath, because I get compilation errors (for classes that are
>>> included
>>> in the dependency in question) now when I try to run, such as ...
>>>
>>>  maven test:test
>>>  __  __
>>> |  \/  |__ _Apache__ ___
>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>
>>> build:start:
>>>
>>> test:test:
>>> java:prepare-filesystem:
>>>
>>> java:init:
>>>
>>> java:compile:
>>>    [echo] No java source files to compile.
>>>
>>> java:jar-resources:
>>>
>>> test:prepare-filesystem:
>>>
>>> test:test-resources:
>>> Copying 4 files to
>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>
>>> test:compile:
>>>    [javac] Compiling 8 source files to
>>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>>    [javac]
>>> /Users/dalvarado/source/assistanceUtility.cvs/test/src/test/myco/oit/governor/citizen/assistanceUtility/test/env/BaseEnvTest.java:16:
>>> cannot find symbol
>>>    [javac] symbol  : class Constants
>>>    [javac] location: package myco.oit.governor.citizen.assistanceUtility
>>>    [javac] import myco.oit.governor.citizen.assistanceUtility.Constants;
>>>
>>>
>>>
>>> I still don't think maven is looking in the right place because when I
>>> run
>>> the command "maven eclipse:generate-classpath", the generated .classpath
>>> file is looking for the repo in question,
>>> "myco-oit-governor-citizen-assistanceUtility-webapp", in another
>>> directory
>>> besides MAVEN_REPO (contents of .classpath below).  Any ideas why?
>>>
>>>
>>> <classpath>
>>>  <classpathentry kind="con"
>>> path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry>
>>>  <classpathentry output="target/test-classes" kind="src"
>>> path="src/test"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"></classpathentry>
>>>  <classpathentry kind="src"
>>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/org.springframework/jars/spring-1.2.8.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/org.springframework/jars/spring-mock-1.2.8.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/commons-lang/jars/commons-lang-2.3.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-core-1.4.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/htmlunit-1.11.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-htmlunit-plugin-1.4.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/org.apache.regexp/jars/regexp-1.3.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/jaxen/jars/jaxen-1.1.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.0.1.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/commons-io/jars/commons-io-1.3.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/commons-collections/jars/commons-collections-3.2.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/js/jars/js-1.6R5.jar"></classpathentry>
>>>  <classpathentry kind="var"
>>> path="MAVEN_REPO/nekohtml/jars/nekohtml-0.9.5.jar"></classpathentry>
>>>  <classpathentry kind="output" path="target/classes"></classpathentry>
>>> </classpath>
>>>
>>>
>>>
>>>
>>> Quintin Beukes-2 wrote:
>>>>
>>>> Perhaps you meant "${project.version}" instead of "${currentVersion}" ?
>>>>
>>>> Quintin Beukes
>>>>
>>>>
>>>>
>>>> On Fri, Oct 9, 2009 at 5:43 PM, laredotornado <la...@gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I'm using Maven 1.1.  I have this dependency in my project.xml file ...
>>>>>
>>>>>    <dependency>
>>>>>      <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
>>>>>
>>>>> <artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
>>>>>      <version>${currentVersion}</version>
>>>>>      <type>war</type>
>>>>>    </dependency>
>>>>>
>>>>> However when running a maven command (e.g. maven test:test), I get a
>>>>> failed
>>>>> dependency error, even though the dependency exists in my local repo.
>>>>>  How
>>>>> do I force maven to check the local repo?
>>>>>
>>>>> maven test:test
>>>>>  __  __
>>>>> |  \/  |__ _Apache__ ___
>>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>>
>>>>> Trying to get missing dependencies (and updated snapshots) required by
>>>>> myco-oit-governor-citizen-assistanceUtility-test:
>>>>> - Attempting to download
>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>> from http://localhost:9999/maven
>>>>> Error retrieving artifact from [http://localhost:9999/maven]:
>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>> - Attempting to download
>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>> from http://localhost:9999/maven-external
>>>>> Error retrieving artifact from [http://localhost:9999/maven-external]:
>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>> - Attempting to download
>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>> from http://localhost:9999/maven-remotebox
>>>>> Error retrieving artifact from [http://localhost:9999/maven-remotebox]:
>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>> - Attempting to download
>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>> from http://localhost:9999/maven-external-indiana
>>>>> Error retrieving artifact from
>>>>> [http://localhost:9999/maven-external-indiana]:
>>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>>> - Attempting to download
>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>> from http://software.ais.pl/repository
>>>>> - Attempting to download
>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>> from http://download.java.net/maven/1/
>>>>> - Attempting to download
>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>> from http://repo1.maven.org/maven
>>>>> - Attempting to download
>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>> from http://people.apache.org/repo/m1-snapshot-repository/
>>>>> - Attempting to download
>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>> from http://mirrors.sunsite.dk/maven
>>>>> -------------------------------------------------------------------------------
>>>>>>> The build cannot continue because of the following unsatisfied
>>>>>>> dependency:
>>>>> -
>>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>>
>>>>> -------------------------------------------------------------------------------
>>>>> BUILD FAILED
>>>>> -------------------------------------------------------------------------------
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25824586.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25826148.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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


Problem with javadoc plugin - The PluginDescriptor for the plugin XYZ was not found. Should have been in realm:

Posted by "Villemos, Gert" <ge...@logica.com>.
We are using the Eclipse maven plugin with maven 2 and the javadoc plugin. The POM file is listed below. When we run the maven build, it fails with the error message:
 

Error message: Failed to load report plugin: org.apache.maven.plugins:maven-javadoc-plugin. Reason: Failed to load plugin. Reason: The PluginDescriptor for the plugin org.apache.maven.plugins:maven-javadoc-plugin was not found. Should have been in realm: ClassRealm[/plugins/org.apache.maven.plugins:maven-javadoc-plugin:2.3@48/thread:main, parent: null]

Root error message: The PluginDescriptor for the plugin org.apache.maven.plugins:maven-javadoc-plugin was not found. Should have been in realm: ClassRealm[/plugins/org.apache.maven.plugins:maven-javadoc-plugin:2.3@48/thread:main, parent: null]

 

We have seen this problem with other plugins recently, or example the emma-maven-plugin. Anyone know what courses this? And how to correct it?

Cheers,

Gert.

 

--------------- pom.xml -----------------------------------------------

 

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>esa.dops.game</groupId>

<artifactId>project</artifactId>

<packaging>pom</packaging>

<version>0.0.1-SNAPSHOT</version>

<modules>

<module>commons</module>

<module>crawler</module>

<module>notifier</module>

</modules>

<properties>

<log4j.version>1.2.14</log4j.version>

<spring.version>2.5.6</spring.version>

<junit.version>3.8.1</junit.version>

</properties>

<build>

<pluginManagement>

<plugins>

<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>cobertura-maven-plugin</artifactId>

<configuration>

<instrumentation>

<ignores>

<ignore>com.example.boringcode.*</ignore>

</ignores>

<excludes>

<exclude>com/example/dullcode/**/*.class</exclude>

<exclude>com/example/**/*Test.class</exclude>

</excludes>

</instrumentation>

</configuration>

<executions>

<execution>

<goals>

<goal>clean</goal>

</goals>

</execution>

</executions>

</plugin>

 

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-surefire-plugin</artifactId>

<inherited>true</inherited>

<configuration>

<forkMode>once</forkMode>

<reportFormat>xml</reportFormat>

</configuration>

</plugin>

<plugin>

<artifactId>maven-assembly-plugin</artifactId>

<configuration>

<descriptorRefs>

<descriptorRef>jar-with-dependencies</descriptorRef>

</descriptorRefs>

</configuration>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<configuration>

<source>1.5</source>

<target>1.5</target>

</configuration>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-checkstyle-plugin</artifactId>

<version>2.5</version>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-javadoc-plugin</artifactId>

<version>2.3</version>

</plugin>

 

</plugins>

</pluginManagement>

<plugins>

<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>cobertura-maven-plugin</artifactId>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-surefire-plugin</artifactId>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-javadoc-plugin</artifactId>

</plugin>

 

</plugins>

</build>

<reporting>

<plugins>

<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>cobertura-maven-plugin</artifactId>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-checkstyle-plugin</artifactId>

<version>2.3</version>

</plugin>

<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>surefire-report-maven-plugin</artifactId>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-javadoc-plugin</artifactId>

<version>2.5</version>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-jxr-plugin</artifactId>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-pmd-plugin</artifactId>

</plugin>

</plugins>

</reporting>

<dependencyManagement>

<dependencies>

<dependency>

<groupId>esa.dops.game</groupId>

<artifactId>commons</artifactId>

<version>0.0.1-SNAPSHOT</version>

</dependency>

<dependency>

<groupId>log4j</groupId>

<artifactId>log4j</artifactId>

<version>${log4j.version}</version>

</dependency>

<dependency>

<groupId>junit</groupId>

<artifactId>junit</artifactId>

<version>${junit.version}</version>

<scope>test</scope>

</dependency>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-core</artifactId>

<version>${spring.version}</version>

</dependency>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-beans</artifactId>

<version>${spring.version}</version>

</dependency>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-context</artifactId>

<version>${spring.version}</version>

</dependency>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-context-support</artifactId>

<version>${spring.version}</version>

</dependency>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-aop</artifactId>

<version>${spring.version}</version>

</dependency>

</dependencies>

</dependencyManagement>

</project>



Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


Re: Why doesn't maven look for dependency in the local repo?

Posted by laredotornado <la...@gmail.com>.
First off, thanks so much for taking the time to respond.  To answer your
questions ...

> In your classpath, is that in fact where the files are put? Can you
confirm, from your project root, whether or not you can access those
classes using the relative/absolute paths specified in your classpath.

No where do I explicitly list a classpath . I thought that the classpath was
built from the dependency list.  Is this not correct, or is there some
exception for war dependencies?

> Does it return anything? 

No.  there is nothing in the target/classes directory.  The class in
question is in the war's WEB-INF/classes directory.  But if maven ignores
wars, then I should resort to something else?

Thanks ,- Dave






Quintin Beukes-2 wrote:
> 
> In your classpath, is that in fact where the files are put? Can you
> confirm, from your project root, whether or not you can access those
> classes using the relative/absolute paths specified in your classpath.
> 
> Specifically, when in your project's root, type: ls -ld
> target/classes/myco/oit/governor/citizen/assistanceUtility/Constants.class
> 
> Does it return anything?
> 
> Quintin Beukes
> 
> 
> 
> On Fri, Oct 9, 2009 at 6:59 PM, laredotornado <la...@gmail.com>
> wrote:
>>
>> Thanks, for now, I hard-coded the version to make this error go away.
>> Problem now is that it doesn't seem the dependency is getting included in
>> my
>> classpath, because I get compilation errors (for classes that are
>> included
>> in the dependency in question) now when I try to run, such as ...
>>
>>  maven test:test
>>  __  __
>> |  \/  |__ _Apache__ ___
>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>
>> build:start:
>>
>> test:test:
>> java:prepare-filesystem:
>>
>> java:init:
>>
>> java:compile:
>>    [echo] No java source files to compile.
>>
>> java:jar-resources:
>>
>> test:prepare-filesystem:
>>
>> test:test-resources:
>> Copying 4 files to
>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>
>> test:compile:
>>    [javac] Compiling 8 source files to
>> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>>    [javac]
>> /Users/dalvarado/source/assistanceUtility.cvs/test/src/test/myco/oit/governor/citizen/assistanceUtility/test/env/BaseEnvTest.java:16:
>> cannot find symbol
>>    [javac] symbol  : class Constants
>>    [javac] location: package myco.oit.governor.citizen.assistanceUtility
>>    [javac] import myco.oit.governor.citizen.assistanceUtility.Constants;
>>
>>
>>
>> I still don't think maven is looking in the right place because when I
>> run
>> the command "maven eclipse:generate-classpath", the generated .classpath
>> file is looking for the repo in question,
>> "myco-oit-governor-citizen-assistanceUtility-webapp", in another
>> directory
>> besides MAVEN_REPO (contents of .classpath below).  Any ideas why?
>>
>>
>> <classpath>
>>  <classpathentry kind="con"
>> path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry>
>>  <classpathentry output="target/test-classes" kind="src"
>> path="src/test"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"></classpathentry>
>>  <classpathentry kind="src"
>> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/org.springframework/jars/spring-1.2.8.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/org.springframework/jars/spring-mock-1.2.8.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/commons-lang/jars/commons-lang-2.3.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-core-1.4.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/htmlunit-1.11.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-htmlunit-plugin-1.4.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/org.apache.regexp/jars/regexp-1.3.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/jaxen/jars/jaxen-1.1.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.0.1.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/commons-io/jars/commons-io-1.3.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/commons-collections/jars/commons-collections-3.2.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/js/jars/js-1.6R5.jar"></classpathentry>
>>  <classpathentry kind="var"
>> path="MAVEN_REPO/nekohtml/jars/nekohtml-0.9.5.jar"></classpathentry>
>>  <classpathentry kind="output" path="target/classes"></classpathentry>
>> </classpath>
>>
>>
>>
>>
>> Quintin Beukes-2 wrote:
>>>
>>> Perhaps you meant "${project.version}" instead of "${currentVersion}" ?
>>>
>>> Quintin Beukes
>>>
>>>
>>>
>>> On Fri, Oct 9, 2009 at 5:43 PM, laredotornado <la...@gmail.com>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm using Maven 1.1.  I have this dependency in my project.xml file ...
>>>>
>>>>    <dependency>
>>>>      <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
>>>>
>>>> <artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
>>>>      <version>${currentVersion}</version>
>>>>      <type>war</type>
>>>>    </dependency>
>>>>
>>>> However when running a maven command (e.g. maven test:test), I get a
>>>> failed
>>>> dependency error, even though the dependency exists in my local repo.
>>>>  How
>>>> do I force maven to check the local repo?
>>>>
>>>> maven test:test
>>>>  __  __
>>>> |  \/  |__ _Apache__ ___
>>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>>
>>>> Trying to get missing dependencies (and updated snapshots) required by
>>>> myco-oit-governor-citizen-assistanceUtility-test:
>>>> - Attempting to download
>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>> from http://localhost:9999/maven
>>>> Error retrieving artifact from [http://localhost:9999/maven]:
>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>> - Attempting to download
>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>> from http://localhost:9999/maven-external
>>>> Error retrieving artifact from [http://localhost:9999/maven-external]:
>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>> - Attempting to download
>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>> from http://localhost:9999/maven-remotebox
>>>> Error retrieving artifact from [http://localhost:9999/maven-remotebox]:
>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>> - Attempting to download
>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>> from http://localhost:9999/maven-external-indiana
>>>> Error retrieving artifact from
>>>> [http://localhost:9999/maven-external-indiana]:
>>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>>> - Attempting to download
>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>> from http://software.ais.pl/repository
>>>> - Attempting to download
>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>> from http://download.java.net/maven/1/
>>>> - Attempting to download
>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>> from http://repo1.maven.org/maven
>>>> - Attempting to download
>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>> from http://people.apache.org/repo/m1-snapshot-repository/
>>>> - Attempting to download
>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>> from http://mirrors.sunsite.dk/maven
>>>> -------------------------------------------------------------------------------
>>>>>> The build cannot continue because of the following unsatisfied
>>>>>> dependency:
>>>> -
>>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>>
>>>> -------------------------------------------------------------------------------
>>>> BUILD FAILED
>>>> -------------------------------------------------------------------------------
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25824586.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25826148.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Why doesn't maven look for dependency in the local repo?

Posted by Quintin Beukes <qu...@skywalk.co.za>.
In your classpath, is that in fact where the files are put? Can you
confirm, from your project root, whether or not you can access those
classes using the relative/absolute paths specified in your classpath.

Specifically, when in your project's root, type: ls -ld
target/classes/myco/oit/governor/citizen/assistanceUtility/Constants.class

Does it return anything?

Quintin Beukes



On Fri, Oct 9, 2009 at 6:59 PM, laredotornado <la...@gmail.com> wrote:
>
> Thanks, for now, I hard-coded the version to make this error go away.
> Problem now is that it doesn't seem the dependency is getting included in my
> classpath, because I get compilation errors (for classes that are included
> in the dependency in question) now when I try to run, such as ...
>
>  maven test:test
>  __  __
> |  \/  |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>
> build:start:
>
> test:test:
> java:prepare-filesystem:
>
> java:init:
>
> java:compile:
>    [echo] No java source files to compile.
>
> java:jar-resources:
>
> test:prepare-filesystem:
>
> test:test-resources:
> Copying 4 files to
> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>
> test:compile:
>    [javac] Compiling 8 source files to
> /Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
>    [javac]
> /Users/dalvarado/source/assistanceUtility.cvs/test/src/test/myco/oit/governor/citizen/assistanceUtility/test/env/BaseEnvTest.java:16:
> cannot find symbol
>    [javac] symbol  : class Constants
>    [javac] location: package myco.oit.governor.citizen.assistanceUtility
>    [javac] import myco.oit.governor.citizen.assistanceUtility.Constants;
>
>
>
> I still don't think maven is looking in the right place because when I run
> the command "maven eclipse:generate-classpath", the generated .classpath
> file is looking for the repo in question,
> "myco-oit-governor-citizen-assistanceUtility-webapp", in another directory
> besides MAVEN_REPO (contents of .classpath below).  Any ideas why?
>
>
> <classpath>
>  <classpathentry kind="con"
> path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry>
>  <classpathentry output="target/test-classes" kind="src"
> path="src/test"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"></classpathentry>
>  <classpathentry kind="src"
> path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/org.springframework/jars/spring-1.2.8.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/org.springframework/jars/spring-mock-1.2.8.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/commons-lang/jars/commons-lang-2.3.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-core-1.4.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/htmlunit-1.11.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-htmlunit-plugin-1.4.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/org.apache.regexp/jars/regexp-1.3.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/jaxen/jars/jaxen-1.1.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.0.1.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/commons-io/jars/commons-io-1.3.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/commons-collections/jars/commons-collections-3.2.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/js/jars/js-1.6R5.jar"></classpathentry>
>  <classpathentry kind="var"
> path="MAVEN_REPO/nekohtml/jars/nekohtml-0.9.5.jar"></classpathentry>
>  <classpathentry kind="output" path="target/classes"></classpathentry>
> </classpath>
>
>
>
>
> Quintin Beukes-2 wrote:
>>
>> Perhaps you meant "${project.version}" instead of "${currentVersion}" ?
>>
>> Quintin Beukes
>>
>>
>>
>> On Fri, Oct 9, 2009 at 5:43 PM, laredotornado <la...@gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> I'm using Maven 1.1.  I have this dependency in my project.xml file ...
>>>
>>>    <dependency>
>>>      <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
>>>
>>> <artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
>>>      <version>${currentVersion}</version>
>>>      <type>war</type>
>>>    </dependency>
>>>
>>> However when running a maven command (e.g. maven test:test), I get a
>>> failed
>>> dependency error, even though the dependency exists in my local repo.
>>>  How
>>> do I force maven to check the local repo?
>>>
>>> maven test:test
>>>  __  __
>>> |  \/  |__ _Apache__ ___
>>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>>
>>> Trying to get missing dependencies (and updated snapshots) required by
>>> myco-oit-governor-citizen-assistanceUtility-test:
>>> - Attempting to download
>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>> from http://localhost:9999/maven
>>> Error retrieving artifact from [http://localhost:9999/maven]:
>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>> - Attempting to download
>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>> from http://localhost:9999/maven-external
>>> Error retrieving artifact from [http://localhost:9999/maven-external]:
>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>> - Attempting to download
>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>> from http://localhost:9999/maven-remotebox
>>> Error retrieving artifact from [http://localhost:9999/maven-remotebox]:
>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>> - Attempting to download
>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>> from http://localhost:9999/maven-external-indiana
>>> Error retrieving artifact from
>>> [http://localhost:9999/maven-external-indiana]:
>>> org.apache.maven.wagon.TransferFailedException: Connection refused
>>> - Attempting to download
>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>> from http://software.ais.pl/repository
>>> - Attempting to download
>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>> from http://download.java.net/maven/1/
>>> - Attempting to download
>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>> from http://repo1.maven.org/maven
>>> - Attempting to download
>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>> from http://people.apache.org/repo/m1-snapshot-repository/
>>> - Attempting to download
>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>> from http://mirrors.sunsite.dk/maven
>>> -------------------------------------------------------------------------------
>>>>> The build cannot continue because of the following unsatisfied
>>>>> dependency:
>>> -
>>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>>
>>> -------------------------------------------------------------------------------
>>> BUILD FAILED
>>> -------------------------------------------------------------------------------
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25824586.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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


Re: Why doesn't maven look for dependency in the local repo?

Posted by laredotornado <la...@gmail.com>.
Thanks, for now, I hard-coded the version to make this error go away. 
Problem now is that it doesn't seem the dependency is getting included in my
classpath, because I get compilation errors (for classes that are included
in the dependency in question) now when I try to run, such as ...

 maven test:test
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.1

build:start:

test:test:
java:prepare-filesystem:

java:init:

java:compile:
    [echo] No java source files to compile.

java:jar-resources:

test:prepare-filesystem:

test:test-resources:
Copying 4 files to
/Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes

test:compile:
    [javac] Compiling 8 source files to
/Users/dalvarado/source/assistanceUtility.cvs/test/target/test-classes
    [javac]
/Users/dalvarado/source/assistanceUtility.cvs/test/src/test/myco/oit/governor/citizen/assistanceUtility/test/env/BaseEnvTest.java:16:
cannot find symbol
    [javac] symbol  : class Constants
    [javac] location: package myco.oit.governor.citizen.assistanceUtility
    [javac] import myco.oit.governor.citizen.assistanceUtility.Constants;



I still don't think maven is looking in the right place because when I run
the command "maven eclipse:generate-classpath", the generated .classpath
file is looking for the repo in question,
"myco-oit-governor-citizen-assistanceUtility-webapp", in another directory
besides MAVEN_REPO (contents of .classpath below).  Any ideas why?


<classpath>
  <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry>
  <classpathentry output="target/test-classes" kind="src"
path="src/test"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"></classpathentry>
  <classpathentry kind="src"
path="/myco-oit-governor-citizen-assistanceUtility-webapp"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/org.springframework/jars/spring-1.2.8.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/org.springframework/jars/spring-mock-1.2.8.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/commons-lang/jars/commons-lang-2.3.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-core-1.4.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/net.sourceforge.jwebunit/jars/htmlunit-1.11.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/net.sourceforge.jwebunit/jars/jwebunit-htmlunit-plugin-1.4.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/org.apache.regexp/jars/regexp-1.3.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/jaxen/jars/jaxen-1.1.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.0.1.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/commons-io/jars/commons-io-1.3.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/commons-collections/jars/commons-collections-3.2.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/js/jars/js-1.6R5.jar"></classpathentry>
  <classpathentry kind="var"
path="MAVEN_REPO/nekohtml/jars/nekohtml-0.9.5.jar"></classpathentry>
  <classpathentry kind="output" path="target/classes"></classpathentry>
</classpath>




Quintin Beukes-2 wrote:
> 
> Perhaps you meant "${project.version}" instead of "${currentVersion}" ?
> 
> Quintin Beukes
> 
> 
> 
> On Fri, Oct 9, 2009 at 5:43 PM, laredotornado <la...@gmail.com>
> wrote:
>>
>> Hi,
>>
>> I'm using Maven 1.1.  I have this dependency in my project.xml file ...
>>
>>    <dependency>
>>      <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
>>
>> <artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
>>      <version>${currentVersion}</version>
>>      <type>war</type>
>>    </dependency>
>>
>> However when running a maven command (e.g. maven test:test), I get a
>> failed
>> dependency error, even though the dependency exists in my local repo.
>>  How
>> do I force maven to check the local repo?
>>
>> maven test:test
>>  __  __
>> |  \/  |__ _Apache__ ___
>> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>>
>> Trying to get missing dependencies (and updated snapshots) required by
>> myco-oit-governor-citizen-assistanceUtility-test:
>> - Attempting to download
>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>> from http://localhost:9999/maven
>> Error retrieving artifact from [http://localhost:9999/maven]:
>> org.apache.maven.wagon.TransferFailedException: Connection refused
>> - Attempting to download
>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>> from http://localhost:9999/maven-external
>> Error retrieving artifact from [http://localhost:9999/maven-external]:
>> org.apache.maven.wagon.TransferFailedException: Connection refused
>> - Attempting to download
>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>> from http://localhost:9999/maven-remotebox
>> Error retrieving artifact from [http://localhost:9999/maven-remotebox]:
>> org.apache.maven.wagon.TransferFailedException: Connection refused
>> - Attempting to download
>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>> from http://localhost:9999/maven-external-indiana
>> Error retrieving artifact from
>> [http://localhost:9999/maven-external-indiana]:
>> org.apache.maven.wagon.TransferFailedException: Connection refused
>> - Attempting to download
>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>> from http://software.ais.pl/repository
>> - Attempting to download
>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>> from http://download.java.net/maven/1/
>> - Attempting to download
>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>> from http://repo1.maven.org/maven
>> - Attempting to download
>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>> from http://people.apache.org/repo/m1-snapshot-repository/
>> - Attempting to download
>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>> from http://mirrors.sunsite.dk/maven
>> -------------------------------------------------------------------------------
>>>> The build cannot continue because of the following unsatisfied
>>>> dependency:
>> -
>> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>>
>> -------------------------------------------------------------------------------
>> BUILD FAILED
>> -------------------------------------------------------------------------------
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25824586.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Why doesn't maven look for dependency in the local repo?

Posted by Quintin Beukes <qu...@skywalk.co.za>.
Perhaps you meant "${project.version}" instead of "${currentVersion}" ?

Quintin Beukes



On Fri, Oct 9, 2009 at 5:43 PM, laredotornado <la...@gmail.com> wrote:
>
> Hi,
>
> I'm using Maven 1.1.  I have this dependency in my project.xml file ...
>
>    <dependency>
>      <groupId>myco.oit.governor.citizen.assistanceUtility</groupId>
>
> <artifactId>myco-oit-governor-citizen-assistanceUtility-webapp</artifactId>
>      <version>${currentVersion}</version>
>      <type>war</type>
>    </dependency>
>
> However when running a maven command (e.g. maven test:test), I get a failed
> dependency error, even though the dependency exists in my local repo.  How
> do I force maven to check the local repo?
>
> maven test:test
>  __  __
> |  \/  |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.1
>
> Trying to get missing dependencies (and updated snapshots) required by
> myco-oit-governor-citizen-assistanceUtility-test:
> - Attempting to download
> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
> from http://localhost:9999/maven
> Error retrieving artifact from [http://localhost:9999/maven]:
> org.apache.maven.wagon.TransferFailedException: Connection refused
> - Attempting to download
> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
> from http://localhost:9999/maven-external
> Error retrieving artifact from [http://localhost:9999/maven-external]:
> org.apache.maven.wagon.TransferFailedException: Connection refused
> - Attempting to download
> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
> from http://localhost:9999/maven-remotebox
> Error retrieving artifact from [http://localhost:9999/maven-remotebox]:
> org.apache.maven.wagon.TransferFailedException: Connection refused
> - Attempting to download
> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
> from http://localhost:9999/maven-external-indiana
> Error retrieving artifact from
> [http://localhost:9999/maven-external-indiana]:
> org.apache.maven.wagon.TransferFailedException: Connection refused
> - Attempting to download
> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
> from http://software.ais.pl/repository
> - Attempting to download
> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
> from http://download.java.net/maven/1/
> - Attempting to download
> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
> from http://repo1.maven.org/maven
> - Attempting to download
> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
> from http://people.apache.org/repo/m1-snapshot-repository/
> - Attempting to download
> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
> from http://mirrors.sunsite.dk/maven
> -------------------------------------------------------------------------------
>>> The build cannot continue because of the following unsatisfied
>>> dependency:
> -
> myco.oit.governor.citizen.assistanceUtility:myco-oit-governor-citizen-assistanceUtility-webapp::war
>
> -------------------------------------------------------------------------------
> BUILD FAILED
> -------------------------------------------------------------------------------
>
> --
> View this message in context: http://www.nabble.com/Why-doesn%27t-maven-look-for-dependency-in-the-local-repo--tp25823180p25823180.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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