maven-js-plugin-developers Mailing List for MobilVox Maven JavaScript Plugin
Brought to you by:
mvaaltemus
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(3) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Adam A. <aal...@mo...> - 2009-07-29 15:47:44
|
Yeah, I like that a lot better. From: Todd Orange [mailto:to...@mo...] Sent: Wednesday, July 29, 2009 11:05 AM To: mav...@li... Subject: Re: [Maven-js-plugin-developers] 1.4 POM.XML files I would like to make a suggestion to the configuration section. How about complex more like this: <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> <!-- The plugin configuration --> <configuration> <webapp> ...configuration... </webapp> <site> ...configuration... </site> <custom> ...configuration... </custom> </configuration> <!-- Tie the compress goal to the package phase. --> <executions> <execution> <phase>package</phase> <goals> <goal>compress</goal> </goals> </execution> </executions> </plugin> This more clearly breaks configuration down into the available compression tasks, webapp, site, and custom. This helps the users know exactly what is going on with the js-compress cycles. And further implementation might look like this (the specified options in webapp, site, and custom are only examples and are probably not correct.): <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> <!-- The plugin configuration --> <configuration> <webapp> <compress>true</compress> <!-- Whether to merge the WAR files into one or not. --> <mergeWarFiles>false</mergeWarFiles> <!-- The classifier for compressed files. --> <classifier>js-compressed</classifier> </webapp> <site> <compress>true</compress> </site> <custom> <compress>true</compress> <!-- Includes and excludes for compression --> <includes> <include>**/**.js</include> </includes> <excludes> <exclude>**/dir1/js/**</exclude> <exclude>**/dir/**</exclude> </excludes> <!-- Any license files to be included in the header of the JS files. --> <licenseFiles> <licenseFile>target/js/license.txt</licenseFile> </licenseFiles> <!-- Input and output directories for the custom MOJO. --> <jsDirectory>target/site/js</jsDirectory> <outputDirectory>target/site/js</outputDirectory> </custom> </configuration> <!-- Tie the compress goal to the package phase. --> <executions> <execution> <phase>package</phase> <goals> <goal>compress</goal> </goals> </execution> </executions> </plugin> Advantages are that options can be defined for specific compression schemes, webapp, site, and custom. There could also be "global" compress options available that would be configured above webapp. -Todd From: Adam Altemus [mailto:aal...@mo...] Sent: Tuesday, July 28, 2009 10:41 AM To: mav...@li... Subject: [Maven-js-plugin-developers] 1.4 POM.XML files I have completed two initial POM files, a simple and a complex. I like that the simple is the same as it was but, the complex seems a bit much for me. I am not sure, however, where to cut and keep the functionality we have plus add more. I have moved all custom defined parameters to a custom element but, beyond that any input is appreciated. I am including them below. Simple POM <plugin> <!-- Defaults to WAR compression --> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> </plugin> Complex POM <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> <!-- The plugin configuration --> <configuration> <!-- Whether to merge the WAR files into one or not. --> <mergeWarFiles>false</mergeWarFiles> <!-- The classifier for compressed files. --> <classifier>js-compressed</classifier> <!-- Whether to replace JS files in the site and custom goals. --> <replaceJavaScript>true</replaceJavaScript> <!-- Compression flags for which compression will be run during the compress goal. Default is to run WAR compression. Compress custom is not needed since the custom element is defined.--> <compress-war>true</compress-war> <compress-site>true</compress-site> <!-- User defined paramaters --> <custom> <!-- Includes and excludes for compression --> <includes> <include>**/**.js</include> </includes> <excludes> <exclude>**/dir1/js/**</exclude> <exclude>**/dir/**</exclude> </excludes> <!-- Any license files to be included in the header of the JS files. --> <licenseFiles> <licenseFile>target/js/license.txt</licenseFile> </licenseFiles> <!-- Input and output directories for the custom MOJO. --> <jsDirectory>target/site/js</jsDirectory> <outputDirectory>target/site/js</outputDirectory> </custom> </configuration> <!-- Tie the compress goal to the package phase. --> <executions> <execution> <phase>package</phase> <goals> <goal>compress</goal> </goals> </execution> </executions> </plugin> Adam Altemus Senior Software Engineer (724) 349-3339 ext. 302 (800) 830-5578 fax aaltemus at mobilvox dot com http://www.mobilvox.com <http://www.mobilvox.com/> Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail and destroy all information and attachments. |
From: Todd O. <to...@mo...> - 2009-07-29 15:07:56
|
I would like to make a suggestion to the configuration section. How about complex more like this: <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> <!-- The plugin configuration --> <configuration> <webapp> ...configuration... </webapp> <site> ...configuration... </site> <custom> ...configuration... </custom> </configuration> <!-- Tie the compress goal to the package phase. --> <executions> <execution> <phase>package</phase> <goals> <goal>compress</goal> </goals> </execution> </executions> </plugin> This more clearly breaks configuration down into the available compression tasks, webapp, site, and custom. This helps the users know exactly what is going on with the js-compress cycles. And further implementation might look like this (the specified options in webapp, site, and custom are only examples and are probably not correct.): <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> <!-- The plugin configuration --> <configuration> <webapp> <compress>true</compress> <!-- Whether to merge the WAR files into one or not. --> <mergeWarFiles>false</mergeWarFiles> <!-- The classifier for compressed files. --> <classifier>js-compressed</classifier> </webapp> <site> <compress>true</compress> </site> <custom> <compress>true</compress> <!-- Includes and excludes for compression --> <includes> <include>**/**.js</include> </includes> <excludes> <exclude>**/dir1/js/**</exclude> <exclude>**/dir/**</exclude> </excludes> <!-- Any license files to be included in the header of the JS files. --> <licenseFiles> <licenseFile>target/js/license.txt</licenseFile> </licenseFiles> <!-- Input and output directories for the custom MOJO. --> <jsDirectory>target/site/js</jsDirectory> <outputDirectory>target/site/js</outputDirectory> </custom> </configuration> <!-- Tie the compress goal to the package phase. --> <executions> <execution> <phase>package</phase> <goals> <goal>compress</goal> </goals> </execution> </executions> </plugin> Advantages are that options can be defined for specific compression schemes, webapp, site, and custom. There could also be "global" compress options available that would be configured above webapp. -Todd From: Adam Altemus [mailto:aal...@mo...] Sent: Tuesday, July 28, 2009 10:41 AM To: mav...@li... Subject: [Maven-js-plugin-developers] 1.4 POM.XML files I have completed two initial POM files, a simple and a complex. I like that the simple is the same as it was but, the complex seems a bit much for me. I am not sure, however, where to cut and keep the functionality we have plus add more. I have moved all custom defined parameters to a custom element but, beyond that any input is appreciated. I am including them below. Simple POM <plugin> <!-- Defaults to WAR compression --> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> </plugin> Complex POM <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> <!-- The plugin configuration --> <configuration> <!-- Whether to merge the WAR files into one or not. --> <mergeWarFiles>false</mergeWarFiles> <!-- The classifier for compressed files. --> <classifier>js-compressed</classifier> <!-- Whether to replace JS files in the site and custom goals. --> <replaceJavaScript>true</replaceJavaScript> <!-- Compression flags for which compression will be run during the compress goal. Default is to run WAR compression. Compress custom is not needed since the custom element is defined.--> <compress-war>true</compress-war> <compress-site>true</compress-site> <!-- User defined paramaters --> <custom> <!-- Includes and excludes for compression --> <includes> <include>**/**.js</include> </includes> <excludes> <exclude>**/dir1/js/**</exclude> <exclude>**/dir/**</exclude> </excludes> <!-- Any license files to be included in the header of the JS files. --> <licenseFiles> <licenseFile>target/js/license.txt</licenseFile> </licenseFiles> <!-- Input and output directories for the custom MOJO. --> <jsDirectory>target/site/js</jsDirectory> <outputDirectory>target/site/js</outputDirectory> </custom> </configuration> <!-- Tie the compress goal to the package phase. --> <executions> <execution> <phase>package</phase> <goals> <goal>compress</goal> </goals> </execution> </executions> </plugin> Adam Altemus Senior Software Engineer (724) 349-3339 ext. 302 (800) 830-5578 fax aaltemus at mobilvox dot com http://www.mobilvox.com <http://www.mobilvox.com/> Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail and destroy all information and attachments. |
From: Geffrey C. <gc...@mo...> - 2009-07-29 14:39:59
|
I don't have any issue with the complex POM file, sure it's more complex but it also offers a great deal more flexibility than we had before so the trade off is worth it in my opinion. Geffrey Caruso Senior Software Engineer MobilVox, Inc. Office: 703.349.3339 x320 Fax: 800.830.5578 <mailto:gc...@mo...> gc...@mo... <http://www.mobilvox.com> www.mobilvox.com Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail and destroy all information and attachments. From: Adam Altemus [mailto:aal...@mo...] Sent: Tuesday, July 28, 2009 10:41 AM To: mav...@li... Subject: [Maven-js-plugin-developers] 1.4 POM.XML files I have completed two initial POM files, a simple and a complex. I like that the simple is the same as it was but, the complex seems a bit much for me. I am not sure, however, where to cut and keep the functionality we have plus add more. I have moved all custom defined parameters to a custom element but, beyond that any input is appreciated. I am including them below. Simple POM <plugin> <!-- Defaults to WAR compression --> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> </plugin> Complex POM <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> <!-- The plugin configuration --> <configuration> <!-- Whether to merge the WAR files into one or not. --> <mergeWarFiles>false</mergeWarFiles> <!-- The classifier for compressed files. --> <classifier>js-compressed</classifier> <!-- Whether to replace JS files in the site and custom goals. --> <replaceJavaScript>true</replaceJavaScript> <!-- Compression flags for which compression will be run during the compress goal. Default is to run WAR compression. Compress custom is not needed since the custom element is defined.--> <compress-war>true</compress-war> <compress-site>true</compress-site> <!-- User defined paramaters --> <custom> <!-- Includes and excludes for compression --> <includes> <include>**/**.js</include> </includes> <excludes> <exclude>**/dir1/js/**</exclude> <exclude>**/dir/**</exclude> </excludes> <!-- Any license files to be included in the header of the JS files. --> <licenseFiles> <licenseFile>target/js/license.txt</licenseFile> </licenseFiles> <!-- Input and output directories for the custom MOJO. --> <jsDirectory>target/site/js</jsDirectory> <outputDirectory>target/site/js</outputDirectory> </custom> </configuration> <!-- Tie the compress goal to the package phase. --> <executions> <execution> <phase>package</phase> <goals> <goal>compress</goal> </goals> </execution> </executions> </plugin> Adam Altemus Senior Software Engineer (724) 349-3339 ext. 302 (800) 830-5578 fax aaltemus at mobilvox dot com http://www.mobilvox.com <http://www.mobilvox.com/> Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail and destroy all information and attachments. |
From: Adam A. <aal...@mo...> - 2009-07-28 15:06:16
|
I have completed two initial POM files, a simple and a complex. I like that the simple is the same as it was but, the complex seems a bit much for me. I am not sure, however, where to cut and keep the functionality we have plus add more. I have moved all custom defined parameters to a custom element but, beyond that any input is appreciated. I am including them below. Simple POM <plugin> <!-- Defaults to WAR compression --> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> </plugin> Complex POM <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.4</version> <!-- The plugin configuration --> <configuration> <!-- Whether to merge the WAR files into one or not. --> <mergeWarFiles>false</mergeWarFiles> <!-- The classifier for compressed files. --> <classifier>js-compressed</classifier> <!-- Whether to replace JS files in the site and custom goals. --> <replaceJavaScript>true</replaceJavaScript> <!-- Compression flags for which compression will be run during the compress goal. Default is to run WAR compression. Compress custom is not needed since the custom element is defined.--> <compress-war>true</compress-war> <compress-site>true</compress-site> <!-- User defined paramaters --> <custom> <!-- Includes and excludes for compression --> <includes> <include>**/**.js</include> </includes> <excludes> <exclude>**/dir1/js/**</exclude> <exclude>**/dir/**</exclude> </excludes> <!-- Any license files to be included in the header of the JS files. --> <licenseFiles> <licenseFile>target/js/license.txt</licenseFile> </licenseFiles> <!-- Input and output directories for the custom MOJO. --> <jsDirectory>target/site/js</jsDirectory> <outputDirectory>target/site/js</outputDirectory> </custom> </configuration> <!-- Tie the compress goal to the package phase. --> <executions> <execution> <phase>package</phase> <goals> <goal>compress</goal> </goals> </execution> </executions> </plugin> Adam Altemus Senior Software Engineer (724) 349-3339 ext. 302 (800) 830-5578 fax aaltemus at mobilvox dot com http://www.mobilvox.com <http://www.mobilvox.com/> Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail and destroy all information and attachments. |
From: Adam A. <aal...@mo...> - 2009-06-15 14:38:17
|
We should add in functionality that can reduce server requests to speed page loading. IE, if they have multiple JS includes they could put them in a tag (like <js-compress>) and the plugin would write them to a file and include that file only to cut down the server requests. The plugin could also just include the JS on each page as needed instead of using a file to include, as long as either method keeps the order of the included JavaScript in the same as the user put it. Adam Altemus Senior Software Engineer (724) 349-3339 ext. 302 (800) 830-5578 fax aaltemus at mobilvox dot com http://www.mobilvox.com <http://www.mobilvox.com/> Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail and destroy all information and attachments. |
From: Adam A. <aal...@mo...> - 2008-06-27 16:49:29
|
All: The plans for the next release of the MobilVox maven-js-plugin are: * Combine the 3 compress goals into 1 compress goal. If a user specifies a location for input and output directories in the POM configuration, they will be used. Otherwise the defaults for the WAR will be used. This still covers those using the compress-site by allowing them to specify site specific directories to be compressed. * Implement an obfuscation goal. The same directories will be used as in the compress goal. * Implement a goal for compressing and obfuscating. Due to the size of this change, I think it would be wise to make this a 2.0 release instead of the 1.4 it was planned to be. Any thoughts, questions, concerns? Thanks, Adam Altemus http://www.mobilvox.com http://ossi.mobilvox.com <http://ossi.mobilvox.com/> <mailto:aal...@mo...> aal...@mo... |
From: Adam A. <aal...@mo...> - 2008-01-28 19:38:10
|
I believe it is time to start to gather features we want to add/fix for a 1.4 release of the maven-js-plugin. Currently, a fix has been added that removes the forked lifecycle problems when using the plugin. What else would we like to add? Or do we want to release a version 1.3.1 only that contains this fix? Thanks, Adam Altemus Software Engineer MobilVox, Inc. aal...@mo... |
From: Adam <pun...@gm...> - 2007-11-20 20:31:51
|
All: The 1.3 final release of the maven-js-plugin is ready. The code is complete and the site documentation has been finished. All changes are currently in the trunke if you would like to review them. I would like to release this no later than Monday, November 26, 2007. Any thoughts or comments? Thanks, Adam |
From: Adam <pun...@gm...> - 2007-10-29 18:47:35
|
I have went back in and re-done the work on the user defined MOJO (I was extremely unhappy with what was done after looking at it) and it should be done by tomorrow. It will contain a number of parameters that the user will define. They are: jsDirectory: the directory where the JS can be found. Default is build output dir. outputDirectory: the output dir for compressed files. Default is build output dir. =B7 replaceJavaScript: Whether to replace the files if the input dir is the same as the output dir (default: false) =B7 classifier: The classifier placed on the newly created JavaScript files if the replaceJavaScript is false (default: -compressed) =B7 includes: Pattern of files to include in the compression process. Default is all JS files allowed. =B7 excludes: Pattern of files to exclude from the compression process. Default is all JS files allowed. =B7 licenseFiles: The license files to add in the header of each compressed file. The MOJO will piggy back on the current site compression MOJO, with some minor tweaks to make it fully user defined. Since we are adding a new goal, I would like to take this opportunity to open up the floor for any additional features or improvements that you believe should be done on the plugin, or would be very nice to have. If there are none, we can go ahead with the planned 1.3 release to only add in the new MOJO. The only one that comes to my mind is the ability to compress CSS and/or HTML but, that seems to me to be beyond the scope of a dedicated JavaScript compression plugin and should be implemented in a different manner. Adam Altemus http://www.mobilvox.com |
From: Adam A. <aal...@mo...> - 2007-08-23 16:18:51
|
Yeah, mergeWarFiles will default to true (as will replaceSiteJavaScript). Multiple license files should be no problem, same with adding includes. The includes and excludes are going to use the pattern as in the first e-mail (example: **/dir/** to include/exclude a directory) instead of just using regular expressions in the actual POM. The license files will be written in the order as they appear in the POM as well. There will be no comments needed in license files because anything added from a file will be automatically commented to protect the JS files. Adam _____ From: Todd Orange [mailto:to...@mo...] Sent: Tuesday, August 21, 2007 7:40 AM To: 'Adam Altemus'; mav...@li... Subject: RE: [Maven-js-plugin-developers] Vote on 1.2 release features Adam, This seems like a good set of requirements for the next version. Thanks to those who have requested them. Just to clarify a few things: First, will mergeWarFiles default to true? I agree with the js.compress.skip requirement. Is there any reason to allow for more than one license file? For instance: <licenseFile> <srcFile>/com/myCompany/license/license.txt</srcFile> <srcFile>/com/myCompany/license/other-info.txt</srcFile> </licenseFile> If this is accepted, it should be guaranteed that the license files be inserted in the order in which they are presented in the POM. Will there be an <include> tag along with the <exclude>? <includes> <include>/**/com/mobilvox/**/*.js</include> <include>/**/com/my-library/**/*.js</include> </includes> <excludes> <exclude>/**/org/big-js/**/*.*</exclude> </excludes> Thanks, -Todd _____ From: mav...@li... [mailto:mav...@li...] On Behalf Of Adam Altemus Sent: Monday, August 20, 2007 2:33 PM To: mav...@li... Subject: [Maven-js-plugin-developers] Vote on 1.2 release features All: Here is a proposal that I would like to put up for vote pertaining to new features for the 1.2 release of the maven-js-plugin. I am pasting in the MS Word document below. 1 Introduction 1.1 Purpose of this Document This document serves as the introduction to the design and implementation of the new features that will be included in the 1.2 release of the MobilVox Maven JavaScript Plugin, otherwise referred to as the maven-js-plugin. All planned features proposed in this document will then be viewed and voted on by the maven-js-plugin development team, which will determine their status for the 1.2 release. 2 Requirements 2.1 Functional Requirements The planned feature set that will be incorporated with the 1.2 release will include but, may not be limited to: * A user shall be able to turn off compression via the command line, limiting the need for Maven profiles. * A user shall be able to configure most POM configuration options via the command line using the -D{command}={value} format. * A user should be able to add a text file that contains licensing and other necessary information, to be included with the compressed JavaScript file. * A user shall be able to exclude files from the compression process. 2.2 Non-Functional Requirements 2.2.1 Usability Requirements The maven-js-plugin should remain usable in the same manner as it currently is. The added features should not prohibit the existing usability of the plugin. 3 Feature Design and Implementation This section will describe the design and implementation of the feature set contained in Section 2, Requirements. 3.1 Setting Parameters via the Command Line Javadoc annotations can be used to enable a user to set parameters via the command line as well as the POM.XML. The following example contains an annotation in the Javadoc which can be set: /** * A boolean used to determine if the compressed JS files in the site * will overwrite the original or create duplicates. * * @parameter expression="${replaceSiteJavaScript}" default-value="true" */ private boolean replaceSiteJavaScript;: The @parameter expression="${replaceSiteJavaScript}" enables a user to use the command line to set the parameter for the execution of the plugin. For example using: -DreplaceSiteJavaScript=true would overwrite all of the JS files in the site with the created compressed files. The following parameters will be included to be set via the command line: * replaceSiteJavaScript - a Boolean used to determine if the compressed JavaScript files will overwrite the original or create duplicates. * mergeWarFiles - a Boolean used to determine if the WAR files will be merged into one with compressed JavaScript or a second WAR file will be created that contains the compressed JavaScript. * skipCompression - a Boolean that can be set to tell the MOJO to skip the compression of the JavaScript files. * classifier - the String classifier attached to the created WAR file if mergeWarFiles is false. * siteClassifer - the String classifier attached to the compressed JavaScript files if the replaceSiteJavaScript is false. * skipCompression - described in further detail in section 3.2. 3.2 Enabling and Disabling Compression via the Command Line To enable a user to easily skip the compression during a build, the skipCompression Boolean will be added. It will use the command line format of js.compress.skip. The default value of the parameter will be false but, can be set via the command line or the POM.XML to true. The example below shows the Java variable skipCompression. /** * Boolean used for skipping compression. * * @parameter expression="${js.compress.skip}" default-value="false" */ private boolean skipCompression; For a user to then skip the compression, they would only need to add -Djs.compress.skip=true to the Maven command that initiates the maven-js-plugin MOJO(s). 3.3 Adding Licenses to Compressed Files Licenses and other pertinent information should be able to be added to compressed JavaScript files during the compression process. The preferred way of handling this is to include a text file that contains the information and point to it using a configurable parameter in the POM.XML setup of the maven-js-plugin. If this parameter is valid and the file exists, then all of the information in the file will be written at the head of each JavaScript file. An example text file might be something like this: /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ This licensing agreement would then be added at the head of each JavaScript file. The parameter for including the file in the POM.XML would be contained in the Plugin configuration for the maven-js-plugin in the POM.XML of the project using the plugin. It should be configured in the manner of the sample below: <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.2</version> <configuration> <mergeWarFiles>true</mergeWarFiles> <classifier>js-compressed</classifier> <licenseFile>/com/myCompany/license/license.txt</licenseFile> </configuration> </plugin> The maven-js-plugin would then include the information in the license.txt file at the top of each compressed file. 3.4 Excluding Files from the Compression Process To exclude files from the compression process, a regular expression within an <excludes> block in the <configuration> of <plugin> tag will be used. All files the match the regular expression will not be included in the compression. The POM.XML should look similar to the example below: <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.2</version> <configuration> <mergeWarFiles>true</mergeWarFiles> <classifier>js-compressed</classifier> <licenseFile>/com/myCompany/license/license.txt</licenseFile> <excludes> <exclude>*no-compress*</exclude> </excludes> </configuration> </plugin> This would not compress any files that contain no-compress in their name. The ideal implementation of this would use the Java regular expression classes java.util.regex.Matcher, java.util.regex.Pattern, and java.util.regex.PatternSyntaxException (the java.lang.String implementation CharSequence interface could be another possible scenario for accomplishing the filtering). The MOJO would check each file against he excludes in the POM and if a match was found, the file would be excluded from being compressed. I am voting a +1 for this feature set, any other features you think would be appropriate, let me know. Thanks, Adam Altemus aal...@mo... |
From: Todd O. <to...@mo...> - 2007-08-21 11:41:09
|
Adam, This seems like a good set of requirements for the next version. Thanks to those who have requested them. Just to clarify a few things: First, will mergeWarFiles default to true? I agree with the js.compress.skip requirement. Is there any reason to allow for more than one license file? For instance: <licenseFile> <srcFile>/com/myCompany/license/license.txt</srcFile> <srcFile>/com/myCompany/license/other-info.txt</srcFile> </licenseFile> If this is accepted, it should be guaranteed that the license files be inserted in the order in which they are presented in the POM. Will there be an <include> tag along with the <exclude>? <includes> <include>/**/com/mobilvox/**/*.js</include> <include>/**/com/my-library/**/*.js</include> </includes> <excludes> <exclude>/**/org/big-js/**/*.*</exclude> </excludes> Thanks, -Todd _____ From: mav...@li... [mailto:mav...@li...] On Behalf Of Adam Altemus Sent: Monday, August 20, 2007 2:33 PM To: mav...@li... Subject: [Maven-js-plugin-developers] Vote on 1.2 release features All: Here is a proposal that I would like to put up for vote pertaining to new features for the 1.2 release of the maven-js-plugin. I am pasting in the MS Word document below. 1 Introduction 1.1 Purpose of this Document This document serves as the introduction to the design and implementation of the new features that will be included in the 1.2 release of the MobilVox Maven JavaScript Plugin, otherwise referred to as the maven-js-plugin. All planned features proposed in this document will then be viewed and voted on by the maven-js-plugin development team, which will determine their status for the 1.2 release. 2 Requirements 2.1 Functional Requirements The planned feature set that will be incorporated with the 1.2 release will include but, may not be limited to: * A user shall be able to turn off compression via the command line, limiting the need for Maven profiles. * A user shall be able to configure most POM configuration options via the command line using the -D{command}={value} format. * A user should be able to add a text file that contains licensing and other necessary information, to be included with the compressed JavaScript file. * A user shall be able to exclude files from the compression process. 2.2 Non-Functional Requirements 2.2.1 Usability Requirements The maven-js-plugin should remain usable in the same manner as it currently is. The added features should not prohibit the existing usability of the plugin. 3 Feature Design and Implementation This section will describe the design and implementation of the feature set contained in Section 2, Requirements. 3.1 Setting Parameters via the Command Line Javadoc annotations can be used to enable a user to set parameters via the command line as well as the POM.XML. The following example contains an annotation in the Javadoc which can be set: /** * A boolean used to determine if the compressed JS files in the site * will overwrite the original or create duplicates. * * @parameter expression="${replaceSiteJavaScript}" default-value="true" */ private boolean replaceSiteJavaScript;: The @parameter expression="${replaceSiteJavaScript}" enables a user to use the command line to set the parameter for the execution of the plugin. For example using: -DreplaceSiteJavaScript=true would overwrite all of the JS files in the site with the created compressed files. The following parameters will be included to be set via the command line: * replaceSiteJavaScript - a Boolean used to determine if the compressed JavaScript files will overwrite the original or create duplicates. * mergeWarFiles - a Boolean used to determine if the WAR files will be merged into one with compressed JavaScript or a second WAR file will be created that contains the compressed JavaScript. * skipCompression - a Boolean that can be set to tell the MOJO to skip the compression of the JavaScript files. * classifier - the String classifier attached to the created WAR file if mergeWarFiles is false. * siteClassifer - the String classifier attached to the compressed JavaScript files if the replaceSiteJavaScript is false. * skipCompression - described in further detail in section 3.2. 3.2 Enabling and Disabling Compression via the Command Line To enable a user to easily skip the compression during a build, the skipCompression Boolean will be added. It will use the command line format of js.compress.skip. The default value of the parameter will be false but, can be set via the command line or the POM.XML to true. The example below shows the Java variable skipCompression. /** * Boolean used for skipping compression. * * @parameter expression="${js.compress.skip}" default-value="false" */ private boolean skipCompression; For a user to then skip the compression, they would only need to add -Djs.compress.skip=true to the Maven command that initiates the maven-js-plugin MOJO(s). 3.3 Adding Licenses to Compressed Files Licenses and other pertinent information should be able to be added to compressed JavaScript files during the compression process. The preferred way of handling this is to include a text file that contains the information and point to it using a configurable parameter in the POM.XML setup of the maven-js-plugin. If this parameter is valid and the file exists, then all of the information in the file will be written at the head of each JavaScript file. An example text file might be something like this: /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ This licensing agreement would then be added at the head of each JavaScript file. The parameter for including the file in the POM.XML would be contained in the Plugin configuration for the maven-js-plugin in the POM.XML of the project using the plugin. It should be configured in the manner of the sample below: <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.2</version> <configuration> <mergeWarFiles>true</mergeWarFiles> <classifier>js-compressed</classifier> <licenseFile>/com/myCompany/license/license.txt</licenseFile> </configuration> </plugin> The maven-js-plugin would then include the information in the license.txt file at the top of each compressed file. 3.4 Excluding Files from the Compression Process To exclude files from the compression process, a regular expression within an <excludes> block in the <configuration> of <plugin> tag will be used. All files the match the regular expression will not be included in the compression. The POM.XML should look similar to the example below: <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.2</version> <configuration> <mergeWarFiles>true</mergeWarFiles> <classifier>js-compressed</classifier> <licenseFile>/com/myCompany/license/license.txt</licenseFile> <excludes> <exclude>*no-compress*</exclude> </excludes> </configuration> </plugin> This would not compress any files that contain no-compress in their name. The ideal implementation of this would use the Java regular expression classes java.util.regex.Matcher, java.util.regex.Pattern, and java.util.regex.PatternSyntaxException (the java.lang.String implementation CharSequence interface could be another possible scenario for accomplishing the filtering). The MOJO would check each file against he excludes in the POM and if a match was found, the file would be excluded from being compressed. I am voting a +1 for this feature set, any other features you think would be appropriate, let me know. Thanks, Adam Altemus aal...@mo... |
From: Adam A. <aal...@mo...> - 2007-08-20 18:32:48
|
All: Here is a proposal that I would like to put up for vote pertaining to new features for the 1.2 release of the maven-js-plugin. I am pasting in the MS Word document below. 1 Introduction 1.1 Purpose of this Document This document serves as the introduction to the design and implementation of the new features that will be included in the 1.2 release of the MobilVox Maven JavaScript Plugin, otherwise referred to as the maven-js-plugin. All planned features proposed in this document will then be viewed and voted on by the maven-js-plugin development team, which will determine their status for the 1.2 release. 2 Requirements 2.1 Functional Requirements The planned feature set that will be incorporated with the 1.2 release will include but, may not be limited to: * A user shall be able to turn off compression via the command line, limiting the need for Maven profiles. * A user shall be able to configure most POM configuration options via the command line using the -D{command}={value} format. * A user should be able to add a text file that contains licensing and other necessary information, to be included with the compressed JavaScript file. * A user shall be able to exclude files from the compression process. 2.2 Non-Functional Requirements 2.2.1 Usability Requirements The maven-js-plugin should remain usable in the same manner as it currently is. The added features should not prohibit the existing usability of the plugin. 3 Feature Design and Implementation This section will describe the design and implementation of the feature set contained in Section 2, Requirements. 3.1 Setting Parameters via the Command Line Javadoc annotations can be used to enable a user to set parameters via the command line as well as the POM.XML. The following example contains an annotation in the Javadoc which can be set: /** * A boolean used to determine if the compressed JS files in the site * will overwrite the original or create duplicates. * * @parameter expression="${replaceSiteJavaScript}" default-value="true" */ private boolean replaceSiteJavaScript;: The @parameter expression="${replaceSiteJavaScript}" enables a user to use the command line to set the parameter for the execution of the plugin. For example using: -DreplaceSiteJavaScript=true would overwrite all of the JS files in the site with the created compressed files. The following parameters will be included to be set via the command line: * replaceSiteJavaScript - a Boolean used to determine if the compressed JavaScript files will overwrite the original or create duplicates. * mergeWarFiles - a Boolean used to determine if the WAR files will be merged into one with compressed JavaScript or a second WAR file will be created that contains the compressed JavaScript. * skipCompression - a Boolean that can be set to tell the MOJO to skip the compression of the JavaScript files. * classifier - the String classifier attached to the created WAR file if mergeWarFiles is false. * siteClassifer - the String classifier attached to the compressed JavaScript files if the replaceSiteJavaScript is false. * skipCompression - described in further detail in section 3.2. 3.2 Enabling and Disabling Compression via the Command Line To enable a user to easily skip the compression during a build, the skipCompression Boolean will be added. It will use the command line format of js.compress.skip. The default value of the parameter will be false but, can be set via the command line or the POM.XML to true. The example below shows the Java variable skipCompression. /** * Boolean used for skipping compression. * * @parameter expression="${js.compress.skip}" default-value="false" */ private boolean skipCompression; For a user to then skip the compression, they would only need to add -Djs.compress.skip=true to the Maven command that initiates the maven-js-plugin MOJO(s). 3.3 Adding Licenses to Compressed Files Licenses and other pertinent information should be able to be added to compressed JavaScript files during the compression process. The preferred way of handling this is to include a text file that contains the information and point to it using a configurable parameter in the POM.XML setup of the maven-js-plugin. If this parameter is valid and the file exists, then all of the information in the file will be written at the head of each JavaScript file. An example text file might be something like this: /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ This licensing agreement would then be added at the head of each JavaScript file. The parameter for including the file in the POM.XML would be contained in the Plugin configuration for the maven-js-plugin in the POM.XML of the project using the plugin. It should be configured in the manner of the sample below: <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.2</version> <configuration> <mergeWarFiles>true</mergeWarFiles> <classifier>js-compressed</classifier> <licenseFile>/com/myCompany/license/license.txt</licenseFile> </configuration> </plugin> The maven-js-plugin would then include the information in the license.txt file at the top of each compressed file. 3.4 Excluding Files from the Compression Process To exclude files from the compression process, a regular expression within an <excludes> block in the <configuration> of <plugin> tag will be used. All files the match the regular expression will not be included in the compression. The POM.XML should look similar to the example below: <plugin> <groupId>com.mobilvox.ossi.mojo</groupId> <artifactId>maven-js-plugin</artifactId> <version>1.2</version> <configuration> <mergeWarFiles>true</mergeWarFiles> <classifier>js-compressed</classifier> <licenseFile>/com/myCompany/license/license.txt</licenseFile> <excludes> <exclude>*no-compress*</exclude> </excludes> </configuration> </plugin> This would not compress any files that contain no-compress in their name. The ideal implementation of this would use the Java regular expression classes java.util.regex.Matcher, java.util.regex.Pattern, and java.util.regex.PatternSyntaxException (the java.lang.String implementation CharSequence interface could be another possible scenario for accomplishing the filtering). The MOJO would check each file against he excludes in the POM and if a match was found, the file would be excluded from being compressed. I am voting a +1 for this feature set, any other features you think would be appropriate, let me know. Thanks, Adam Altemus aal...@mo... |
From: Adam A. <aal...@mo...> - 2007-07-17 20:55:42
|
1.1-SNAPSHOT has a working version of site compression. It compresses all JS in the site directory in the build output directory. Configurable parameters are : * siteClassifier - the classifier on each JS file in the site directory, if the overwrite flag is false. * replaceSiteJsvaScript - the overwrite variable for determining whether to overwrite the site JS or create a second compressed file. The goal is compress-site Let me know if you think anything else should be in the site compression. Also, any other goals we want to put in the next upcoming release. Adam Altemus aal...@mo... |
From: Adam A. <aal...@mo...> - 2007-07-05 19:05:14
|
Greetings: As of 7/2/2007 the 1.0 release of the maven-js-plugin has been cut. 1.1-SNAPSHOT is currently under development. Any suggestions are welcome. Thanks, Adam Altemus aal...@mo... |