zDev - Flex - OSS
  1. zDev - Flex - OSS
  2. FLEXMOJOS-268

Add ability to add additional config files (i.e -load-config+=) to compiler config

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.6.0
    • Component/s: Compiler
    • Labels:
      None
    • Global Rank:
      1692

      Description

      I have attached a patch which enables you to specify additional compiler config files to be used.

      The main use case I have for this is buidling a spring-actionscript based project. Because it uses an IOC container a lot of the dependencies have to be explicitly included at compile time or it will fail at runtime since they are not included in the build. It is pretty easy to generate a compiler-config file for these projects that contains a list of all the classes needed at runtime by parsing or running an xslt against the xml context file - but up until this patch flex mojos had no way to tell it to use an additional config (or multiple additional config files)

      It is used like this:

      <configuration>
      ..
      <additionalConfigFiles>
      <file>src/somefiles/some-additional-config-file.config</file>
      </additionalConfigFiles>
      ...
      </configuration>

      The additional config files that I'm using look something like this:

      <flex-config>
      <includes append="true">
      <symbol>org.springextensions.actionscript.ioc.factory.config.EventHandlerMetaDataPostProcessor</symbol>
      <symbol>org.springextensions.actionscript.samples.organizer.application.controller.ApplicationController</symbol>
      ...
      </includes>
      </flex-config>

      Doing the includes this way makes it possible to have a pre-compile task generate the list of necessary includes for projects that need it. I've written a mojo that does just that for the spring-actionscript based projects that I'm going to release once the ability to specify additional config files is added to flex-mojo (otherwise the mojo is not very useful)

      It also adds in the -load-config+=(config path) to the flexbuilder options which will make this method of specifying include files more friendly to people who want to do both maven and flexbuilder builds.

        Activity

        Hide
        Marvin Herman Froeder added a comment -

        I did apply a fix for that, but didn't get a chance to test. Lemme know the results.

        VELO

        Show
        Marvin Herman Froeder added a comment - I did apply a fix for that, but didn't get a chance to test. Lemme know the results. VELO
        Hide
        Marvin Herman Froeder added a comment -

        BTW, do not rely on config.xml, flexmojos will overwrite configurations coming from *-config.xml w/o any kind of warning/alert, so your configurations can be just ignored w/o any reason.

        Show
        Marvin Herman Froeder added a comment - BTW, do not rely on config.xml, flexmojos will overwrite configurations coming from *-config.xml w/o any kind of warning/alert, so your configurations can be just ignored w/o any reason.
        Hide
        Ryan Gardner added a comment -

        This mostly works - but it will give an error unless the configs are included in the commandline as well.

        I'm attaching a patch that goes against your changed version to make it build

        Show
        Ryan Gardner added a comment - This mostly works - but it will give an error unless the configs are included in the commandline as well. I'm attaching a patch that goes against your changed version to make it build
        Hide
        Ryan Gardner added a comment -

        Before applying this change, the build fails - it appears that the config file has to be specified in the command-line arguments as well.

        Show
        Ryan Gardner added a comment - Before applying this change, the build fails - it appears that the config file has to be specified in the command-line arguments as well.
        Hide
        Marvin Herman Froeder added a comment -

        Done, lemme know the results...

        Show
        Marvin Herman Froeder added a comment - Done, lemme know the results...

          People

          • Assignee:
            Marvin Herman Froeder
            Reporter:
            Ryan Gardner
            Last Updated By:
            Rich Seddon
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Date of First Response: