add context.xml to war-file with cargo

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

add context.xml to war-file with cargo

Karsten Blohm

Hello!

Is there a possibility to add an META-INF/context.xml file to an existing war-file just before deploying it to a tomcat with cargo-maven-plugin?

I need this feature because I don’t want any container-specific files in the war-files unless I deploy it.

I guess it isn’t very hard to add the file to the war-file during deploy-job but I’m not sure if Cargo has this feature. I read the documentation but didn’t find such feature.

 

Best Regards,

 

Karsten

 

Reply | Threaded
Open this post in threaded view
|

Re: add context.xml to war-file with cargo

S. Ali Tokmen
Hi Karsten

You can combine some features to achieve this:
  1. Expand the WAR using the dependency:unpack goal of the maven-dependency-plugin
  2. Overwrite the files you wish in the expanded WAR
  3. Deploy the expanded WAR using CARGO

Let me know what you think

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
On 08/04/15 09:39, Karsten Blohm wrote:

Hello!

Is there a possibility to add an META-INF/context.xml file to an existing war-file just before deploying it to a tomcat with cargo-maven-plugin?

I need this feature because I don’t want any container-specific files in the war-files unless I deploy it.

I guess it isn’t very hard to add the file to the war-file during deploy-job but I’m not sure if Cargo has this feature. I read the documentation but didn’t find such feature.

 

Best Regards,

 

Karsten

 


Reply | Threaded
Open this post in threaded view
|

AW: [cargo-user] add context.xml to war-file with cargo

Karsten Blohm

Hi Ali,

thank for the quicl response. I didn’t the unpack –feature yet. But after unpacking the war how could I get my context.xml to the unpack directory. AFAIK

you can’t deploy expanded WARs to remote Tomcats. So I would have to pack it again?

 

 

 

Von: S. Ali Tokmen [mailto:[hidden email]]
Gesendet: Mittwoch, 8. April 20
15 20:33
An: [hidden email]
Betreff: Re: [cargo-user] add context.xml to war-file with cargo

 

Hi Karsten

You can combine some features to achieve this:

  1. Expand the WAR using the dependency:unpack goal of the maven-dependency-plugin
  2. Overwrite the files you wish in the expanded WAR
  3. <a href="http://cargo.codehaus.org/Static&#43;deployment&#43;of&#43;expanded&#43;WAR">Deploy the expanded WAR using CARGO

Let me know what you think

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/

On 08/04/15 09:39, Karsten Blohm wrote:

Hello!

Is there a possibility to add an META-INF/context.xml file to an existing war-file just before deploying it to a tomcat with cargo-maven-plugin?

I need this feature because I don’t want any container-specific files in the war-files unless I deploy it.

I guess it isn’t very hard to add the file to the war-file during deploy-job but I’m not sure if Cargo has this feature. I read the documentation but didn’t find such feature.

 

Best Regards,

 

Karsten

 

 

Reply | Threaded
Open this post in threaded view
|

Re: AW: [cargo-user] add context.xml to war-file with cargo

S. Ali Tokmen
Hi Karsten

Oh, you didn't mention the remote deployment detail :) So here's how you could do:
  1. Expand the WAR using the dependency:unpack goal of the maven-dependency-plugin
  2. Overwrite the files you wish in the expanded WAR (maybe using the Maven AntRun plugin)
  3. Use, for example, the Maven AntRun plugin to create a WAR file from the expanded WAR
  4. Use the <location> attribute of the <deployable> element to remote deploy your modified WAR

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
On 14/04/15 10:32, Karsten Blohm wrote:

Hi Ali,

thank for the quicl response. I didn’t the unpack –feature yet. But after unpacking the war how could I get my context.xml to the unpack directory. AFAIK

you can’t deploy expanded WARs to remote Tomcats. So I would have to pack it again?

 

 

 

Von: S. Ali Tokmen [[hidden email]]
Gesendet: Mittwoch, 8. April 20
15 20:33
An: [hidden email]
Betreff: Re: [cargo-user] add context.xml to war-file with cargo

 

Hi Karsten

You can combine some features to achieve this:

  1. Expand the WAR using the dependency:unpack goal of the maven-dependency-plugin
  2. Overwrite the files you wish in the expanded WAR
  3. Deploy the expanded WAR using CARGO

Let me know what you think

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/

On 08/04/15 09:39, Karsten Blohm wrote:

Hello!

Is there a possibility to add an META-INF/context.xml file to an existing war-file just before deploying it to a tomcat with cargo-maven-plugin?

I need this feature because I don’t want any container-specific files in the war-files unless I deploy it.

I guess it isn’t very hard to add the file to the war-file during deploy-job but I’m not sure if Cargo has this feature. I read the documentation but didn’t find such feature.

 

Best Regards,

 

Karsten