RE: webapp plugin

2007-07-18 Thread John Coleman
Hi, thanks for your replies Jochen.

The filtering we do on the js and jsp scans a template version of the
files for xml like tags in order to include/drop code sections depending
on the role desired (not ideal I think but that's how it is). So far as
I understand Maven filtering it is more like a substitution mechanism.
We already have our filter packaged as a plugin, I don't want a
rewrite.

I started looking at the resources phase, but the existing one just
seems to put resources into the classes directory, and is evidently
aimed at properties files and such. Thanks a lot for your tip, I hope I
can figure out how to use it, it looks just like what I need.

Regards,
John

-Original Message-
From: Jochen Wiedmann [mailto:[EMAIL PROTECTED] 
Sent: 17 July 2007 12:16
To: Maven Users List
Subject: Re: webapp plugin

On 7/17/07, John Coleman [EMAIL PROTECTED]
wrote:

 I have developed a plugin that filters js and jsp files to customize
 them prior to packaging.

The filtering possibilities provided by the maven-war-plugin aren't
sufficient?

IMO, filtering should be an abstract mechanism, as implemented in Ant,
with customizable filters. That would most possibly have saved you 50%
of the job or more.



 I was going to bind the plugin to the package phase but it would make

No, that doesn't make sense. Use the generate-resources phase, write
the filtered result to a directory below target and add that directory
as a resource to the maven-war-plugin's configuration.


 The plugin also expects 2 parameters, these being the source directory
 and the target directory.

Use meaningful defaults like

expression=${myplugin.srcdir default=src/main/myplugin
expression=${myplugin.destdir
default=${project.build.directory}/myplugin

Jochen


-- 
Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Eurobase International Limited and its subsidiaries (Eurobase) are unable to 
exercise control over the content of information in E-Mails. Any views and 
opinions expressed may be personal to the sender and are not necessarily those 
of Eurobase. Eurobase will not enter into any contractual obligations in 
respect of any part of its business in any E-mail. 

Privileged / confidential information may be contained in this message and /or 
any attachments. This E-mail is intended for the use of the addressee(s) only 
and may contain confidential information. If you are not the / an intended 
recipient, you are hereby notified that any use or dissemination of this 
communication is strictly prohibited.  If you receive this transmission in 
error, please notify us immediately, and then delete this E-mail. 

Neither the sender nor Eurobase accepts any liability whatsoever for any 
defects of any kind either in or arising from this E-mail transmission. E-Mail 
transmission cannot be guaranteed to be secure or error-free, as messages can 
be intercepted, lost, corrupted, destroyed, contain viruses, or arrive late or 
incomplete. Eurobase does not accept any responsibility for viruses and it is 
your responsibility to scan any attachments.

Eurobase Systems Limited is the main trading company in the Eurobase 
International Group; registered in England and Wales as company number 
02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex 
CM2 0RE, UK.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: webapp plugin

2007-07-18 Thread Jochen Wiedmann

On 7/18/07, John Coleman [EMAIL PROTECTED] wrote:


I started looking at the resources phase, but the existing one just
seems to put resources into the classes directory, and is evidently
aimed at properties files and such.


Obviously you did look at the resources *plugin* as opposed to the
resources *phase*, where you can execute your own plugin.


--
Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: webapp plugin

2007-07-18 Thread John Coleman
When I read this...

The war packaging type looks to src/main/webapp for the web application
files such as JSPs, but still looks for non-code files in the standard
src/main/resources directory.
Where you place files such as *.properties files is of personal choice,
however, if you think you may filter the resources it is suggested that
you place them in resources, not webapp. Maven Unser Guide

...I thought maybe I can adapt the existing plugin as part of my process
to do the copy to target. Now I will write complete and self contained
and just add it to the phase as suggested.

John

-Original Message-
From: Jochen Wiedmann [mailto:[EMAIL PROTECTED] 
Sent: 18 July 2007 09:20
To: Maven Users List
Subject: Re: webapp plugin

On 7/18/07, John Coleman [EMAIL PROTECTED]
wrote:

 I started looking at the resources phase, but the existing one just
 seems to put resources into the classes directory, and is evidently
 aimed at properties files and such.

Obviously you did look at the resources *plugin* as opposed to the
resources *phase*, where you can execute your own plugin.


-- 
Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Eurobase International Limited and its subsidiaries (Eurobase) are unable to 
exercise control over the content of information in E-Mails. Any views and 
opinions expressed may be personal to the sender and are not necessarily those 
of Eurobase. Eurobase will not enter into any contractual obligations in 
respect of any part of its business in any E-mail. 

Privileged / confidential information may be contained in this message and /or 
any attachments. This E-mail is intended for the use of the addressee(s) only 
and may contain confidential information. If you are not the / an intended 
recipient, you are hereby notified that any use or dissemination of this 
communication is strictly prohibited.  If you receive this transmission in 
error, please notify us immediately, and then delete this E-mail. 

Neither the sender nor Eurobase accepts any liability whatsoever for any 
defects of any kind either in or arising from this E-mail transmission. E-Mail 
transmission cannot be guaranteed to be secure or error-free, as messages can 
be intercepted, lost, corrupted, destroyed, contain viruses, or arrive late or 
incomplete. Eurobase does not accept any responsibility for viruses and it is 
your responsibility to scan any attachments.

Eurobase Systems Limited is the main trading company in the Eurobase 
International Group; registered in England and Wales as company number 
02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex 
CM2 0RE, UK.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: webapp plugin

2007-07-18 Thread Jochen Wiedmann

On 7/18/07, John Coleman [EMAIL PROTECTED] wrote:


The war packaging type looks to src/main/webapp for the web application
files such as JSPs, but still looks for non-code files in the standard
src/main/resources directory.
Where you place files such as *.properties files is of personal choice,
however, if you think you may filter the resources it is suggested that
you place them in resources, not webapp. Maven Unser Guide

...I thought maybe I can adapt the existing plugin as part of my process
to do the copy to target. Now I will write complete and self contained
and just add it to the phase as suggested.


I have absolutely idea, what the Maven User Guide says or doesn't. The
authoritative source is the maven war plugins documentation, which
clearly indicates, that you may configure additional resource
directories.

In other words, the process is follows:

- Configure your plugin to run in the generate-resources phase and
let it create a
 directory below target.
- Configure the maven-war-plugin (which runs in the package phase, which is
 definitely later) to pick up your generated directories contents and
include it into
 the webapp.

I'll refrain from further comments.


Jochen



--
Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: webapp plugin

2007-07-17 Thread Jochen Wiedmann

On 7/17/07, John Coleman [EMAIL PROTECTED] wrote:


I have developed a plugin that filters js and jsp files to customize
them prior to packaging.


The filtering possibilities provided by the maven-war-plugin aren't sufficient?

IMO, filtering should be an abstract mechanism, as implemented in Ant,
with customizable filters. That would most possibly have saved you 50%
of the job or more.




I was going to bind the plugin to the package phase but it would make


No, that doesn't make sense. Use the generate-resources phase, write
the filtered result to a directory below target and add that directory
as a resource to the maven-war-plugin's configuration.



The plugin also expects 2 parameters, these being the source directory
and the target directory.


Use meaningful defaults like

   expression=${myplugin.srcdir default=src/main/myplugin
   expression=${myplugin.destdir
default=${project.build.directory}/myplugin

Jochen


--
Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: webapp plugin/mavenide

2007-07-17 Thread Milos Kleint

John Coleman wrote:

I got my plugin working and want to bind it to prepare-package, but
that's in Maven2.1. Is there way to do this task in Maven2?

TIA
  


are you using maven support in netbeans? that one by default builds with 
a custom 2.0.4-like maven2 embedder.
allowing to build with any external version of maven2 is TBD. Upgrading 
to a more uptodate version of maven2 embedder is TBD as well. The 
current trunk is not as stable as the version currently used.


Milos

John


Eurobase International Limited and its subsidiaries (Eurobase) are unable to exercise control over the content of information in E-Mails. Any views and opinions expressed may be personal to the sender and are not necessarily those of Eurobase. Eurobase will not enter into any contractual obligations in respect of any part of its business in any E-mail. 

Privileged / confidential information may be contained in this message and /or any attachments. This E-mail is intended for the use of the addressee(s) only and may contain confidential information. If you are not the / an intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited.  If you receive this transmission in error, please notify us immediately, and then delete this E-mail. 


Neither the sender nor Eurobase accepts any liability whatsoever for any 
defects of any kind either in or arising from this E-mail transmission. E-Mail 
transmission cannot be guaranteed to be secure or error-free, as messages can 
be intercepted, lost, corrupted, destroyed, contain viruses, or arrive late or 
incomplete. Eurobase does not accept any responsibility for viruses and it is 
your responsibility to scan any attachments.

Eurobase Systems Limited is the main trading company in the Eurobase 
International Group; registered in England and Wales as company number 
02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex 
CM2 0RE, UK.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: webapp plugin/mavenide

2007-07-17 Thread John Coleman
Yes Milos, Mavenide2.3 with embedded Maven, no idea what version. I see
Maven2.1 is not available yet anyway. But would just be nice to have
prepare-package available for me now.

The problem is the package goal also does the copy over of webapp
resources I want to tweak, so I can't see a way to fit in my plugin. It
seems I must hack the package plugin for this?

Thanks,
John

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 17 July 2007 14:14
To: Maven Users List
Subject: Re: webapp plugin/mavenide

John Coleman wrote:
 I got my plugin working and want to bind it to prepare-package, but
 that's in Maven2.1. Is there way to do this task in Maven2?

 TIA
   

are you using maven support in netbeans? that one by default builds with

a custom 2.0.4-like maven2 embedder.
allowing to build with any external version of maven2 is TBD. Upgrading 
to a more uptodate version of maven2 embedder is TBD as well. The 
current trunk is not as stable as the version currently used.

Milos
 John


 Eurobase International Limited and its subsidiaries (Eurobase) are
unable to exercise control over the content of information in E-Mails.
Any views and opinions expressed may be personal to the sender and are
not necessarily those of Eurobase. Eurobase will not enter into any
contractual obligations in respect of any part of its business in any
E-mail. 

 Privileged / confidential information may be contained in this message
and /or any attachments. This E-mail is intended for the use of the
addressee(s) only and may contain confidential information. If you are
not the / an intended recipient, you are hereby notified that any use or
dissemination of this communication is strictly prohibited.  If you
receive this transmission in error, please notify us immediately, and
then delete this E-mail. 

 Neither the sender nor Eurobase accepts any liability whatsoever for
any defects of any kind either in or arising from this E-mail
transmission. E-Mail transmission cannot be guaranteed to be secure or
error-free, as messages can be intercepted, lost, corrupted, destroyed,
contain viruses, or arrive late or incomplete. Eurobase does not accept
any responsibility for viruses and it is your responsibility to scan any
attachments.

 Eurobase Systems Limited is the main trading company in the Eurobase
International Group; registered in England and Wales as company number
02251162; registered address: Essex House, 2 County Place, Chelmsford,
Essex CM2 0RE, UK.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]