Re: Workarounds for down repos?

2006-05-10 Thread Gareth Western

Create a local (ie Intranet) repository, to store all the dependencies you
need. Maven-proxy (http://maven-proxy.codehaus.org/) is a good tool for
this, although in my experience it was a little bit of a hassle to get
working properly.

On 5/10/06, Sean McNamara [EMAIL PROTECTED] wrote:


Is there a way to work around down repositories?  It appears the all
apache.org sites are down (or are unavailable from our network.)




Re: [ANN] Free Maven 2 Book now available: Better Builds with Maven

2006-04-27 Thread Gareth Western
Just wanted to add my 2p by saying thanks very much for providing this book!
It is by far the most comprehensive and easy-to-read documentation regarding
Maven that I've found to date, and I would highly recommend it for anyone
that's starting with Maven or struggling to get to grips with the core
aspects!

Cheers!


Re: Please unsubscribe me

2006-04-11 Thread Gareth Western
To unsubscribe, e-mail: [EMAIL PROTECTED]

On 4/11/06, Venkatagopalaraju [EMAIL PROTECTED]
wrote:

 Dear Maven Users,

 Thank you very much for your coperation. I have successfully finished
 my tasks due to your help. I would like to take this opportunity to thank
 each one.


 Could you please unsubscribe me.


 Thanks  Regards
   Gopal







Re: Maven and CVS branches ...

2006-04-11 Thread Gareth Western
I thought it was possible in a POM (at least in Maven 2), if you just
specify the branch name in the tag section of the scm node?

See
http://maven.apache.org/ref/2.0.3-SNAPSHOT/maven-model/maven.html#class_scm

or does that only work for just CVS tags?

On 4/11/06, dan tran [EMAIL PROTECTED] wrote:

 No possible in the pom,

 however you can use continuum to drive this, and therefore
 no further manual interfaction is required ;-)

 -D





Re: Internal (intranet) repositories

2006-04-11 Thread Gareth Western
Hi EJ,

Apologies if this has already been suggested (I've already deleted most of
this thread), but have you tried adding the following to a file named 
settings.xml in your ${user.home}\.m2 directory (e.g. C:\documents and
settings\gareth\.m2\settings.xml):

settings
 mirrors
   mirror
 idmy-repo/id
 nameInternal mirror of http://build.corp.upromise.com/mavenrepository
/name
 urlhttp://build.corp.upromise.com/mavenrepository/url
 mirrorOfcentral/mirrorOf
   /mirror
 /mirrors
/settings

?

If you do that you shouldn't have to add anything to project POM (although
it does rely on each user having a settings.xml with these settings in
it).


Specifying the location of web.xml in the POM

2006-04-11 Thread Gareth Western
Hi,

I'm playing around with an old project in Maven, trying to see how to
upgrade our current build scripts. Unfortunately we do not use the
recommended directory structures, therefore I've specified an alternate
sourceDirectory (sourceDirectorysrc/sourceDirectory) and outputDirectory
(outputDirectoryclasses/outputDirectory) in the project's POM. This
particular artifact is a WAR, therefore it needs to include the web.xml from
a directory named webapp which is located in the same directory as the
src directory. How do I specify this in the POM? Is it a resource?

Thanks,

Gareth


Re: Quick explanation requested

2006-03-31 Thread Gareth Western
Hi,

You would only have an app stored on ibiblio if you were willing to
distribute your application (along with the source), and as long as your
application's licensing is compatible with this. AFAIK there are no
safeguards on ibiblio. It's a publicly-browsable repository which people
can use to retrieve code on which their own application relies. I would
guess that you don't need to upload your application to ibiblio anyway.
Perhaps you're confusing ibiblio with creating your own internal repository,
the latter of which you COULD upload your own applications for internal
downloads, etc.?

Cheers,

Gareth

On 3/31/06, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:

 I'd appreciate if someone can shed some light on 2 points.

 1) Why is it a good idea to have a complete app stored on ibiblio
 including source? Is there any safeguards as to who can download these
 projects (i.e. what security is in place, for example if someone knows or
 guesses your artifactId)?

 2) Why would we initate the following command below, if we get all the
 plugin components initally when we download any goal the first time?
 mvn install:install-file -DgroupId=javax.activation
 -DartifactId=activation -Dversion=1.0.2
   -Dpackaging=jar -Dfile=/

 Thanks.
 --
 Miike Tedesco
 --



Re: Quick explanation requested

2006-03-31 Thread Gareth Western
Well, once you have set up an internal repository, Maven can do anything
that it does with a normal repository. Some of the benefits of having an
internal repository are:

1) Faster downloads / Less use of your own Internet bandwidth
2) Machines that may not have access to the Internet might still be able to
access your internal one
3) You can easily add your own artifacts / artifacts that may not yet be
available on ibiblio or another public repository, such as some of the Sun
Jars, or alternative versions.

