Obivously maven doesn't like custom scopes... this is obviously the root of the problem.
I'm able to get it to resolve all of the dependencies and have them all in the list by passing in the list of custom scopes to DefaultProjectDependenciesResolver (which is a public maven thing) - and it works fine... I go from having 1 dependency in the RSL case to having all 40 dependencies... What isn't working, however, is that it seems to the scopes to all of those dependencies to runtime. Here's an example of the set of dependencies when using a normal swc library without an RSL scope: [info.rvin.itest.transitive-rsl-dependency:B:swc:1.0-SNAPSHOT:compile, com.adobe.flex.framework:air-framework:pom:4.5.0.18623:compile, com.adobe.flex.framework:common-framework:pom:4.5.0.18623:compile, com.adobe.flex.framework:advancedgrids:swc:4.5.0.18623:compile, com.adobe.flex.framework:authoringsupport:swc:4.5.0.18623:compile, com.adobe.flex.framework:charts:swc:4.5.0.18623:compile, com.adobe.flex.framework:core:swc:4.5.0.18623:compile, com.adobe.flex.framework:flash-integration:swc:4.5.0.18623:compile, com.adobe.flex.framework:framework:swc:4.5.0.18623:compile, com.adobe.flex.framework:mx:swc:4.5.0.18623:compile, com.adobe.flex.framework:osmf:swc:4.5.0.18623:compile, com.adobe.flex.framework:rpc:swc:4.5.0.18623:compile, com.adobe.flex.framework:spark:swc:4.5.0.18623:compile, com.adobe.flex.framework:sparkskins:swc:4.5.0.18623:compile, com.adobe.flex.framework:spark_dmv:swc:4.5.0.18623:compile, com.adobe.flex.framework:textLayout:swc:4.5.0.18623:compile, com.adobe.flex.framework:framework:zip:configs:4.5.0.18623:compile, com.adobe.flex.framework:advancedgrids:rb.swc:4.5.0.18623:compile, com.adobe.flex.framework:charts:rb.swc:4.5.0.18623:compile, com.adobe.flex.framework:framework:rb.swc:4.5.0.18623:compile, com.adobe.flex.framework:mx:rb.swc:4.5.0.18623:compile, com.adobe.flex.framework:osmf:rb.swc:4.5.0.18623:compile, com.adobe.flex.framework:rpc:rb.swc:4.5.0.18623:compile, com.adobe.flex.framework:spark:rb.swc:4.5.0.18623:compile, com.adobe.flex.framework:textLayout:rb.swc:4.5.0.18623:compile, com.adobe.flex.framework:flash-integration:rb.swc:4.5.0.18623:compile, com.adobe.flex.framework:aircore:swc:4.5.0.18623:compile, com.adobe.flex.framework:airframework:swc:4.5.0.18623:compile, com.adobe.flex.framework:airglobal:swc:4.5.0.18623:compile, com.adobe.flex.framework:airspark:swc:4.5.0.18623:compile, com.adobe.flex.framework:applicationupdater:swc:4.5.0.18623:compile, com.adobe.flex.framework:applicationupdater_ui:swc:4.5.0.18623:compile, com.adobe.flex.framework:servicemonitor:swc:4.5.0.18623:compile, com.adobe.flex.framework:airframework:rb.swc:4.5.0.18623:compile, com.adobe.flex.framework:airspark:rb.swc:4.5.0.18623:compile, info.rvin.itest.transitive-rsl-dependency:A:swc:1.0-SNAPSHOT:compile, com.adobe.flex.framework:flex-framework:pom:4.5.0.18623:compile, com.adobe.flex.framework:playerglobal:swc:10.2:4.5.0.18623:compile, com.adobe.flex.framework:playerglobal:rb.swc:4.5.0.18623:compile, info.rvin.itest.transitive-rsl-dependency:internalLib:swc:1.0-SNAPSHOT:runtime] As you can see, pretty much everything is in the compile scope - and in that scope it will all compile fine and the world will be happy. Things get strange when you throw the RSL scope on the dependency. Like I said, I've gotten past the problem where it wont resolve them - but take a look at this set<Artifact>: [info.rvin.itest.transitive-rsl-dependency:B:swc:1.0-SNAPSHOT:rsl, com.adobe.flex.framework:air-framework:pom:4.5.0.18623:runtime, com.adobe.flex.framework:common-framework:pom:4.5.0.18623:runtime, com.adobe.flex.framework:advancedgrids:swc:4.5.0.18623:runtime, com.adobe.flex.framework:authoringsupport:swc:4.5.0.18623:runtime, com.adobe.flex.framework:charts:swc:4.5.0.18623:runtime, com.adobe.flex.framework:core:swc:4.5.0.18623:runtime, com.adobe.flex.framework:flash-integration:swc:4.5.0.18623:runtime, com.adobe.flex.framework:framework:swc:4.5.0.18623:runtime, com.adobe.flex.framework:mx:swc:4.5.0.18623:runtime, com.adobe.flex.framework:osmf:swc:4.5.0.18623:runtime, com.adobe.flex.framework:rpc:swc:4.5.0.18623:runtime, com.adobe.flex.framework:spark:swc:4.5.0.18623:runtime, com.adobe.flex.framework:sparkskins:swc:4.5.0.18623:runtime, com.adobe.flex.framework:spark_dmv:swc:4.5.0.18623:runtime, com.adobe.flex.framework:textLayout:swc:4.5.0.18623:runtime, com.adobe.flex.framework:framework:zip:configs:4.5.0.18623:runtime, com.adobe.flex.framework:advancedgrids:rb.swc:4.5.0.18623:runtime, com.adobe.flex.framework:charts:rb.swc:4.5.0.18623:runtime, com.adobe.flex.framework:framework:rb.swc:4.5.0.18623:runtime, com.adobe.flex.framework:mx:rb.swc:4.5.0.18623:runtime, com.adobe.flex.framework:osmf:rb.swc:4.5.0.18623:runtime, com.adobe.flex.framework:rpc:rb.swc:4.5.0.18623:runtime, com.adobe.flex.framework:spark:rb.swc:4.5.0.18623:runtime, com.adobe.flex.framework:textLayout:rb.swc:4.5.0.18623:runtime, com.adobe.flex.framework:flash-integration:rb.swc:4.5.0.18623:runtime, com.adobe.flex.framework:aircore:swc:4.5.0.18623:runtime, com.adobe.flex.framework:airframework:swc:4.5.0.18623:runtime, com.adobe.flex.framework:airglobal:swc:4.5.0.18623:runtime, com.adobe.flex.framework:airspark:swc:4.5.0.18623:runtime, com.adobe.flex.framework:applicationupdater:swc:4.5.0.18623:runtime, com.adobe.flex.framework:applicationupdater_ui:swc:4.5.0.18623:runtime, com.adobe.flex.framework:servicemonitor:swc:4.5.0.18623:runtime, com.adobe.flex.framework:airframework:rb.swc:4.5.0.18623:runtime, com.adobe.flex.framework:airspark:rb.swc:4.5.0.18623:runtime, info.rvin.itest.transitive-rsl-dependency:A:swc:1.0-SNAPSHOT:runtime, com.adobe.flex.framework:flex-framework:pom:4.5.0.18623:runtime, com.adobe.flex.framework:playerglobal:swc:10.2:4.5.0.18623:runtime, com.adobe.flex.framework:playerglobal:rb.swc:4.5.0.18623:runtime, info.rvin.itest.transitive-rsl-dependency:internalLib:swc:1.0-SNAPSHOT:runtime] Everything becomes a runtime dependency. I don't think this is the correct behavior. One thing I've thought about doing would be to trick maven into acting properly by ADDING IN another dependency in scope <compile> for each RSL, and then once the dependencies are resolved - going in and removing each of those that were added in (but leaving their transitive dependencies). (But I haven't spent a lot of time thinking about it yet) It's pretty obvious that maven hates custom scopes - so much so that they are threatening with a warning to stop even compiling projects that have them defined: [WARNING] [WARNING] Some problems were encountered while building the effective model for info.rvin.itest:simple-rsl-transitive-application:swf:1.0-SNAPSHOT [WARNING] 'dependencies.dependency.scope' for info.rvin.itest.transitive-rsl-dependency:B:swc must be one of [provided, compile, runtime, test, system] but is 'rsl'. @ line 41, column 11 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] I think it is also important to put enough pressure on maven to at least not go through with their threat of forcing projects with custom scopes to not build. On a positive note, I have determined that it is quite easy to replace the set of resolved dependencies so it is possible to fix this behavior without requiring maven to be patched. On Wed, Dec 1, 2010 at 9:57 AM, Marvin Froeder <[email protected]> wrote: > No, at the moment it assume ${project.version} > > On Wed, Dec 1, 2010 at 2:34 PM, Ryan Gardner <[email protected]> wrote: >> >> I suppose that's possible - the main maven I'm launching does match >> since it will hit breakpoints when it starts doing its normal maven >> stuff, but once it starts the test runs and starts executing the >> second maven instance is when it no longer stops at any breakpoints. >> >> I'll go check that the tests are running with 3.0.1. >> >> The integration test that shows the rsl scope transitive dependency >> issue is here: >> >> >> https://github.com/ryangardner/flexmojos/commit/a4a6b7940ec8de1292eec97e21cfba50363c47fc >> >> I basically set up an app that has a main.mxml that has a script that >> references stuff that is included in transitive dependencies but not >> direct dependencies. If you take of the <scope>rsl</scope> it should >> compile just fine, but with the rsl scope on its direct dependency it >> gives a compiler error because the things it is trying to reference >> aren't found. >> >> Is there an easy way to specify the values of the %{flexmojos.version} >> (etc) parameters if I want to go in and run the test project from the >> command line directly and not as part of a verifier test? >> >> Ryan >> >> On Wed, Dec 1, 2010 at 9:10 AM, Marvin Froeder <[email protected]> wrote: >> > The maven version you are to rumo probably doesn"t march the one you has >> > the >> > sources >> > >> > Sent from DROID >> > >> > Em 01/12/2010 02:55, "Ryan Gardner" <[email protected]>escreveu: >> > >> > Ah. I can poke in the maven core a bit and figure out what the problem >> > is. >> > >> > If it is related to the custom scopes I did see where the set of >> > resolved >> > artifacts can be set on the project and some ways to do the resolution >> > ourselves in the mojo execution using a public helper that maven has in >> > the >> > core... I implemented something but a quick test still failed and I >> > haven't >> > had a chance to look more into it. >> > >> > I committed a test case to a new branch on github that currently fails. >> > >> > Do you know an easy way to get the pom based tests to run and debug the >> > maven execution being run as a test? I can run maven and attach to my >> > debugger but once it gets into executing the test cases none of my >> > breakpoints get hit (does it execute in a different jvm or something?) >> > >> > I went to run the pom for that test case directly but it has many places >> > where it is using placeholder variables for the versions currently. Is >> > there >> > a way to pass in those values as parameters so that it will run? If not >> > I >> > will just find and replace manually tomorrow on a copy of it so I can >> > run it >> > in a debugger-attached maven and take a closer look at what is going on. >> > >> > Ryan >> > >> > On Nov 30, 2010 5:34 PM, "Marvin Froeder" <[email protected]> wrote: >> > >> > -- >> > >> > You received this message because you are subscribed to the Google >> > Groups "Flex Mojos" group. >> > To pos... >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "Flex Mojos" group. >> > To post to this group, send email to [email protected] >> > To unsubscribe from this group, send email to >> > [email protected] >> > For more options, visit this group at >> > http://groups.google.com/group/flex-mojos >> > >> > http://flexmojos.sonatype.org/ >> > >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Flex Mojos" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/flex-mojos >> >> http://flexmojos.sonatype.org/ > > -- > You received this message because you are subscribed to the Google > Groups "Flex Mojos" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/flex-mojos > > http://flexmojos.sonatype.org/ > -- You received this message because you are subscribed to the Google Groups "Flex Mojos" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex-mojos http://flexmojos.sonatype.org/
