Well, unless you tell what you are doing and show examples, there is nothing I can do.
On Wed, Sep 1, 2010 at 2:24 PM, Bryan Turner <[email protected]> wrote: > Configuring Maven does not configure FlexMojos. I can add all of the side > directories as resource paths to Maven, but FlexMojos still does not include > them as compile paths, which it must do in order for compilation to complete > successfully. I've noted this on a previous e-mail thread as well, and you > indicated that FlexMojos not including them as source paths is the correct > behavior for the plugin. However, that doesn't help me be able to get a > successful build with this directory structure and FlexMojos. > > This is not the only place I've worked that uses this exact directory > structure, either (and again, I did not create this structure--I'm merely > trying to *deal* with it since I can't change it). For binary resources, > even Maven suggests you put them someplace other than src/main/resources (or > write failure-prone inclusion/exclusion rules) so they will not be filtered, > so this layout is not incorrect or improper from a Maven perspective. It is > FlexMojos that does not support it, not Maven. All of our filterable > resources are under src/main/resources (such as locale-specific properties > files). > > On Wed, Sep 1, 2010 at 10:54 AM, Marvin Froeder <[email protected]> wrote: > >> So, instead of placing you resource inside src/main/resources as maven >> suggests you are placing it scattered across may directories inside >> src/main?! >> >> Why don't you configure maven then? >> >> >> VELO >> >> On Wed, Sep 1, 2010 at 1:18 PM, Bryan Turner <[email protected]>wrote: >> >>> Foremost: I have removed the <sourcePaths/> block I showed above, now. >>> It works perfectly without it, so it was always unnecessary. >>> >>> No, we are not placing *any* generatedBase files under version control >>> (GAS always overwrites them, so adding them is pointless), and we are only >>> placing *customized* generated files under version control. All of the >>> gyrations in place are specifically to help prevent developers from * >>> accidentally* adding generated files to version control. In specific, >>> FlexMojos wants to generate non-Base classes, by default, into the normal >>> build source directory (src/main/flex for us). This causes us substantial >>> grief, because we end up with, intermixed, (non-base) files which are >>> customized (read: ones that should be under version control, because we've >>> made changes that we need to keep) and those which are vanilla (and should >>> not be added to version control), in the same directory. The end result is >>> that our developers receive a list of over 500 "added" files which the >>> version control integration for their IDE wants to add to Subversion which >>> they have to filter through. This always ends the same: Generated files that >>> shouldn't be committed, are. >>> >>> I understand that FlexMojos can place baseGenerated and generated files >>> in configurable locations--I'm using that feature. The antrun configuration >>> allows me a very useful separation. *Customized* generated files are >>> stored in src/main/flex, and are under version control. These files are then >>> copied (by antrun) to a *separate* folder (under target/), where >>> FlexMojos can generate files with them (generatedBase files are stored in >>> another directory under target/). This way, the massive list of generated >>> files is not intermixed with files we want under version control. If we >>> didn't have any customized files, we wouldn't need this step. But GAS >>> supports modifying the non-Base files for a reason, and it's functionality >>> we need for our system. >>> >>> Also, while I hear what you're saying about <sourcePath/>, the simple >>> fact is this: FlexMojos is currently not sufficiently configurable for me >>> to *not* use it, in some places. I've gone through, on your >>> recommendation, and removed it everywhere I can and have our build still >>> work. If it will be removed in 3.8 and does not exist in 4.x, >>> unfortunately we will be staying on 3.7.1 until either <sourcePath/> is >>> supported in a newer version or FlexMojos has the configuration settings we >>> require added to enable us to build successfully without having to use it. >>> >>> The primary issue is: >>> ..src/main >>> ....assets/ >>> ....flex/ >>> ....fonts/ >>> ....resources/ >>> ....styles/ >>> Without <sourcePaths/>, FlexMojos offers me *no *way to include these >>> extra paths in the build. It has, as you've pointed out before, custom code >>> that makes the assets/ resolution work, but it does not find the fonts or >>> styles unless we use <sourcePaths/> >>> - Please understand, I am not in a position to change this layout--it >>> is what it is. So my choices are: Use ant or Use FlexMojos with >>> <sourcePath/>, until FlexMojos gives me another choice >>> - If you're open to it, I'd be happy to work on and submit a patch that >>> adds, for example, <fontsPath/> and <stylesPath/> configuration elements to >>> allow me to define these directories in a way that does not require me to >>> manipulate <sourcePaths/> >>> >>> Thanks for your help, and I apologize for the long e-mails--I know you're >>> busy and doing this on your own time (and I appreciate it). >>> >>> Bryan >>> >>> On Wed, Sep 1, 2010 at 8:12 AM, Marvin Froeder <[email protected]>wrote: >>> >>>> 1st, I didn't read you entire e-mail, just don't have the time right >>>> now, but lemme inject some (potentially wrong) thoughts. >>>> >>>> Not, sure why you are doing this antrun thing, but flexmojos is able to >>>> place baseGenerated and generated wherever you want to. Are you putting >>>> the >>>> baseFiles under SCM? is that it?! >>>> >>>> Flexmojos should deal with sourcePath, if it does not, that is a bug, >>>> BTW, sourcePath will be removed from 3.8, so better start reporting >>>> problems >>>> instead of doing something that is know as a bad idea. >>>> >>>> Again, "I didn't read you entire e-mail, just don't have the time right >>>> now, but lemme inject some (potentially wrong) thoughts." >>>> >>>> VELO >>>> >>>> On Wed, Sep 1, 2010 at 10:45 AM, Bryan Turner <[email protected]>wrote: >>>> >>>>> We are successfully using the generate goal in our project with several >>>>> other modules, and it works as part of the full build. However, ours is >>>>> configured quite differently from what I've seen other places. >>>>> >>>>> To help prevent developers from checking in generated code, our >>>>> flex-model module places generated sources under target rather than >>>>> src/main/flex. We have a maven-antrun-plugin configuration which copies >>>>> the >>>>> contents of src/main/flex to target/src/as3 before flexmojos:generate >>>>> runs. >>>>> This allows us to version, under src/main/flex, any generated file that we >>>>> have customized (non-base, since those are always regenerated), but keeps >>>>> all of the generated sources in a directory which is ignored for version >>>>> control. >>>>> >>>>> Our configuration looks like this. First, we have properties for all of >>>>> the directories in play: >>>>> <properties> >>>>> >>>>> >>>>> <generatedBaseSourceDirectory>${project.build.directory}/src/base</generatedBaseSourceDirectory> >>>>> >>>>> >>>>> <generatedSourceDirectory>${project.build.directory}/src/as3</generatedSourceDirectory> >>>>> >>>>> <versionedSourceDirectory>src/main/flex</versionedSourceDirectory> >>>>> </properties> >>>>> >>>>> Next, the <build/> element has sourceDirectory and testSourceDirectory >>>>> defined: >>>>> <sourceDirectory>${generatedSourceDirectory}</sourceDirectory> >>>>> <testSourceDirectory>src/test/flex</testSourceDirectory> >>>>> >>>>> Followed by our plugins. maven-antrun-plugin comes first, since it >>>>> needs to copy the files we've modified: >>>>> <plugin> >>>>> <groupId>org.apache.maven.plugins</groupId> >>>>> <artifactId>maven-antrun-plugin</artifactId> >>>>> <version>1.3</version> >>>>> <executions> >>>>> <execution> >>>>> <id>copy-sources</id> >>>>> <phase>generate-sources</phase> >>>>> <goals> >>>>> <goal>run</goal> >>>>> </goals> >>>>> <configuration> >>>>> <tasks> >>>>> <copy overwrite="true" >>>>> todir="${generatedSourceDirectory}"> >>>>> <fileset >>>>> dir="${versionedSourceDirectory}"/> >>>>> </copy> >>>>> </tasks> >>>>> </configuration> >>>>> </execution> >>>>> </executions> >>>>> </plugin> >>>>> As you can see, this copies any files/directories from the >>>>> versionedSourceDirectory (src/main/flex) to the generatedSourceDirectory >>>>> (target/src/as3). >>>>> >>>>> That is followed by configuration for the flexmojos-maven-plugin: >>>>> <plugin> >>>>> <groupId>org.sonatype.flexmojos</groupId> >>>>> <artifactId>flexmojos-maven-plugin</artifactId> >>>>> <version>${flex.mojos.version}</version> >>>>> <extensions>true</extensions> >>>>> >>>>> <configuration> >>>>> <sourcePaths> >>>>> <path>${generatedSourceDirectory}</path> >>>>> <path>${generatedBaseSourceDirectory}</path> >>>>> </sourcePaths> >>>>> <storepass/> >>>>> </configuration> >>>>> <executions> >>>>> <execution> >>>>> <goals> >>>>> <goal>generate</goal> >>>>> </goals> >>>>> <configuration> >>>>> >>>>> >>>>> <baseOutputDirectory>${generatedBaseSourceDirectory}</baseOutputDirectory> >>>>> <extraOptions> >>>>> >>>>> >>>>> <as3typefactory>com.company.granite.EnhancedAs3TypeFactory</as3typefactory> >>>>> >>>>> <transformer>com.company.granite.EnhancedGroovyTransformer</transformer> >>>>> </extraOptions> >>>>> >>>>> <generatorToUse>graniteds21</generatorToUse> >>>>> <includeJavaClasses> >>>>> <javaClass/> >>>>> </includeJavaClasses> >>>>> >>>>> <outputDirectory>${generatedSourceDirectory}</outputDirectory> >>>>> <templates> >>>>> >>>>> >>>>> <base-bean-template>${project.basedir}/gsp/beanBase.gsp</base-bean-template> >>>>> >>>>> >>>>> <base-entity-template>${project.basedir}/gsp/entityBase.gsp</base-entity-template> >>>>> >>>>> >>>>> <base-remote-template>${project.basedir}/gsp/remoteBase.gsp</base-remote-template> >>>>> >>>>> <bean-template>${project.basedir}/gsp/bean.gsp</bean-template> >>>>> >>>>> <entity-template>${project.basedir}/gsp/entity.gsp</entity-template> >>>>> >>>>> >>>>> <interface-template>${project.basedir}/gsp/interface.gsp</interface-template> >>>>> >>>>> <remote-template>${project.basedir}/gsp/remote.gsp</remote-template> >>>>> </templates> >>>>> </configuration> >>>>> </execution> >>>>> </executions> >>>>> </plugin> >>>>> So, several things I'll point out here. First, we're not using >>>>> ${basedir} anywhere; we use ${project.basedir}, which seems to create the >>>>> correct paths. Also, notice that the <sourcePaths/> is configured at the >>>>> *plugin* level, not the *execution* level (Velo: I know this is not >>>>> the preferred approach, so I'm very interested if you have any suggestions >>>>> on how we could not use <sourcePaths/> here but still be able to use this >>>>> layout). We're using (highly) customized GSPs (remote-template, in 3.x, >>>>> can >>>>> only be set in <templates/>, so we're setting them all that way), AS3 type >>>>> factory and Groovy transformer. >>>>> >>>>> This layout is a bit more work, in the poms, but the developers on the >>>>> team really like it. It makes it very simple for them to differentiate >>>>> between what should be added to Subversion and what should not. If they >>>>> customize a generated file, they copy it to src/main/flex. This layout >>>>> works >>>>> correctly for Maven, FlexBuilder 3, FlashBuilder 4 and IntelliJ 8.1 and 9. >>>>> >>>>> I hope this has some snippets that might help you figure out what's >>>>> amiss. >>>>> >>>>> Bryan >>>>> >>>>> On Wed, Sep 1, 2010 at 12:51 AM, btyla <[email protected]> wrote: >>>>> >>>>>> The goal itself works okay when executed from within the project >>>>>> itself but it doesn't seem to work when the project is part of an >>>>>> aggregate build. >>>>>> I'm happy to supply any information needed to further investigate this >>>>>> issue, just let me know. >>>>>> >>>>>> On Aug 31, 5:15 pm, Marvin Froeder <[email protected]> wrote: >>>>>> > What is wrong with the generate goal? >>>>>> > >>>>>> > >>>>>> > >>>>>> > On Tue, Aug 31, 2010 at 11:43 AM, btyla <[email protected]> wrote: >>>>>> > > Besides the basedir maven bug, there seems to be something wrong >>>>>> with >>>>>> > > the generate goal in 3.8-SNAPSHOT. I also tried to add the >>>>>> generated- >>>>>> > > source dir with the maven helper plugin but that didn't work >>>>>> either. >>>>>> > > At this point I unfortunately have to disable the code generation. >>>>>> > > Should I file a jira issue? >>>>>> > >>>>>> > > On Aug 31, 4:15 pm, Marvin Froeder <[email protected]> wrote: >>>>>> > > > Well, maven is the one that interpolates the ${basedir}... so I >>>>>> would say >>>>>> > > it >>>>>> > > > is a maven bug, but weird that only you got this problem.... >>>>>> anyway, DO >>>>>> > > NO >>>>>> > > > TAMPER WITH SOURCE PATHS! I really mean it. >>>>>> > >>>>>> > > > This is the best way to break everything. >>>>>> > >>>>>> > > > VELO >>>>>> > >>>>>> > > > On Tue, Aug 31, 2010 at 11:05 AM, btyla <[email protected]> >>>>>> wrote: >>>>>> > > > > Hi >>>>>> > >>>>>> > > > > I'm generating AS3 classes from their java counterparts. >>>>>> Running maven >>>>>> > > > > in this project directory works, but when running maven in the >>>>>> parent >>>>>> > > > > project directory this fails. The generated 'base' cannot be >>>>>> found by >>>>>> > > > > the compiler. It seems that the generated-sources directory is >>>>>> not >>>>>> > > > > added automatically in this case. >>>>>> > >>>>>> > > > > I tried the 'includeSources' configuration element but without >>>>>> luck; >>>>>> > > > > it is ignored and doesn't show in the compiler options. >>>>>> > >>>>>> > > > > The 'sourcePaths' doesn't work either because it some how >>>>>> inserts a >>>>>> > > > > 'null' path element. >>>>>> > >>>>>> > > > > <sourcePaths> >>>>>> > > > > <path>${baseDir}/src/main/flex</path> >>>>>> > > > > </sourcePaths> >>>>>> > >>>>>> > > > > results in: >>>>>> > >>>>>> > > > > -compiler.source-path >>>>>> X:\bnu-op\bnu-op-flex-application\null\src\main >>>>>> > > > > \flex >>>>>> > >>>>>> > > > > I'm using flexmojos-3.8-SNAPSHOT >>>>>> > >>>>>> > > > > X:\bnu-op>mvn -version >>>>>> > > > > Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) >>>>>> > > > > Java version: 1.6.0_21 >>>>>> > > > > Java home: C:\Program Files\Java\jdk1.6.0_21\jre >>>>>> > > > > Default locale: en_US, platform encoding: Cp1252 >>>>>> > > > > OS name: "windows xp" version: "5.1" arch: "x86" Family: >>>>>> "windows" >>>>>> > >>>>>> > > > > Regards, >>>>>> > > > > Bjorn >>>>>> > >>>>>> > > > > -- >>>>>> > > > > 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...@googlegroups.com> >>>>>> > > <flex-mojos%[email protected]<flex-mojos%[email protected]> >>>>>> <flex-mojos%252bunsubscr...@googlegroups.com> >>>>>> > >>>>>> > > > > 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]<flex-mojos%[email protected]> >>>>>> <flex-mojos%2bunsubscr...@googlegroups.com> >>>>>> > > For more options, visit this group at >>>>>> > >http://groups.google.com/group/flex-mojos >>>>>> > >>>>>> > >http://flexmojos.sonatype.org/- Hide quoted text - >>>>>> > >>>>>> > - Show quoted text - >>>>>> >>>>>> -- >>>>>> 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]> >>>>>> 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]<flex-mojos%[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]<flex-mojos%[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]<flex-mojos%[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]<flex-mojos%[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]<flex-mojos%[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/
