I don't think he was asking how to tell what the sourcePaths *are*; I think
he was asking how to add a new path to them. strace looks like it would be a
handy tool for helping you see what sourcePaths Maven is already using,
along with a lot of other runtime information, but I don't think it answers
the question that was asked.
In case a more specific example is desired on how to use the build-helper
plugin, here's how it looks inside your project:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>add-more-source</id>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<path>some/path/to/add</path>
</sources>
</configuration>
</execution>
</executions>
</plugin>
You can include as many <path> entries inside the <sources/> configuration
tag as you wish, so you only need to specific the add-source goal once to
add any number of additional sourcePaths to your build. For one of the
projects I work on, which started out Ant and was converted to FlexMojos
later, we're adding several:
<sources>
<path>src/main/assets</path>
<path>src/main/fonts</path>
<path>src/main/resources/locale/shared</path>
<path>src/main/resources/locale/en_US</path>
<path>src/main/styles</path>
</sources>
One disadvantage of having to use a separate plugin that isn't FlexMojos and
therefore isn't Flex-aware, is you can't use the {locale} placeholder. Hence
why en_US is specified explicitly.
Hope this helps
Bryan Turner
On Feb 13, 2011 6:06 AM, "bryan hunt" <[email protected]> wrote:
> Hi Alger,
>
> I have spent a lot of time figuring out how to correctly structure
> flexmojo projects.
> With a team of 10-20 I suppose one person would probably look after
> the build.
> This is obviously not workable when there is the architect/system
> administrator and coder are the same person.
>
> To cut a long story short I spent christmas 2010 struggling to develop
> a working project structure.
> I succeeded, but at the cost of family and friendships.
>
> Now I'm sure I will have to repeat the same process next year, and the
> year after that because:
>
> Maven is very opaque, when it works, it works great but when it breaks
> you really are stuffed.
>
> The solution.
>
> Use strace to debug your Maven builds.
>
> Want to know if it accesses something? Then strace.
> Want to know what it's copying? Then strace.
> Want to know what it's reading? Then strace.
> Want to know if it's writing a file? Then strace.
>
> Alternatively you can:
> Run your build through a debugger
> Create a custom Java security manager
> Use an Aspect to trace that stuff out
>
> Trust me, strace is a LOT easier than the above.
>
> It generates a lot of information so you will want to have some
> command line skills to filter the output.
>
> My typical usage is (-ff means follow fork):
>
> strace -ff mvn install &> out.txt
>
> grep src/main/mypath out.txt
>
> Now take the ball and run with it.
>
> Regards,
>
> Bryan Hunt
>
>
>
>
>
> On Feb 11, 11:38 am, Alger Werft <[email protected]> wrote:
>> Hi,
>> I'm trying out Flexmojos 4.0-beta-3
>
> --
> 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/
--
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/