Closed GoogleCodeExporter closed 9 years ago
I would prefer something that is declarative in the model so it's transparent
to the method used (runtime vs build time) and I feel it belongs there anyhow.
How about a package element ?
It would have 1 mandatory attribute (name) and one optional
attribute(namespace). By default the namespace equals to the name
Example:
<groups>
<group name="group1"/>
...
<package name="foo">
<group name="bar"/>
</package>
<package name="tools-en" namespace="tools/en">
<group name="tooltip" />
</package>
</groups>
Runtime:
<script type="text/javascript" src="/wro/group1.js"></script>
<script type="text/javascript" src="/wro/foo/bar.js"></script>
<script type="text/javascript" src="/wro/tools/en/tooltip.js"></script>
Build Time:
d:\static\js\group1.js
d:\static\js\foo\bar.js
d:\static\js\tools\en\tooltip.js
What do you think ? The package notion would be totally optional and for most
not needed but if some people need to package some js/css at a specific
location, it would allow them to do so. From an aesthetic and organisation
point of view, it could also be beneficial to the runtime in order to group
resources that belong together in a logical namespace.
A group is already a package is someway so maybe we need another name than
"package" to avoid any confusion.
Original comment by tlv...@gmail.com
on 14 Aug 2012 at 1:27
I'm not sure that adding the package concept into the model worth it. It adds
extra complexity without solving any real issues. I would prefer keep things
simple and choose the approach which require as little changes as possible in
order to solve a problem.
Since your use-case is to change the folder of the group (mostly for maven
plugin), it can be achieved by other means. I'll let you know when I have more
details.
Original comment by alex.obj...@gmail.com
on 14 Aug 2012 at 10:06
Thanks for the feedback on this Alex
Original comment by tlv...@gmail.com
on 15 Aug 2012 at 7:08
I have some progress on this issue. The fix will make it possible to generate
resources located in a folder and this will be controlled by NamingStrategy.
So, for instance, if the naming strategy says that a group named g1.js is
renamed into parent/g1.js, then the maven plugin will create the required
folder.
Original comment by alex.obj...@gmail.com
on 15 Aug 2012 at 1:00
Fixed in branch 1.4.x
Original comment by alex.obj...@gmail.com
on 15 Aug 2012 at 1:09
Sorry Alex, been busy and just notice this, great, thank !
Original comment by tlv...@gmail.com
on 20 Sep 2012 at 5:22
Original issue reported on code.google.com by
alex.obj...@gmail.com
on 12 Aug 2012 at 11:57