You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jo...@barclayscapital.com on 2008/11/13 15:31:41 UTC

Tomcat projects

Hello,

Is there a parent project that will insist in deploying resources to a
Tomcat project?  I am currently doing:

mvn -o jar:jar; cp target/CreateOrCommentHandler-0.0.1-SNAPSHOT.jar
~/tomcat/webapps/myapp/WEB-INF/lib/

However this doesn't seem very in tune with maven's way of doing things.
I'm writing a plugin for JIRA, so I assume there may be a parent project
that runs a local copy of Tomcat, but is there a smarter way?  If not,
how would I achieve the above?

Traditionally, I'd write an ant build file to deploy my jar file (and
any other resources - although in this case, I have just one jar file).

Finally, I noticed there was a way to get a list of targets in maven1 -
does this switch exist in maven2?

Thanks,


john


_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Tomcat projects

Posted by Stephen Connolly <st...@gmail.com>.
2008/11/14 <Jo...@barclayscapital.com>

> Hi,
>
>
> > -----Original Message-----
> > From: Wayne Fay [mailto:waynefay@gmail.com]
> > Sent: 13 November 2008 18:14
> > To: Maven Users List
> > Subject: Re: Tomcat projects
> >
> > Google tells me there are a few tomcat plugins for Maven.
> > http://mojo.codehaus.org/tomcat-maven-plugin/
> > http://cargo.codehaus.org/
> > (read more:
> > http://www.gorerle.com/vlab-wiki/index.php?title=Tomcat_Deploy
> > ment_in_Maven2)
>
> I'll have a read.
>
> > > mvn -o jar:jar; cp target/CreateOrCommentHandler-0.0.1-SNAPSHOT.jar
> > > ~/tomcat/webapps/myapp/WEB-INF/lib/
> >
> > Any particular reason why you're invoking jar:jar rather than
> > simply "mvn package", or even better, "mvn clean package"?
>
> Well it takes 57 seconds to do something that should take a few seconds
> using mvn package.


That's because the lifecycle phase "package" also runs your unit tests...

you might consider

mvn package -DskipTests

which will avoid *running* the unit tests... it will still compile them
though.

for even faster turnaround

mvn package -Dmaven.test.skip=true

which will avoid *compiling or running* the unit tests.

Of course, for even faster deployment, I'd just go

mvn tomcat:run

which (assuming you've configured your pom correctly) will start a local
tomcat server from your in-place files... makes editing non-class changes a
breeze... and if you configure context reloading, you can even get the IDE
to just compile the changed files



>
>
> I find that when I'm writing web projects, I want to deploy in under 5
> seconds - if one is rapidly iterating between fiddling with javascript
> and testing, a huge build process does not help.  I think it's very
> important to keep this point on board when devising build systems.
>
> > > Finally, I noticed there was a way to get a list of targets
> > in maven1
> > > - does this switch exist in maven2?
> >
> > The concept of a "list of targets" is not appropriate for
> > Maven2, as it is for ant and m1. You should be binding
> > plugins to the build lifecycle so every build automatically
> > uses the various plugins it requires at the proper time
> > during the lifecycle of your build.
>
> If mvn package isn't a target, it's something else, and whatever else it
> may be, it's something I pass to mvn to get output.  Therefore,
> something to list these would be very helpful :)
>
> >
> > Wayne
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> _______________________________________________
>
> This e-mail may contain information that is confidential, privileged or
> otherwise protected from disclosure. If you are not an intended recipient of
> this e-mail, do not duplicate or redistribute it by any means. Please delete
> it and any attachments and notify the sender that you have received it in
> error. Unless specifically indicated, this e-mail is not an offer to buy or
> sell or a solicitation to buy or sell any securities, investment products or
> other financial product or service, an official confirmation of any
> transaction, or an official statement of Barclays. Any views or opinions
> presented are solely those of the author and do not necessarily represent
> those of Barclays. This e-mail is subject to terms available at the
> following link: www.barcap.com/emaildisclaimer. By messaging with Barclays
> you consent to the foregoing.  Barclays Capital is the investment banking
> division of Barclays Bank PLC, a company registered in England (number
> 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.
>  This email may relate to or be sent from other members of the Barclays
> Group.
> _______________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Tomcat projects

Posted by Jo...@barclayscapital.com.
Hi,
 

> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com] 
> Sent: 13 November 2008 18:14
> To: Maven Users List
> Subject: Re: Tomcat projects
>
> Google tells me there are a few tomcat plugins for Maven.
> http://mojo.codehaus.org/tomcat-maven-plugin/
> http://cargo.codehaus.org/
> (read more: 
> http://www.gorerle.com/vlab-wiki/index.php?title=Tomcat_Deploy
> ment_in_Maven2)

I'll have a read.

