Flexbuilder configure the modules like this:

<modules>
<module application="src/HW.mxml" destPath="com/sonatype/nexus/plugins/
sad.swf" optimize="true" sourcePath="src/com/sonatype/nexus/plugins/
sad.mxml"/>
</modules>

So my idea was to make it like this on flexmojos:
<modules>
  <module>
    <file>com/sonatype/nexus/plugins/sad.mxml</file>
    <output>modules/sad.swf</output>
    <optimize>true</optimize>
  </module>
</modules>

Am I cleaner now?!

VELO

On Dec 17, 8:26 pm, Doug Daniels <[email protected]> wrote:
> I created a JIRA issue:
> [FLEXMOJOS-234] Configuring build artifact name of MXML module for
> /target/ and for WAR copy-flex-resource builds:
>
> https://issues.sonatype.org/browse/FLEXMOJOS-234
>
> I'm not sure I understand what you mean by it not being compatible
> with the other approach. Currently Flexbuilder (as far as I
> understand) doesn't allow you to configure the SWF output from your
> MXML modules and uses the MXML filename itself.
>
> Flexmojos also doesn't allow you to fully configure your SWF artifact
> output (or in copy-flex-resources) to match the Flexbuilder output (it
> only defaults to the standard maven artifact naming convention).
>
> Are there any suggested work arounds for this type of development
> environment or a best practices on how you should be developing Flex
> applications in Flexbuilder and using Flexmojos for your builds
> without having to manage 2 separate HTML resources to test/deploy your
> SWFs?
>
> On Thu, Dec 17, 2009 at 2:34 PM, velo <[email protected]> wrote:
> > The idea is to make modules more configurable... allowing you to have
> > the same options like you have on flexbuilder....  but right now this
> > isn't available....
> > I just not sure if does worth adding this feature that you suggest
> > knowing it won't be compatible with this other approach....
>
> > VELO
>
> > On Dec 17, 6:02 pm, Doug Daniels <[email protected]> wrote:
> >> We've had a lot of benefit using Flexmojos in our Flex/Java project.
> >> One thing that's bothered me (and maybe I've just missed the best
> >> practices or some documentation on it).
>
> >> We are working in a development environment where Java developers use
> >> Eclipse and then use maven to build the latest Flex clients, and Flex
> >> developers use FlexBuilder/Eclipse and have their mxml files compiled
> >> to bin-debug as <moduleName>.swf.
>
> >> The trouble is the flexmojos plugin builds the SWF into /target/ as
> >> <build.getFinalName()>-moduleName.swf. Also the copy-flex-resources
> >> copies the SWF artifact as <artifactID>-<version>-moduleName.swf  (you
> >> can configure it to stripVersion).
>
> >> What I'm looking for is a way to configure either Flexbuilder or the
> >> Flexmojos plugin to consistently output the SWF's as just
> >> moduleName.swf, this would make things like running JSP pages that
> >> include the latest FlexBuilder built SWF easier (currently we have a
> >> production JSP that has <artifactID>-<version>-moduleName.swf , and a
> >> debug one that has moduleName.swf).
>
> >> I understand that the additional version and project name information
> >> is standard Maven practice, and it makes sense as a configuration
> >> default, but I'd like there to be a way to override that
> >> configuration.
>
> >> My suggestion is to allow the ApplicationMojo.java accept a
> >> configuration argument.
>
> >> <stripModuleArtifactInfo>true</stripModuleArtifactInfo>
>
> >> Also in the CopyMojo I'd suggest the same configuration to control how
> >> the SWF's are copied into your WAR:
> >> <stripModuleArtifactInfo>true</stripModuleArtifactInfo>
>
> >> What I'm wondering is if anyone else has experience setting up a
> >> Flexbuilder/Maven development environment that allows devs to quickly
> >> run and test their MXML without having to build in Flexbuilder and
> >> then build in Maven.
>
> >> I've created a patch for the flexmojos-maven-plugin project that could
> >> be applied to Flexmojos (I haven't been able to compile and run it I'm
> >> having trouble getting a Flexmojos build environment setup.), but it's
> >> a very simple patch if one of the devs could test it out.
>
> >> Index: src/main/java/org/sonatype/flexmojos/compiler/
> >> ApplicationMojo.java
> >> ===================================================================
> >> --- src/main/java/org/sonatype/flexmojos/compiler/ApplicationMojo.java
> >> (revision 1536)
> >> +++ src/main/java/org/sonatype/flexmojos/compiler/ApplicationMojo.java
> >> (working copy)
> >> @@ -100,6 +100,13 @@
> >>      protected File source;
>
> >>      /**
> >> +     * When true will strip artifact and version information from the
> >> built MXML module artifact.
> >> +     *
> >> +     * @parameter default-value="false"
> >> +     */
> >> +    private boolean stripModuleArtifactInfo;
> >> +
> >> +    /**
> >>       * When true, flexmojos will register register every compiled SWF
> >> files as trusted. These SWF files are assigned to
> >>       * the local-trusted sandbox. They can interact with any other
> >> SWF files, and they can load data from anywhere,
> >>       * remote or local. On false nothing is done, so if the file is
> >> already trusted it will still as it is.
> >> @@ -254,8 +261,9 @@
> >>              setMavenPathResolver( moduleBuilder );
> >>              moduleBuilder.setConfiguration( configuration );
> >>              moduleBuilder.setLogger( new CompileLogger( getLog() ) );
> >> +            String moduleArtifactPrefix = stripModuleArtifactInfo ?
> >> "" : build.getFinalName() + "-" ;
> >>              File outputModule =
> >> -                new File( build.getDirectory(), build.getFinalName()
> >> + "-" + moduleName + "." + project.getPackaging() );
> >> +                new File( build.getDirectory(), moduleArtifactPrefix
> >> + moduleName + "." + project.getPackaging() );
> >>              updateSecuritySandbox( outputModule );
>
> >>              moduleBuilder.setOutput( outputModule );
> >> Index: src/main/java/org/sonatype/flexmojos/war/CopyMojo.java
> >> ===================================================================
> >> --- src/main/java/org/sonatype/flexmojos/war/CopyMojo.java      (revision
> >> 1536)
> >> +++ src/main/java/org/sonatype/flexmojos/war/CopyMojo.java      (working
> >> copy)
> >> @@ -109,6 +109,13 @@
> >>      private boolean stripVersion;
>
> >>      /**
> >> +     * When true will strip artifact and version information from the
> >> built MXML module artifact.
> >> +     *
> >> +     * @parameter default-value="false"
> >> +     */
> >> +    private boolean stripModuleArtifactInfo;
> >> +
> >> +    /**
> >>       * Use final name if/when available
> >>       *
> >>       * @parameter default-value="true"
> >> @@ -372,7 +379,8 @@
> >>          {
> >>              String classifier = StringUtils.isEmpty
> >> ( artifact.getClassifier() ) ? "" : "-" + artifact.getClassifier();
> >>              String version = stripVersion ? "" : "-" +
> >> artifact.getVersion();
> >> -            fileName = artifact.getArtifactId() + version +
> >> classifier + "." + SWF;
> >> +            String artifactPrefix = stripModuleArtifactInfo ? "" :
> >> artifact.getArtifactId() + version;
> >> +            fileName = artifactPrefix + classifier + "." + SWF;
> >>          }
> >>          else
> >>          {
>
> > --
> > 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://blog.flex-mojos.info/

-- 
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://blog.flex-mojos.info/

Reply via email to