qickrooms / flex-mojos

Automatically exported from code.google.com/p/flex-mojos
0 stars 0 forks source link

Build library, include all assets in swc #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create library project with assets
2. Build project as a lib
3. Uncompress swc file, check if assets is included in the swc

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Windows
info.flex-mojos.flex-super-pom.2.0-alpha4

Please provide any additional information below.
When I create the library from Eclipse all the assets files is
included inside the swc + inside the swc/library.swf.
When I create the library with Maven the assets files is just included
inside the swc/library.swf.

When using the assets from the library in other libraries/applications
like this:
[Embed(source="assets/graphics/ico_open.png")] or this [Embed(source="/
assets/graphics/ico_open.png")]

When using library built with Maven: Eclipse and Maven complains that
they can not find the file.
When using library built with Eclipse this works..

I have tried using the includeFiles configuration and that works, but
I see 2 problems with this option:
1. The file is copied to the root of the swc, instead of assets/
graphics/ folder
2. I need to include all file refs in the pom, and thats not a good
option! 

Original issue reported on code.google.com by lars.lun...@gmail.com on 19 Sep 2008 at 11:55

GoogleCodeExporter commented 9 years ago
Try flex-mojos 2.0M5.

VELO

Original comment by velo...@gmail.com on 19 Sep 2008 at 12:00

GoogleCodeExporter commented 9 years ago
See this thread for the discussion:
http://groups.google.com/group/flex-mojos/browse_thread/thread/3ca712c6ef5f5216

Attached a simple project as requested.
I also included the Eclipse project files.

Built by Eclipse, the testfolder/test.txt file is included inside the swc.
Built by maven the test.txt file is included in the swc without the testfolder.

My issue is that you can get the test.txt file included in swc without using
includeFiles configuration

Original comment by lars.lun...@gmail.com on 19 Sep 2008 at 1:21

Attachments:

GoogleCodeExporter commented 9 years ago
I'm sure you need to configure eclipse(FlexBuilder) anywhere.  FB doesn't 
include 
even classes without configuring.

If you don't believe me, create a new library project and add files on file 
system 
(or anyway not using Eclipse/File/New/Action Script Class OR Interface OR File 
OR 
Mxml Component or anything FB related)

What I'm thinking to do.  If no includes are specify, flex-mojos includeClasses 
all 
classes found at sourcePath (current behavior) and will includeFiles all files 
found 
at resources folders.

VELO

Original comment by velo...@gmail.com on 19 Sep 2008 at 1:29

GoogleCodeExporter commented 9 years ago
Yes I belive you ;)
The Eclipse-files included in the simple project is configured to include the 
asset
file. (you can see this from the .flexLibProperties file)

It would be very nice if all files in the src/main/resources is included in the 
swc!
Thats exactly what I meant..

Original comment by lars.lun...@gmail.com on 19 Sep 2008 at 1:38

GoogleCodeExporter commented 9 years ago
I patched it (path also for issue 125). 
* all not hidden files in resources folders included in the swc if includeFiles 
are 
not specify.
* defaults.css always added to SWC root (disregard original location). http://
livedocs.adobe.com/flex/3/html/styles_05.html#166938

Original comment by deve...@gmail.com on 12 Nov 2008 at 4:39

Attachments:

GoogleCodeExporter commented 9 years ago
I patch it a little bit different....

if no inclusions are defined (that mean no manifest, no files, no sources, no
classes, no nothing), it will include all sources (current behavior) and will 
include
all resources (new behavior) using include file.

I do that because maven ignore empty arrays, keeping they null.

defaults.css will not be moved.  I can use a defaults.css outside root, can't 
I?.  So
is not necessary to move it.

Original comment by velo...@gmail.com on 12 Nov 2008 at 5:27

GoogleCodeExporter commented 9 years ago
>> I can use a defaults.css outside root, can't I
you can use defaults.css _only_ in root. see 
http://livedocs.adobe.com/flex/3/html/
help.html?content=mxmlcomponents_4.html

"The file must be in the top-most directory of the SWC file." ((c) Adobe Flex 3 
Help)

Please, commit this behavior.

Original comment by deve...@gmail.com on 12 Nov 2008 at 7:41

GoogleCodeExporter commented 9 years ago
Yes, this is true, but I didn't see there any documentation saying you can't 
have a
defaults.css on folders.

So I can have a /defaults.css, /myfolder1/defaults.css, /another/defaults.css, 
and it
is ok.  Just this defaults.css in folders will not be THE defaults.css, but is 
not a
problem at all.

Original comment by velo...@gmail.com on 12 Nov 2008 at 8:04

GoogleCodeExporter commented 9 years ago
has the fix included in 2.0M10?

Original comment by rayhon1...@gmail.com on 14 Jan 2009 at 10:56

GoogleCodeExporter commented 9 years ago
Yep.  On 2.0 too.  But not the exact same behavior requested.

VELO

Original comment by velo...@gmail.com on 14 Jan 2009 at 11:21