Philip Wilder - 2009-07-22

Hi there,

Can anyone tell me how the compilation process is suppose to happen with the servebox plugin? To be more specific my expectation is for the plugin to finish compilation in the phase it was executed (typically compile) before moving onto the next phase. The behavior I am seeing would lead me to believe that the compilation starts in the correct phase (compile) but the actual compilation happens asynchronously.

Essentially what I am trying to do is compile my swf file and then include the swf in a zip file along with a few other resources. Here is the output of my call executed from Windows using a cygwin command prompt (comments are my own):

$ mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Client :: Services
[INFO]    task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting file set: d:\Eclipse\SharedEclipseWorkspace\ltp\client\services\ target (included: [**], excluded: [])
[INFO] Preparing flex:makeswf
[WARNING] Removing: makeswf from forked lifecycle, to prevent recursive invocati
on.
[WARNING] Removing: makeswf from forked lifecycle, to prevent recursive invocati
on.
[INFO] Preparing flex:test
[WARNING] Removing: makeswf from forked lifecycle, to prevent recursive invocati
on.
[WARNING] Removing: test from forked lifecycle, to prevent recursive invocation.

[INFO] No goals needed for project - skipping
[WARNING] DEPRECATED [locale]: Use locales parameter instead.
[INFO] [flex:test]
[INFO] Using d:\Eclipse\SharedEclipseWorkspace\ltp\client\services\target\surefi
re-reports as the reporting output directory.
[WARNING] No unit tests found into test source directory.

/**
* Notice here that the compilation is not yet complete but it switches to the assembly
* plugin anyway.
*/
[INFO] [site:attach-descriptor]
[INFO] [assembly:single {execution: make-assembly}]

/*
* Part of the assembly is to look for the the output swf file unfortunately it will never
* find it because the compiler has yet to complete and the whole task dies.
*/
[INFO] Reading assembly descriptor: src/assemble/WaveRunnerAssembly.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to create assembly: Error adding file to archive: d:\Eclipse\Share
dEclipseWorkspace\ltp\client\services\target\services-1.0-SNAPSHOT.swf isn't a f
ile.

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27 seconds
[INFO] Finished at: Wed Jul 22 10:27:26 EDT 2009
[INFO] Final Memory: 25M/45M
[INFO] ------------------------------------------------------------------------

If this is the expected behavior does anyone know how I can manage the ordering of my phases (e.g. ensure that compilation finishes before packaging)? More information can be made available on request. I will be out of office for a few days starting tomorrow so it may be a while before I reply again.