-
1. Re: RF 4.2 resource optimization and custom skins
lfryc Feb 24, 2012 10:32 AM (in response to iabughosh)1 of 1 people found this helpfulHi Ibrahim,
optimized resources needs to be pre-generated for custom skin, the issue is covered here:
https://issues.jboss.org/browse/RF-11959
Currently you need to setup Maven build to do packaging [1], or use build-in skin:
https://community.jboss.org/wiki/IntroductionToRichFacesPre-ProcessedResourceDependencies
-
2. Re: RF 4.2 resource optimization and custom skins
iabughosh Apr 1, 2012 6:11 AM (in response to lfryc)is there a solution for non-maven based projects ?
-
3. Re: RF 4.2 resource optimization and custom skins
lfryc Apr 4, 2012 4:28 AM (in response to iabughosh)Hey Ibrahim,
there is no built-in solution for non-maven based projects,
but what would you need to do is building command-line interface for richfaces-resources-maven-plugin.
The base class which is responsible for generation is ProcessMojo [1],
it can be simply replaced with class with main(args[]) method.
We have already taken same approach for cmdline-generator [2] as alternative to richfaces-cdk-plugin [3]
and it works like a charm!
[2] https://github.com/richfaces/cdk/blob/feature/cmdline-generator/cmdln-generator/src/main/java/org/richfaces/cdk/CommandLineGenerator.java
-
4. Re: RF 4.2 resource optimization and custom skins
iabughosh Apr 4, 2012 9:08 AM (in response to lfryc)looks good, can you post how the main(args[]) would look like ?
-
5. Re: RF 4.2 resource optimization and custom skins
lfryc Apr 4, 2012 10:53 AM (in response to iabughosh)Hey Ibrahim,
it will look pretty similar like ProcessMojo,
but you will need to provide all necessary attributes from command-line.
ProcessMojo has many fields which are injected by Maven.
If you will look on CommandLineGenerator, it is similar to GenerateMojo, but instead of Maven, it uses dependency injection of command-line parameters, which needs to be processed then to expected form.
Finally, it will be used similarly to GenerateMain:
To start up quickly, you can fork the CDK repository with cmdline-generator feature [1], and duplicate and modify cmdln-generator maven module.
[1] https://github.com/richfaces/cdk/tree/feature/cmdline-generator
-
6. Re: RF 4.2 resource optimization and custom skins
lfryc Apr 4, 2012 10:56 AM (in response to lfryc)There will obviously arise some problems that ProcessMojo is using some dependencies from Maven, which are not trivial to obtain outside of Maven. You need to refactor then to do not use these attributes, or hard-code them for a while of prototyping.
-
7. Re: RF 4.2 resource optimization and custom skins
jmiguel77 Oct 31, 2012 5:37 PM (in response to iabughosh)One thing i don't understand is that in the official documentation, it says this:
so, i am guessing that if i set this:
there would be no problem with the resources, but it is not working that way; i have that entry in my web.xml file, but i still get the errors
JSF1064: Unable to find or serve resource, org.richfaces.staticResource/4.2.2.Final/Packed/myskin/skinning.css.
JSF1064: Unable to find or serve resource, org.richfaces.staticResource/4.2.2.Final/Packed/myskin/packed/packed.css.
-
8. Re: RF 4.2 resource optimization and custom skins
lfryc Nov 1, 2012 4:06 AM (in response to jmiguel77)