> > mvn -o jar:jar; cp target/CreateOrCommentHandler-0.0.1-SNAPSHOT.jar
> > ~/tomcat/webapps/myapp/WEB-INF/lib/
> 
> Any particular reason why you're invoking jar:jar rather than 
> simply "mvn package", or even better, "mvn clean package"?

Well it takes 57 seconds to do something that should take a few seconds
using mvn package. 

I find that when I'm writing web projects, I want to deploy in under 5
seconds - if one is rapidly iterating between fiddling with javascript
and testing, a huge build process does not help.  I think it's very
important to keep this point on board when devising build systems.

> > Finally, I noticed there was a way to get a list of targets 
> in maven1 
> > - does this switch exist in maven2?
> 
> The concept of a "list of targets" is not appropriate for 
> Maven2, as it is for ant and m1. You should be binding 
> plugins to the build lifecycle so every build automatically 
> uses the various plugins it requires at the proper time 
> during the lifecycle of your build.

If mvn package isn't a target, it's something else, and whatever else it
may be, it's something I pass to mvn to get output.  Therefore,
something to list these would be very helpful :)

> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Tomcat projects

Posted by Wayne Fay <wa...@gmail.com>.
> Is there a parent project that will insist in deploying resources to a
> Tomcat project?  I am currently doing:

Google tells me there are a few tomcat plugins for Maven.
http://mojo.codehaus.org/tomcat-maven-plugin/
http://cargo.codehaus.org/
(read more: http://www.gorerle.com/vlab-wiki/index.php?title=Tomcat_Deployment_in_Maven2)

> mvn -o jar:jar; cp target/CreateOrCommentHandler-0.0.1-SNAPSHOT.jar
> ~/tomcat/webapps/myapp/WEB-INF/lib/

Any particular reason why you're invoking jar:jar rather than simply
"mvn package", or even better, "mvn clean package"?

> Finally, I noticed there was a way to get a list of targets in maven1 -
> does this switch exist in maven2?

The concept of a "list of targets" is not appropriate for Maven2, as
it is for ant and m1. You should be binding plugins to the build
lifecycle so every build automatically uses the various plugins it
requires at the proper time during the lifecycle of your build.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Highly Available Artifactory

Posted by Nick Stolwijk <ni...@gmail.com>.
I know Artifactory is built upon Jackrabbit. Maybe you can cluster the
underlying Jackrabbit instance? Take a look at clustering,
http://wiki.apache.org/jackrabbit/Clustering.

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Fri, Nov 14, 2008 at 11:54 AM, Matthew Tordoff
<ma...@markit.com> wrote:
> Hi all,
>
> I have recently been doing some investigation into making Artifactory
> Highly Available, and to be honest am having difficulty in finding an
> acceptable solution. To date the only solution I have found is having a
> 'cluster' of 2 Artifactory repositories which are load balanced. Each
> repository is then made to use the other as a proxy, so if a request for
> an artifact fails it searches in the repository of the other node.
>
> The problems I see with this approach are as follows:
>
> 1) There will be situations where losing one node will leave you with an
> incomplete set of artifacts. This will be when an artifact has been
> deployed to node X, and not yet requested from node Y - thus pulling it
> into it's local cache.
>
> 2) The second problem, similar to the first, is after a SNAPSHOT of
> artifact X has been deployed to node 1, and later requested from node 2,
> an updated version of that SNAPSHOT is then deployed to node 1. When a
> further request of that SNAPSHOT is made, the result of the request will
> be unknown - you could get one of the two different versions of the
> SNAPSHOT.
>
> 3) The security settings need to be maintained manually across the two
> nodes (potentially 3/4 if you include DR as well - and for our internal
> 20-30 different areas within the repository this is a huge overhead.)
>
> I have heard mumblings about the use of MySQL and it's replication
> abilities, however, have not seen any documented way to make use of
> these.
>
> If anyone has any further information on this topic then it would be
> greatly appreciated.
>
> Kind Regards,
>
> Matt Tordoff
>
> P.S. If there is no solution for Artifactory, is there a solution for
> any other product e.g. Archiva?
>
>
>
> The content of this e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient and may not be disclosed, copied or distributed. If you received this email in error, please contact the sender immediately by return e-mail or by telephoning +44 20 7260 2000, delete it and do not disclose its contents to any person. You should take full responsibility for checking this email for viruses. Markit reserves the right to monitor all e-mail communications through its network.
> Markit and its affiliated companies make no warranty as to the accuracy or completeness of any information contained in this message and hereby exclude any liability of any kind for the information contained herein. Any opinions expressed in this message are those of the author and do not necessarily reflect the opinions of Markit.
> For full details about Markit, its offerings and legal terms and conditions, please see Markit's website at http://www.markit.com <http://www.markit.com/> .
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Highly Available Artifactory

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Nexus has a few users that are sharing the storage between separate
Nexus instances directly via some shared backend like a SAN. Since Nexus
uses just a regular m2 repo layout for storage, the options for
clustering them are much greater and simpler.