There is some documentation regarding repositories at
http://maven.apache.org/guides/introduction/introduction-to-repositories.html

Maven-Proxy is a very useful tool for setting up an internal repository.
It's available from http://maven-proxy.codehaus.org/.

I've heard bits and pieces of more official tools being developed for a
similar purpose to maven-proxy, but I don't think any are yet publicly
released.

Cheers,

Gareth



On 3/31/06, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:

 Oh Ok thanks for the explanation I think the internal repository idea is
 more what I had in mind. What can Mahven do in terms of this feature and
 is there any documentation for it?

 -- Thanks, Mike




Re: RE : [m2] Inter-project dependency question

2006-03-28 Thread Gareth Western
Hi Chris,

I'm not sure if this is the BEST way to do it, but what I do is create a
parent pom.xml in the root directory. Then add commons, web-app, and
stand-alone app as modules in that parent POM. Maven should figure out that
since webapp and standalone app are dependent on the commons module then
that's what needs to be built first. Then when you call mvn package (or
whatever your goal is) on the parent pom, maven will first do the commons
module before anything else. You'll also need to add parent tags to your
sub-project (commons, web-app, and stand-alone app).

See the example in the documentation at
http://maven.apache.org/guides/getting-started/index.html#How%20do%20I%20build%20more%20than%20one%20project%20at%20once
?
for more details

Hope that helps!

~Gareth

On 3/28/06, Chris Wall [EMAIL PROTECTED] wrote:

 Thanks Olivier.

 How do I represent this dependency in my webapp pom.xml?  I have the
 following dependency declaration, but M2 tries to download the jar instead
 of resolving that this is internally provided dependency.


 dependency
   groupIdmy-common/groupId
   artifactId my-common/artifactId
   version1.0-SNAPSHOT/version
 /dependency




Re: M2 - Best practice for common jars between EJB,WAR modules in EAR

2006-03-24 Thread Gareth Western
Hi,

Just a quick question, unrelated to your problem (sorry), but is it default
Maven behaviour to explode the dependencies of a WAR in to the
WEB-INF/classes directory within the WAR?

Thanks,
Gareth

On 3/23/06, Richard Sladek [EMAIL PROTECTED] wrote:


 I agree in that it is a good idea of treating wars as self-contained
 archives
 and if deployed on its own, this is even required, in fact. However, there
 is a little bit different situation when deploying war within an ear
 (which
 is pretty common). In such a case I consider the idea of skeleton wars
 (as
 proposed in some JIRA issue - see my first post) to be a good one - you
 know
 that your war will be bundled in ear so you don't want to explode
 dependencies in war but in the ear instead. These are completely two
 different scenarios and they should be clearly distinguished (in
 dependency
 definition by some conf property, for instance).




IDEA plugin module dependencies

2006-03-24 Thread Gareth Western
Hi,

I have a mult-module project for which I'd like to generate an IntelliJ
project using the IDEA plugin.

In my project, some of the modules are dependent on the other modules. Is it
possible for the IDEA plugin to mark these dependencies in the Project
Settings - Dependencies window, rather than just adding the resulting
artifacts into the Module Libraries settings?

Thanks,

Gareth


Re: Project ignoring custom respository?

2006-03-23 Thread Gareth Western
Hi again,

Yes, maven-proxy-webapp can contact the Internet (and ibiblio.org). If I go
directly to a URL on my maven-proxy, e.g.
http://myServer:8080/maven-proxy-webapp/repository/commons-logging/jars/commons-logging-1.0.1.jar,
then the proxy will download and store this jar correctly. It just doesn't
work when I'm trying to access it via the project on my local machine...

On 3/22/06, Thorsten Heit [EMAIL PROTECTED] wrote:


 Hi,

Does your Maven proxy have direct access to the Internet, i.e. can your
 proxy access ibiblio.org?

 Some days ago ibiblio.org wasn't accessible for a few people for some
 unknown reason, perhaps you should simply try again...?

 Regards

 Thorsten



Re: Project ignoring custom respository?

2006-03-23 Thread Gareth Western
Nevermind. The problem was just a typo in my maven-proxy.properties file.

The default configuration for the ibiblio repo, when downloaded from the
maven-proxy homepage, points to http://www.ibiblio.org/maven. This should
have been (for my project) http:///www.ibiblio.org/maven2

Very annoying!

Thanks for all the replies!

Gareth

On 3/23/06, Gareth Western [EMAIL PROTECTED] wrote:

 Hi again,

 Yes, maven-proxy-webapp can contact the Internet (and ibiblio.org). If I
 go directly to a URL on my maven-proxy, e.g.
 http://myServer:8080/maven-proxy-webapp/repository/commons-logging/jars/commons-logging-1.0.1.jar,
 then the proxy will download and store this jar correctly. It just doesn't
 work when I'm trying to access it via the project on my local machine...

 On 3/22/06, Thorsten Heit [EMAIL PROTECTED] wrote:

 
  Hi,

 Does your Maven proxy have direct access to the Internet, i.e. can your
  proxy access ibiblio.org?
 
  Some days ago ibiblio.org wasn't accessible for a few people for some
  unknown reason, perhaps you should simply try again...?
 
  Regards
 
  Thorsten
 



Disable maven-proxy output

2006-03-23 Thread Gareth Western
Sorry for this being slightly off topic, but can someone tell me how to
disable the ouput from maven-proxy?

I assume I just need to create a log4j.properties and put it somewhere in
the classpath but i'm not sure where to put it? Do I need to overwrite the
log4j.properties already contained within the maven-proxy-core jar file, or
will an external properties file take precedence?

Thanks,

Gareth


Should a WAR directory have Java code? And why does my WAR have both classes and Jars?

2006-03-22 Thread Gareth Western
Hi,

I'm just getting started with Maven and i'm jumping straight in to the deep
end by trying to convert our existing multi-module project from large,
complex Ant scripts to a (hopefully, by the end of it) simpler POM. The end
result for the project is to create a WAR file, containing each of the
previously complied modules as JARs. The directory structure is something
like this:

-module1
--src
---java
-module2
--src
---java
...
-warModule
--src
---java
---webapp

My first question is: is it ok to have both web application stuff (web.xml /
graphics / etc) as well as java code to be compiled all in the same module
(ie warModule)? Or would it be better practice to take the Java classes
from the warModule and create another module / JAR just for those, and then
include those in to warModule?

My second question is: I now have the project compiling and creating a WAR
file. This WAR contains the web.xml, graphics and the JARs from the other
modules, however it also seems to be including all the CLASS files from
these JARs (ie the expanded JARs). So for example in the WAR I'll have a
copy of module1.jar (which contains myClass1.class and myClass2.class), as
well as a copy of myClass1.class and myClass2.class.

Does anyone know what I could be doing to cause this? If not I can post a
copy of the pom.xml from the modules (either the JAR ones, the WAR one, or
both?).

Thanks for any and all help.

Gareth


Project ignoring custom respository?

2006-03-22 Thread Gareth Western
Hi,

I'm trying to setup a local repository using the maven-proxy webapp. I have
successfully installed the webapp on a local Tomcat server, and i'm
monitoring the catalina.out log file to see what happens. In a project on my
local machine, I have the following specified in my pom.xml:

project
...
   repositories
 repository
  idmy-repo/id
  namemy custom repo/name
  urlhttp://myserver:8080/maven-proxy-webapp/repository/url
 /repository
   /repositories
/project


i clean out my local machine's repository in order to try to use the
maven-proxy-webapp, however whenever I run the project (mvn compile), the
project just goes straight to ibiblio to fetch the dependencies!

Does anyone have any suggestions as to why the project is not picking up my
local repository?

Thanks,

Gareth


Re: Project ignoring custom respository?

2006-03-22 Thread Gareth Western
Hi Thorsten,

Thanks for your reply! So by doing that, you're saying that you only want to
use your mirror if the central repo is down, correct?

However I would like to use the maven proxy before trying to contact
central. What am I getting wrong?

Thanks,

Gareth

On 3/22/06, Thorsten Heit [EMAIL PROTECTED] wrote:

 Hi Gareth,

 I'm using the following in my pom.xml:

 repositories
   repository
 releases
   enabledfalse/enabled
 /releases
 idapache.snapshots/id
 nameApache Development Repository/name
 urlhttp://cvs.apache.org/maven-snapshot-repository/url
   /repository
 /repositories


 The Maven proxy is specified in my settings.xml:

 settings
   mirrors
 mirror
   idbender/id
   nameInternal mirror of http://repo1.maven.org/maven2//name
   urlhttp://maven_proxy:/repository/url
   mirrorOfcentral/mirrorOf
 /mirror
   /mirrors
 /settings

 Thorsten




Re: Project ignoring custom respository?

2006-03-22 Thread Gareth Western
Ah thanks! Ok, so now i'm getting somewhere. Now my internal maven proxy is
being contacted, however it doesn't seem to be able to fetch anything from
central. For example: I removed everything from ~/.m2/repository and ran my
project again, however it fell over straight away with:
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not
exist or no valid version could be found
[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]


I assume this means it can't fetch the maven-resources-plugin from the
repository (because it's not in my local one yet). But why didn't it then go
on to try central?

Sorry for all the bother, and once again thank you for your help!

Gareth

On 3/22/06, Thorsten Heit [EMAIL PROTECTED] wrote:


 No, the proxy is always contacted. See
 http://maven.apache.org/guides/mini/guide-mirror-settings.html

 Thorsten