[ 
http://jira.codehaus.org/browse/MNG-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133038#action_133038
 ] 

Joshua Pollak commented on MNG-2045:
------------------------------------

I don't think this bug is fixed.

If I download sample.zip and run 'mvn test-compile', I get the following:

[EMAIL PROTECTED]:~/src$ cd sample/
[EMAIL PROTECTED]:~/src/sample$ ls
pom.xml         sample-jar      sample-jar-user
[EMAIL PROTECTED]:~/src/sample$ mvn test-compile
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   Unnamed - sample-project:sample-parent:pom:SNAPSHOT
[INFO]   Maven Quick Start Archetype
[INFO]   Maven Quick Start Archetype
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - sample-project:sample-parent:pom:SNAPSHOT
[INFO]    task-segment: [test-compile]
[INFO] ------------------------------------------------------------------------
[INFO] No goals needed for project - skipping
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Quick Start Archetype
[INFO]    task-segment: [test-compile]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Quick Start Archetype
[INFO]    task-segment: [test-compile]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) sample-project:sample-jar:test-jar:tests:SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=sample-project -DartifactId=sample-jar 
-Dversion=SNAPSHOT -Dclassifier=tests -Dpackaging=test-jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=sample-project -DartifactId=sample-jar 
-Dversion=SNAPSHOT -Dclassifier=tests -Dpackaging=test-jar -Dfile=/path/to/file 
-Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
        1) sample-project:sample-jar-user:jar:SNAPSHOT
        2) sample-project:sample-jar:test-jar:tests:SNAPSHOT

----------
1 required artifact is missing.

for artifact: 
  sample-project:sample-jar-user:jar:SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Tue Apr 29 18:55:27 EDT 2008
[INFO] Final Memory: 3M/6M
[INFO] ------------------------------------------------------------------------



> Maven can't compile against sibling test-jar dependency in multiproject (Test 
> Attached)
> ---------------------------------------------------------------------------------------
>
>                 Key: MNG-2045
>                 URL: http://jira.codehaus.org/browse/MNG-2045
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.2
>         Environment: WinXP
>            Reporter: Brian Fox
>            Assignee: Brian Fox
>             Fix For: 2.0.8
>
>         Attachments: it1021.tar.gz, mng-2045-ittest.zip, 
> MNG-2045-maven-project-r577340.patch1, MNG-2045-maven-project-r577340.patch2, 
> sample.zip
>
>
> I have 2 projects under a parent like so:
> --Parent
>         --- sample-jar
>         --- sample-jar-user
> sample-jar builds and installs a test-jar along with the normal jar. 
> sample-jar-user depends on the test-jar at compile time. When I build from 
> the parent folder, the build fails because it can't find the class. When I go 
> to sample-jar-user and build, it works fine.
> In the attached test case, to reproduce:
> from the root folder, run mvn clean install - See it fail.
> cd sample-jar-user; mvn clean install - see it succeed.
> I remember reading somewhere that in multiprojects, maven attempts to locate 
> the sibling classes in the source tree instead of using the jars from the 
> repository. I'm guessing the problem is here that it's not looking in 
> ../sample-jar/target/test-classes for this code, but really one should expect 
> this to come from the repository.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to