-----Original Message-----
From: Matthew Tordoff [mailto:matthew.tordoff@markit.com] 
Sent: Friday, November 14, 2008 5:55 AM
To: Maven Users List
Subject: Highly Available Artifactory

Hi all,

I have recently been doing some investigation into making Artifactory
Highly Available, and to be honest am having difficulty in finding an
acceptable solution. To date the only solution I have found is having a
'cluster' of 2 Artifactory repositories which are load balanced. Each
repository is then made to use the other as a proxy, so if a request for
an artifact fails it searches in the repository of the other node.

The problems I see with this approach are as follows:

1) There will be situations where losing one node will leave you with an
incomplete set of artifacts. This will be when an artifact has been
deployed to node X, and not yet requested from node Y - thus pulling it
into it's local cache.

2) The second problem, similar to the first, is after a SNAPSHOT of
artifact X has been deployed to node 1, and later requested from node 2,
an updated version of that SNAPSHOT is then deployed to node 1. When a
further request of that SNAPSHOT is made, the result of the request will
be unknown - you could get one of the two different versions of the
SNAPSHOT.

3) The security settings need to be maintained manually across the two
nodes (potentially 3/4 if you include DR as well - and for our internal
20-30 different areas within the repository this is a huge overhead.)

I have heard mumblings about the use of MySQL and it's replication
abilities, however, have not seen any documented way to make use of
these.

If anyone has any further information on this topic then it would be
greatly appreciated.

Kind Regards,

Matt Tordoff

P.S. If there is no solution for Artifactory, is there a solution for
any other product e.g. Archiva?



The content of this e-mail is confidential and may be privileged. It may
be read, copied and used only by the intended recipient and may not be
disclosed, copied or distributed. If you received this email in error,
please contact the sender immediately by return e-mail or by telephoning
+44 20 7260 2000, delete it and do not disclose its contents to any
person. You should take full responsibility for checking this email for
viruses. Markit reserves the right to monitor all e-mail communications
through its network.
Markit and its affiliated companies make no warranty as to the accuracy
or completeness of any information contained in this message and hereby
exclude any liability of any kind for the information contained herein.
Any opinions expressed in this message are those of the author and do
not necessarily reflect the opinions of Markit.
For full details about Markit, its offerings and legal terms and
conditions, please see Markit's website at http://www.markit.com
<http://www.markit.com/> .

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Highly Available Artifactory

Posted by Matthew Tordoff <ma...@markit.com>.
Hi all,

I have recently been doing some investigation into making Artifactory
Highly Available, and to be honest am having difficulty in finding an
acceptable solution. To date the only solution I have found is having a
'cluster' of 2 Artifactory repositories which are load balanced. Each
repository is then made to use the other as a proxy, so if a request for
an artifact fails it searches in the repository of the other node.

The problems I see with this approach are as follows:

1) There will be situations where losing one node will leave you with an
incomplete set of artifacts. This will be when an artifact has been
deployed to node X, and not yet requested from node Y - thus pulling it
into it's local cache.

2) The second problem, similar to the first, is after a SNAPSHOT of
artifact X has been deployed to node 1, and later requested from node 2,
an updated version of that SNAPSHOT is then deployed to node 1. When a
further request of that SNAPSHOT is made, the result of the request will
be unknown - you could get one of the two different versions of the
SNAPSHOT.

3) The security settings need to be maintained manually across the two
nodes (potentially 3/4 if you include DR as well - and for our internal
20-30 different areas within the repository this is a huge overhead.)

I have heard mumblings about the use of MySQL and it's replication
abilities, however, have not seen any documented way to make use of
these.

If anyone has any further information on this topic then it would be
greatly appreciated.

Kind Regards,

Matt Tordoff

P.S. If there is no solution for Artifactory, is there a solution for
any other product e.g. Archiva?



The content of this e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient and may not be disclosed, copied or distributed. If you received this email in error, please contact the sender immediately by return e-mail or by telephoning +44 20 7260 2000, delete it and do not disclose its contents to any person. You should take full responsibility for checking this email for viruses. Markit reserves the right to monitor all e-mail communications through its network.
Markit and its affiliated companies make no warranty as to the accuracy or completeness of any information contained in this message and hereby exclude any liability of any kind for the information contained herein. Any opinions expressed in this message are those of the author and do not necessarily reflect the opinions of Markit.
For full details about Markit, its offerings and legal terms and conditions, please see Markit's website at http://www.markit.com <http://www.markit.com/> .

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org