With regards to flex-mojos/flexunit4/asmock0.9 integration I would like to say that as Martin suggested it works fine without include. Include which is recommended by asmock documentation is needed for FlexBuilder because it builds all applications at once and throws all not used classes out. So you need to force it to include that class.
But flexmojos "include" element results in including the class in compile scope while the asmock dependency swcs are in test scope only in this case. That's the reason for the error. So you don't need to use "include" element. Somehow asmock.integration.flexunit.ASMockClassRunner is included by test-compile goal. And sure you don't need to declare dependencies inside plugin element for that. Declare dependencies as usual. 2010/2/21 Marvin Froeder <[email protected]> > Would be really nice if you could with some instructions for people trying > to use asmock and flexmojos. > > > VELO > > On Sun, Feb 21, 2010 at 4:04 PM, mr2dark <[email protected]> wrote: > >> Yes, without include it works. Thanks. >> Include is recommended by asmock documentation but flexmojos "include" >> element results in including the class in compile scope while the >> asmock swcs are in test scope only. That's the reason for the error. >> >> On 16 дек 2009, 19:03, velo <[email protected]> wrote: >> > W8, you don't need to declare that include... try w/o it. >> > >> > VELO >> > >> > On Dec 16, 1:59 pm, Davis Ford <[email protected]> wrote: >> > >> > >> > >> > > I didn't have the deps inside the plugin configuration originally and >> then I >> > > tried that after it couldn't resolve the include. >> > >> > > On Wed, Dec 16, 2009 at 10:45 AM, velo <[email protected]> wrote: >> > > > Hrmmm, maven usage issue... >> > >> > > > When you need to add a new dependency to your project, where should >> > > > you add it? I quite sure it is not on flexmojos =D >> > >> > > > So move this dependencies and try again. >> > >> > > > VELO >> > >> > > > On Dec 16, 1:39 pm, Davis Ford <[email protected]> >> wrote: >> > > > > Hi, I'm trying to setup the flexunit4 asmock test runner. The >> guide is >> > > > > here: >> > >> > > > > >> http://sourceforge.net/apps/mediawiki/asmock/index.php?title=Installa... >> > >> > > > > So, my test case starts like this: >> > >> > > > > [RunWith("asmock.integration.flexunit.ASMockClassRunner")] >> > > > > [Mock("tracer.IView")] >> > > > > public class TracerPresenterTest >> > > > > { >> > > > > .... >> > >> > > > > My flexmojos configuration is pasted below. I added an explicit >> > > > dependency >> > > > > on the asmock swc's and I added an <import> for the class, but >> when I run >> > > > > the test I get: >> > >> > > > > [ERROR] Unable to resolve a class for include: >> > > > > asmock.integration.flexunit:ASMockClassRunner. >> > >> > > > > Any ideas? >> > >> > > > > Regards, >> > > > > Davis >> > >> > > > > <plugin> >> > > > > <groupId>org.sonatype.flexmojos</groupId> >> > > > > <artifactId>flexmojos-maven-plugin</artifactId> >> > > > > <dependencies> >> > > > > <dependency> >> > > > > <groupId>com.adobe.flex</groupId> >> > > > > <artifactId>compiler</artifactId> >> > > > > <version>3.4.0.9271</version> >> > > > > <type>pom</type> >> > > > > </dependency> >> > > > > <dependency> >> > > > > <groupId>net.sf.asmock</groupId> >> > > > > <artifactId>asmock</artifactId> >> > > > > <version>0.9</version> >> > > > > <type>swc</type> >> > > > > <scope>test</scope> >> > > > > </dependency> >> > > > > <dependency> >> > > > > <groupId>net.sf.asmock</groupId> >> > > > > <artifactId>asmock-flexunit4</artifactId> >> > > > > <version>0.9</version> >> > > > > <type>swc</type> >> > > > > <scope>test</scope> >> > > > > </dependency> >> > > > > </dependencies> >> > > > > <version>${flex.version}</version> >> > > > > <extensions>true</extensions> >> > > > > <configuration> >> > > > > <locales> >> > > > > <locale>en_US</locale> >> > > > > </locales> >> > > > > <debug>true</debug> >> > > > > <configurationReport>true</configurationReport> >> > > > > <includes> >> > > > > <include>asmock.integration.flexunit.ASMockClassRunner</include> >> > > > > </includes> >> > > > > </configuration> >> > > > > </plugin> >> > >> > > > -- >> > > > 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]<flex-mojos%[email protected]> >> <flex-mojos%2bunsubscr...@googlegrou ps.com> >> > > > For more options, visit this group at >> > > >http://groups.google.com/group/flex-mojos?hl=en?hl=en >> > >> > > >http://blog.flex-mojos.info/ >> > >> > > -- >> > > Zeno Consulting, Inc. >> > > home:http://www.zenoconsulting.biz >> > > blog:http://zenoconsulting.wikidot.com >> > > p: 248.894.4922 >> > > f: 313.884.2977 > > > -- 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?hl=en?hl=en http://flexmojos.sonatype.org/
