[jira] Issue Comment Edited: (MNG-2871) Subartifact (ejb-client for example) are not reselved as active project artifacts

2007-08-22 Thread Piotr Tabor (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-2871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_105485
 ] 

Piotr Tabor edited comment on MNG-2871 at 8/22/07 9:44 PM:
---

Clean (i hope) view of this issue:

The problem could be called "internal dependencies" in reactor when everything 
is build by phase lower then "package". The real
jar's for such a dependencies like client-jar or test-jar are created and 
attached to original artifacts in "package" phase.  
So if we call "mvn test" for a parent pom we will not get this (client-jar, 
test-jar) files build - so the dependencies will not be resolved internally... 
They 
will be resolved from repository (if they exist there - so not actual version 
may be used) or the build will fail.  

I see there two options: 
a) Close this bug as WON'T BE FIXED (because it's design issue) and 
answer is 'don't call "mvn test"' to do the tests... call 
 mvn package instead. 
 
 at least we can add warning in a such a case: "Dependency ... has 
not been resolved internally. Calling 'mvn package' or greater phase may 
resolve your problem."  If we decide to this solution, I can prepare such a 
patch.

or

b) Apply currently attached patches  (MNG-2871-maven-project.diff, 
MNG-2871-core-integration-testing-2.diff) that
will make things much better in case of ejb and ejb-client artifacts (that is 
IMHO the most frequent and important usage of attached artifact). 
I don't like exception's, but it may be worth. The main disadvantages are that 
it is exception and that we will provide more then client would need (declared 
ejb-client but we will link to whole jar).  

The problem is most annoying because maven-release-plugin calls "mvn test" 
after upgrading version's number... So it leads to 
"mvn release:prepare" failure in case of ejb-client dependencies. 


 was:
Clean (i hope) view of this issue:

The problem could be called "internal dependencies" in reactor when everything 
is build by phase lower then "package". The real
jar's for such a dependencies like client-jar or test-jar are created and 
attached to original artifacts in "package" phase.  
So if we call "mvn test" for a parent pom we will not get this (client-jar, 
test-jar) files build - so the dependencies will not be resolved internally... 
They 
will be resolved from repository (if they exist there - so not actual version 
may be used) or the build will fail.  

I see there two options: 
a) Close this bug as WON'T BE FIXED (because it's design issue) and 
answer is 'don't call "mvn test"' to do the tests... call 
 mvn package instead. 
 
 at least we can add warning in a such a case: "Dependency ... has 
not been resolved internally. Calling 'mvn package' or greater phase may 
resolve your problem."  If we decide to this solution, I can prepare such a 
patch.

or

b) Apply currently attached patches  (MNG-2871-maven-project.diff, 
MNG-2871-core-integration-testing-2.diff) that
will make things much better in case of ejb and ejb-client artifacts (that is 
IMHO the most frequent and important usage of attached artifact). 
I don't like exception's, but it may be worth. The main disadvantages are that 
it is exception and that we will provide more then client would need.  

The problem is most annoying because maven-release-plugin calls "mvn test" 
after upgrading version's number... So it leads to 
"mvn release:prepare" failure in case of ejb-client dependencies. 

> Subartifact (ejb-client for example) are not reselved as active project 
> artifacts
> -
>
> Key: MNG-2871
> URL: http://jira.codehaus.org/browse/MNG-2871
> Project: Maven 2
>  Issue Type: Bug
>  Components: Dependencies
>Affects Versions: 2.0.4, 2.0.5
> Environment: Not platform dependent
>Reporter: Piotr Tabor
>Assignee: John Casey
> Fix For: 2.1-alpha-1
>
> Attachments: MavenProject.java, 
> MNG-2871-core-integration-testing-2.diff, 
> MNG-2871-core-integration-tests.diff, MNG-2871-maven-project.diff, root.tar
>
>
> I have prepared simple project to show the bug.
> It contains three artifacts: 
> |-root
> \--- ejb3
> \--- client
> Client depends on ejb3 with ejb-client.
> The local and remote repository must not contain those artifacts. 
> When I do "mvn -X compile" (or even integration-tests) on root project I will
> get those errors: 
> ...
> [DEBUG] Configuring mojo 
> 'org.apache.maven.plugins:maven-resources-plugin:2.2:resources' -->
> [DEBUG] (f) filters = []
> [DEBUG] (f) outputDirectory = /home/ptab/m2/bug/root/client/target/classes
> [DEBUG] (f) project = [EMAIL PROTECTED]
> [DEBUG] (f) resources = [EMAIL PROTECTED]
> [DEBUG] -- end configurat

[jira] Issue Comment Edited: (MNG-2871) Subartifact (ejb-client for example) are not reselved as active project artifacts

2007-06-02 Thread Piotr Tabor (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-2871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_98088
 ] 

Piotr Tabor edited comment on MNG-2871 at 6/2/07 7:48 AM:
--

New integrating tests for the issue (ejb-client) and (test-jar) attached. 

ejb-client test passes.  
test-jar test fails. 

The dependency types (classifiers) are the most popular... but the problem 
probably touch all classified (sub-)dependences. 


 was:
New integrating tests for the issue (ejb-client) and (test-jar)

