|
Hi,
I have a WAR package with JSF pages, JavaScript files, CSS files and Maven POM file. I'm interested can I configure Maven to delete all comments into the source code files before packaging the files? Best Wishes Peter |
|
> I have a WAR package with JSF pages, JavaScript files, CSS files and
> Maven > POM file. I'm interested can I configure Maven to delete all comments into > the source code files before packaging the files? If you can point me at a tool (ideally written in Java, but this is not required) which can strip comments from source code, then I can tell you how to turn it into a Maven plugin. Does Tidy have this functionality for HTML? I've never heard of such a tool myself. I'm not sure why you would want to do this either. Most people just obfuscate things. Wayne --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by rcbandit
For Java use proguard either directly or via the ant task or the proguard
maven plugin. For javascript and css used related compression tools with potentially the exec plugin or some other invocation of them natively. There is probably something like that already part of the javascript plugin actually. manfred On Wed, April 25, 2012 12:30 pm, rcbandit wrote: > Hi, > I have a WAR package with JSF pages, JavaScript files, CSS files and > Maven > POM file. I'm interested can I configure Maven to delete all comments into > the source code files before packaging the files? > > Best Wishes > Peter > > -- > View this message in context: > http://maven.40175.n5.nabble.com/How-to-remove-comments-with-Maven-tp5665768p5665768.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by Wayne Fay
Here you are:
http://onlinefundb.com/forum/index.php?topic=2531.0 |
|
> Here you are:
> http://onlinefundb.com/forum/index.php?topic=2531.0 Chapter 11 of the book Maven: The Definitive Guide will help you turn this Java code into a Maven plugin: http://books.sonatype.com/books/mvnref-book/reference/writing-plugins.html Also refer to this documentation: http://maven.apache.org/plugin-developers/index.html http://maven.apache.org/guides/introduction/introduction-to-plugins.html http://maven.apache.org/guides/plugin/guide-java-plugin-development.html Wayne --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by Manfred Moser
Hi Manfred,
great hints on this. However Peter may not want to do this on his files in src/main/ but on copies of these in target/... Copying and invoking the stripping of comments on the copies is no problem (antrun plugin) but how to make the maven standard plugins to build the *-sources.jar from the modified copies? http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html Regards Jörg > For Java use proguard either directly or via the ant task or the proguard > maven plugin. > > For javascript and css used related compression tools with potentially the > exec plugin or some other invocation of them natively. There is probably > something like that already part of the javascript plugin actually. > > manfred > > On Wed, April 25, 2012 12:30 pm, rcbandit wrote: >> Hi, >> I have a WAR package with JSF pages, JavaScript files, CSS files and >> Maven >> POM file. I'm interested can I configure Maven to delete all comments into >> the source code files before packaging the files? >> >> Best Wishes >> Peter >> >> -- >> View this message in context: >> http://maven.40175.n5.nabble.com/How-to-remove-comments-with-Maven-tp5665768p5665768.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
I think I would just create another module that depends on the original.
It could download the sources, strip them and them use them as source for the current project.. manfred On Wed, April 25, 2012 2:25 pm, Jörg Hohwiller wrote: > Hi Manfred, > > great hints on this. > > However Peter may not want to do this on his files in src/main/ > but on copies of these in target/... > > Copying and invoking the stripping of comments on the copies is no > problem (antrun plugin) but how to make the maven standard plugins to > build the > *-sources.jar from the modified copies? > > http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html > > > Regards > Jörg > >> For Java use proguard either directly or via the ant task or the >> proguard >> maven plugin. >> >> For javascript and css used related compression tools with potentially >> the >> exec plugin or some other invocation of them natively. There is probably >> something like that already part of the javascript plugin actually. >> >> manfred >> >> On Wed, April 25, 2012 12:30 pm, rcbandit wrote: >>> Hi, >>> I have a WAR package with JSF pages, JavaScript files, CSS files and >>> Maven >>> POM file. I'm interested can I configure Maven to delete all comments >>> into >>> the source code files before packaging the files? >>> >>> Best Wishes >>> Peter >>> >>> -- >>> View this message in context: >>> http://maven.40175.n5.nabble.com/How-to-remove-comments-with-Maven-tp5665768p5665768.html >>> Sent from the Maven - Users mailing list archive at Nabble.com. >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [hidden email] >>> For additional commands, e-mail: [hidden email] >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
| Powered by Nabble | Edit this page |
