On Fri, May 21, 2010 at 3:55 PM, Eric Feminella <[email protected]>wrote:
> What I do and has proven to work well and is more or less like this:
>
> 1.) In the war project under src/resources/ create a file e.g.
> release-version.properties; the contents of which would like something
> like this:
> APPLICATION_VERSION=${application.version}
> APPLICATION_BUILD_DATE=${application.build.date}
>
> 2.) In the project POM (war project) - use maven-antrun-plugin on
> process-resources phase to replace tokens in properties file with that
> of the build; e.g.
> <replace file="${release-version.properties}"
> token="${application.version}" value="${project.version}" />
>
That is what maven-resource-plugin is for.
>
> 3.) In the project POM (war project) - use (maven-antrun-plugin)
> plugin on generate-resources to copy file to a location on the java
> classpath. I copy it to the applications
> WEB-INF/classes/release.properties
>
> Hope that helps.
>
> Eric
>
>
> On Fri, May 21, 2010 at 2:05 PM, Rick R <[email protected]> wrote:
> > I apologize if this has been asked before.. I tried to search the forums
> and
> > read over the flex-mojos wrapper goal
> >
> http://sites.sonatype.org/flexmojos/flexmojos-maven-plugin/wrapper-mojo.html
> > but I'm still confused on how to best handle the following situation...
> >
> > Currently I have a flex wrapper that is an index.jsp page. A
> ServletFilter
> > first gets hit before anything, and it puts some xml into the request
> that I
> > then up passing in as a FlexVars param within the wrapper jsp:
> >
> > FlashVars", "associateXML=<c:out value='${associateXML}'/>"
> >
> > I'm also appending a timestamp parameter to the actual swf src to avoid
> some
> > caching issues I was running into:
> >
> > "src", "integrated-media-swf-1.0-SNAPSHOT.swf?nocache=<fmt:formatDate
> > pattern='yyMMddss' value='${_now}'/>",
> >
> > Obviously you can see the issue is that I do not want to constantly have
> to
> > change this index.jsp every time the version number changes (which it
> will
> > once we move away from snapshots), however, I will do that if it's the
> best
> > approach.
> >
> > Can maybe leveraging the wrapper goal help me clean things up at all?
> >
> > I'd think this would be a somewhat common issue or maybe my architecture
> is
> > really bad?
> >
> > --
> > 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/
> >
>
>
>
> --
> Eric Feminella | Software Architect, RIA | www.ericfeminella.com |
> [email protected] | 609 558 1817
>
> --
> 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/