> Subartifact (ejb-client for example) are not reselved as active project 
> artifacts
> -
>
> Key: MNG-2871
> URL: http://jira.codehaus.org/browse/MNG-2871
> Project: Maven 2
>  Issue Type: Bug
>  Components: Dependencies
>Affects Versions: 2.0.4, 2.0.5
> Environment: Not platform dependent
>Reporter: Piotr Tabor
>Assignee: John Casey
> Fix For: 2.1-alpha-1
>
> Attachments: MavenProject.java, MNG-2871-core-integration-tests.diff, 
> root.tar
>
>
> I have prepared simple project to show the bug.
> It contains three artifacts: 
> |-root
> \--- ejb3
> \--- client
> Client depends on ejb3 with ejb-client.
> The local and remote repository must not contain those artifacts. 
> When I do "mvn -X compile" (or even integration-tests) on root project I will
> get those errors: 
> ...
> [DEBUG] Configuring mojo 
> 'org.apache.maven.plugins:maven-resources-plugin:2.2:resources' -->
> [DEBUG] (f) filters = []
> [DEBUG] (f) outputDirectory = /home/ptab/m2/bug/root/client/target/classes
> [DEBUG] (f) project = [EMAIL PROTECTED]
> [DEBUG] (f) resources = [EMAIL PROTECTED]
> [DEBUG] -- end configuration --
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [DEBUG] pl.waw.tabor:client:jar:1.0-SNAPSHOT (selected for null)
> [DEBUG] junit:junit:jar:3.8.1:test (selected for test)
> [DEBUG] pl.waw.tabor:ejb3:ejb-client:client:1.0-SNAPSHOT:compile (selected 
> for compile)
> [DEBUG] Skipping disabled repository Newitech-repository
> [DEBUG] Skipping disabled repository central
> [DEBUG] ejb3: using locally installed snapshot
> [DEBUG] Trying repository Newitech-snapshots-repository
> Downloading: 
> scp://ivy.newitech.com/opt/maven/public_html/repozytoria/newitech-snapshots/pl/waw/tabor/ejb3/1.0-SNAPSHOT/ejb3-1.0-SNAPSHOT-client.jar
> [WARNING] Unable to get resource 
> 'pl.waw.tabor:ejb3:ejb-client:client:1.0-SNAPSHOT' from repository 
> Newitech-snapshots-repository 
> (scp://ivy.newitech.com/opt/maven/public_html/repozytoria/newitech-snapshots)
> [DEBUG] Skipping disabled repository Newitech-repository
> [DEBUG] Trying repository Newitech-publiczne
> Downloading: 
> scp://ivy.newitech.com/opt/maven/public_html/repozytoria/publiczne//pl/waw/tabor/ejb3/1.0-SNAPSHOT/ejb3-1.0-SNAPSHOT-client.jar
> [WARNING] Unable to get resource 
> 'pl.waw.tabor:ejb3:ejb-client:client:1.0-SNAPSHOT' from repository 
> Newitech-publiczne 
> (scp://ivy.newitech.com/opt/maven/public_html/repozytoria/publiczne/)
> [DEBUG] Trying repository Maven Snapshots
> Downloading: 
> http://people.apache.org/maven-snapshot-repository/pl/waw/tabor/ejb3/1.0-SNAPSHOT/ejb3-1.0-SNAPSHOT-client.jar
> [WARNING] Unable to get resource 
> 'pl.waw.tabor:ejb3:ejb-client:client:1.0-SNAPSHOT' from repository Maven 
> Snapshots (http://people.apache.org/maven-snapshot-repository)
> [DEBUG] Trying repository codehausSnapshots
> Downloading: 
> http://snapshots.maven.codehaus.org/maven2/pl/waw/tabor/ejb3/1.0-SNAPSHOT/ejb3-1.0-SNAPSHOT-client.jar
> [WARNING] Unable to get resource 
> 'pl.waw.tabor:ejb3:ejb-client:client:1.0-SNAPSHOT' from repository 
> codehausSnapshots (http://snapshots.maven.codehaus.org/maven2)
> [DEBUG] Skipping disabled repository central
> [DEBUG] Unable to download the artifact from any repository
> Try downloading the file manually from the project website.
> Then, install it using the command:
> mvn install:install-file -DgroupId=pl.waw.tabor -DartifactId=ejb3 \
> -Dversion=1.0-SNAPSHOT -Dpackaging=ejb-client -Dfile=/path/to/file
> Path to dependency:
> 1) pl.waw.tabor:client:jar:1.0-SNAPSHOT
> 2) pl.waw.tabor:ejb3:ejb-client:client:1.0-SNAPSHOT
> pl.waw.tabor:ejb3:ejb-client:1.0-SNAPSHOT
> from the specified remote repositories:
> Maven Snapshots (http://people.apache.org/maven-snapshot-repository),
> central (http://repo1.maven.org/maven2),
> codehausSnapshots (http://snapshots.maven.codehaus.org/maven2),
> Newitech-snapshots-repository 
> (scp://ivy.newitech.com/opt/maven/public_html/repozytoria/newitech-snapshots),
> Newitech-publiczne 
> (scp://ivy.newitech.com/opt/maven/public_html/repozytoria/publiczne/),
> Newitech-repository 
> (scp://ivy.newitech.com/opt/maven/public_html/repozytoria/newitech)
> [INFO] 
> ---