Closed GoogleCodeExporter closed 9 years ago
Fixed at revision 787.
I didn't put this normal relative directory idea. I wanna the user specifying
the
template kind (embed, zip, folder).
Original comment by velo...@gmail.com
on 10 Oct 2008 at 11:33
Original comment by velo...@gmail.com
on 10 Oct 2008 at 11:34
the relative path thing is there because i needed in my current project.
i'm converting existing ANT project into maven. the ant script builds de 1
source
tree in 2 swf files. 1 with and 1 without debug info (app.swf and app-debug.swf)
i also need to support the flexbuilder environment for my flex developers.
this means 1 html-template folder just below the project folder.
so, after doing some test i came to this solution:
<project folder>
|
+- pom.xml <-- main pom , package=pom
+- html-template
+- src -- main --flex
+- release -- pom.xml <--- package=swf
+- debug -- pom.xml <--- package=swf
my main pom.xml defines src & html-template directory as ../src/main/flex
& ../template-directory and basic flex-mojo configuration via <pluginManagement>
the main pom.xml is the parent pom for release\pom.xml and debug\pom.xml
and has both pom's in its modules list
when i run install on the main pom.xml , it will run release\pom.xml which will
compile without debug and debug\pom.xml which will compile with debug code
and both pom will use the SAME directory for src & html-templates
at the end i have 2 artifacts app-release and app-debug with finalName app.swf
and
app-debug.swf. the html-template also gives me a app.html and app-debug.html
keep in mind that i also must have the html-template folder as subdirectory
of project folder because flexbuilder seems to require this. I don't won't
to duplicate these files because they are changed by developers for
customisation.
so at the end , i added this option. as mention before it's not a URI anymore
but i see that most plugins allow this so don't feel this is bad.
this Zip,Embed is not an option for me (not workable with flexbuilder)
my initial patch work via cli but broke in continuum. so i update my internal
version a bit. i'm now testing this more with other projects.
i need todo 5 project this way and our flex developers really need this
debug/normal
versions of the apps. I feel that this can be
usefull for more people , so i hoop you could include this feature back in.
luc
Original comment by luc.w...@gmail.com
on 11 Oct 2008 at 7:45
And
<templateURI>folder:../template-directory</templateURI>
Didn't work?
Original comment by velo...@gmail.com
on 11 Oct 2008 at 9:33
[deleted comment]
No :-(
using folder:../html-template and some extra logging in my version i got
[INFO] [html-wrapper-mojo:wrapper {execution: default}]
[INFO] Extracting template
[INFO] basedir: /home/luc/src/luma/lw2pcconfig/debug
[INFO]
copy :../html-template ->
/home/luc/src/luma/lw2pcconfig/debug/target/flex-compiler/html-template
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Template folder doesn't exists. ../html-template
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 21 seconds
[INFO] Finished at: Sun Oct 12 13:24:14 CEST 2008
[INFO] Final Memory: 39M/262M
[INFO] ------------------------------------------------------------------------
Note: this run is started from a higher level pom.xml that will build all
project
related sub modules (the flex project is a submodule ) . running from flex
project it seems to work.
the toplevel pom is used to build ALL java/flex/webapp modules and for release
management.
i think by "just" using ../html-template it will use the current working
directory
of the maven process. this is NOT the basedir of the flex project
but /home/luc/src/luma
this is fixed by using project.getBasedir() when using relative "folder:../"
uri
like :
else if ( "folder".equals( scheme ) )
{
if (uri.getSchemeSpecificPart().startsWith('../')) {
//relative path must be based on basedir
copyFolderTemplate(project.getBasedir()+'/'+uri.getSchemeSpecificPart(),outputDi
r );
} else {
copyFolderTemplate(uri.getSchemeSpecificPart(),outputDir );
}
}
after this change , the folder:../path will work
[INFO] [html-wrapper-mojo:wrapper {execution: default}]
[INFO] Extracting template
[INFO] basedir: /home/luc/src/luma/lw2pcconfig/debug
[INFO]
copy :/home/luc/src/luma/lw2pcconfig/debug/../html-template ->
/home/luc/src/luma/lw2pcconfig/debug/target/flex-compiler/html-template
[INFO] [flex-compiler-mojo:compile-swf]
[INFO] Using configuration
file /home/luc/src/luma/lw2pcconfig/debug/target/flex-compiler/config.xml
so should i send a new patch or can you add this to the HtmlWrapper mojo
luc
Original comment by luc.w...@gmail.com
on 12 Oct 2008 at 11:45
I can't add based to user path. He can be providing a resolved path, like
c:\myfolder\template....
But, you can add it to your URI.
Instead of
folder:../html-template
user
folder:${basedir}/../html-template
Original comment by velo...@gmail.com
on 12 Oct 2008 at 12:53
Indead , solution is so "simple" ;-)
i rest my case ..
luc
Original comment by luc.w...@gmail.com
on 12 Oct 2008 at 2:47
Original issue reported on code.google.com by
luc.w...@gmail.com
on 10 Oct 2008 at 6:36Attachments: