You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sammaiah Nagapuri <Sa...@hcl.in> on 2009/08/19 08:32:49 UTC
basic doubts
Hi to all,
I have small doubt. In my office I don't have internet access except outlook for web mail. In my room I have the net connection to my laptop. So I configured there and here in office maven.
Initially I run the command 'mvn install' in my laptop (which is having net connection). So it downloaded some plugins with structure i.e. ./m2/repository/.. . I copied that total structure to my office system. There I am trying to run 'mvn compile' or 'mvn test'. But here it is trying to connect the remote repository.
Why it is connection to remote repository once again even though it downloaded already some of the plugins.
1. How to avoid this?
2. What are the other configurations I have to do?
3. How to connect my local repository?
4. If it is related to settings.xml can anybody send me the basic settings.xml which is configured to connect local repository. And mention me which settings file as I saw there are two settings files.
5. After doing some configurations is it necessary to put the settings.xml in classpath?
6. And my last doubt is while we executing 'mvn install' phase whether it will download the plugins related to compile and testing etc plugins?
Please don't think these are very simple questions. As a beginner i am unable to move forward without getting the answers to these questions?
Advanced thanks.
Thanks & Regards
Sammaiah Nagapuri
P We have a responsibility to the environment
Before printing this e-mail or any other document, let's ask ourselves whether we need a hard copy
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------
Re: basic doubts
Posted by Ben Caradoc-Davies <Be...@csiro.au>.
Sammaiah Nagapuri wrote:
> Hi to all,
> I have small doubt. In my office I don't have internet access except outlook for web mail. In my room I have the net connection to my laptop. So I configured there and here in office maven.
> Initially I run the command 'mvn install' in my laptop (which is having net connection). So it downloaded some plugins with structure i.e. ./m2/repository/.. . I copied that total structure to my office system.
That is good solution to the problem.
> There I am trying to run 'mvn compile' or 'mvn test'. But here it is trying to connect the remote repository.
> Why it is connection to remote repository once again even though it downloaded already some of the plugins.
Maven's default behaviour is to check to see if any plugins or
dependencies are updated.
> 1. How to avoid this?
Use the -o flag to force Maven to run offline. For example:
mvn -o clean install
> 2. What are the other configurations I have to do?
None.
> 3. How to connect my local repository?
It is used automatically. Just make sure that your copied .m2 directory
is in the correct place, a subdirectory of your home directory e.g
Windows XP:
C:\Documents and Settings\%USERNAME%\.m2
Linux:
$HOME/.m2
($HOME is your home directory).
> 4. If it is related to settings.xml can anybody send me the basic settings.xml which is configured to connect local repository. And mention me which settings file as I saw there are two settings files.
Not needed.
> 5. After doing some configurations is it necessary to put the settings.xml in classpath?
No. settings.xml lives in the .m2 directory. If Maven needs it, it will
find it there. It is not related to the classpath.
> 6. And my last doubt is while we executing 'mvn install' phase whether it will download the plugins related to compile and testing etc plugins?
If running in offline mode, any plugin that has not been downloaded will
not be available. If you have already run "mvn install" in online mode
before copying your repository, then you already have the compile and
test phase plugins in your repository. I think they are probably shipped
with Maven anyway, so it should not be a problem.
> Please don't think these are very simple questions. As a beginner i am unable to move forward without getting the answers to these questions?
> Advanced thanks.
You are welcome.
--
Ben Caradoc-Davies <Be...@csiro.au>
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org