You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by maven apache <ap...@gmail.com> on 2010/12/01 11:06:14 UTC

can we use maven in offline environment?

Hi:
Out work environment is offline,so I wonder if we can use maven.

I know we can build our own repository ,then put the jars we are using in
the repositoryl,however jars we are using are so many,it is not a simple
work.

ALso,even if we put all the jars in the repository,how about when a new
depedency is required when building our project? Download the required jar
then put it in the repository again and again?

Re: can we use maven in offline environment?

Posted by maven apache <ap...@gmail.com>.
That's to say,all the required dependencies which are not in the repository
can not download through maven ,they can only be downloaded manully, and
transfered by a USB-flash-disk. :(

2010/12/1 maven apache <ap...@gmail.com>

>
> 2010/12/1 Antonio Petrelli <an...@gmail.com>
>
>> 2010/12/1 maven apache <ap...@gmail.com>:
>> > 2010/12/1 Antonio Petrelli <an...@gmail.com>
>> >> You can use:
>> >> mvn dependency:go-offline
>> >> to download any plugin and dependency in one shot, but you have still
>> >> need to be online at least once.
>> >>
>> >
>> > The fucking is the machine which hold the repository is off line also
>> .:(
>>
>> Very colourful :-D
>>
>> > However I am a bit confused: without Maven, how do you download
>> >> libraries you need?
>> >>
>> >
>> > We download the needed jars and put the to the develop machine.
>> >
>> > Since everyone download its own jars,so the version may be different,so
>> I
>> > thought maven :).
>> >
>> > What I considered is every time we download a new jar,and put it to the
>> > repository machine(off-line),we should put it as maven's struture--
>> *groupId
>> > *,artifactId,version. It is a little Cumbersome. :(
>>
>> You can try a trick: use a Maven repository manager in "proxy" mode
>> for all repositories you need on your own machine.
>> Change your settings.xml to depend on it.
>> Do a dependency:go-offline on your local machine, so the repository
>> will be populated.
>> Now create a repository on your build machine and downloaded artifacts
>> (if you use Nexus, transfer the whole "sonatype-work" directory under
>> your home) and let its Maven installation depend on it (settings.xml).
>>
>> However I am still confused: with "offline" you mean that the build
>> machine has no ethernet cable attached? So you phisically need to go
>> there and launch/check the build?
>>
> In a word,all development related machine can not access the internet. But
> they can access each other in the Local Area Network.
>
> I mean the build machine as my own work machine. It can access the
> repository machine through Local Area Network.
>
> I will have a try,thank you . :)
>
>> If yes, I don't envy you at all :-D
>>
>> Antonio
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

Re: can we use maven in offline environment?

Posted by Antonio Petrelli <an...@gmail.com>.
2010/12/1 Antonio Petrelli <an...@gmail.com>:
> 2010/12/1 maven apache <ap...@gmail.com>:
>> In a word,all development related machine can not access the internet. But
>> they can access each other in the Local Area Network.
>>
>> I mean the build machine as my own work machine. It can access the
>> repository machine through Local Area Network.
>
> But the repository machine should access the Internet at least once.
> Isn't it possible?
>
> Stupid security reasons :-D

Sorry I see your answer only now, but I have already pressed the
"send" button :-)

Antonio

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


Re: can we use maven in offline environment?

Posted by Anders Hammar <an...@hammar.net>.
If you want to use Maven, I strongly suggest that you work out a solution
where a central Maven Repository Manager (such as Nexus or Artifactory) in
your corporate dev environment, have direct Internet connection. If you
involve your infrastructure security people I'm sure they can come up with
an acceptable solution where it is placed in a separate zone for example,
giving adequate security.

Trying to create a Maven infrastructure without Internet connection, will
simply be an ongoing maintenance nightmare. Trust me, I've been there. The
thing is that it will not be a one time job getting your dependencies (incl.
Maven plugins) and copying them to you off-line environment. This will have
to be repeated every now and then, and often likely in a hurry because a new
version of something was needed yesterday.

/Anders

On Thu, Dec 2, 2010 at 01:22, maven apache <ap...@gmail.com> wrote:

> Thanks,I will have a try.
> 2010/12/1 Gajo Csaba <cs...@cosylab.com>
>
> > 1. create a dummy maven project
> > 2. in the pom.xml add in the <dependencies>, <plugins>  and <reporting>
> ALL
> > the files you'll need... possibly include all the versions as well
> > 3. go to a computer that does have internet and run mvn clean site
> package
> > install deploy dependency:go-offline and a handful of other commands you
> can
> > think of
> > 4. package your local .m2 directory into a zip file and copy on your usb
> > flash
> > 5. go to your local offline computer and extract the zip file
> > 6. in .m2/settings.xml set the <offline>true</offline>
> >
> > This is how you work with Maven in offline mode...
> >
> > Cheers, Csaba
> >
> >
> >
> > On 1.12.2010 11:51, maven apache wrote:
> >
> >> 2010/12/1 Antonio Petrelli<an...@gmail.com>
> >>
> >>  2010/12/1 maven apache<ap...@gmail.com>:
> >>>
> >>>> In a word,all development related machine can not access the internet.
> >>>>
> >>> But
> >>>
> >>>> they can access each other in the Local Area Network.
> >>>>
> >>>> I mean the build machine as my own work machine. It can access the
> >>>> repository machine through Local Area Network.
> >>>>
> >>> But the repository machine should access the Internet at least once.
> >>> Isn't it possible?
> >>>
> >>>  No. Once. All the jars can only be downloaded in a online machine then
> >> transfered to the repository machine by usb-dirver :(.
> >>
> >> If it can access the Internate once,I would not have these problems.
> >>
> >>  Stupid security reasons :-D
> >>>
> >>>  :(
> >>
> >>  Antonio
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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: can we use maven in offline environment?

Posted by maven apache <ap...@gmail.com>.
Thanks,I will have a try.
2010/12/1 Gajo Csaba <cs...@cosylab.com>

> 1. create a dummy maven project
> 2. in the pom.xml add in the <dependencies>, <plugins>  and <reporting> ALL
> the files you'll need... possibly include all the versions as well
> 3. go to a computer that does have internet and run mvn clean site package
> install deploy dependency:go-offline and a handful of other commands you can
> think of
> 4. package your local .m2 directory into a zip file and copy on your usb
> flash
> 5. go to your local offline computer and extract the zip file
> 6. in .m2/settings.xml set the <offline>true</offline>
>
> This is how you work with Maven in offline mode...
>
> Cheers, Csaba
>
>
>
> On 1.12.2010 11:51, maven apache wrote:
>
>> 2010/12/1 Antonio Petrelli<an...@gmail.com>
>>
>>  2010/12/1 maven apache<ap...@gmail.com>:
>>>
>>>> In a word,all development related machine can not access the internet.
>>>>
>>> But
>>>
>>>> they can access each other in the Local Area Network.
>>>>
>>>> I mean the build machine as my own work machine. It can access the
>>>> repository machine through Local Area Network.
>>>>
>>> But the repository machine should access the Internet at least once.
>>> Isn't it possible?
>>>
>>>  No. Once. All the jars can only be downloaded in a online machine then
>> transfered to the repository machine by usb-dirver :(.
>>
>> If it can access the Internate once,I would not have these problems.
>>
>>  Stupid security reasons :-D
>>>
>>>  :(
>>
>>  Antonio
>>>
>>> ---------------------------------------------------------------------
>>> 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: can we use maven in offline environment?

Posted by Martin Gainty <mg...@hotmail.com>.
this works for me
 
mvn --offline goal

bedankt,
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.



 

> Date: Wed, 1 Dec 2010 12:18:08 +0100
> From: csaba.gajo@cosylab.com
> To: users@maven.apache.org
> Subject: Re: can we use maven in offline environment?
> 
> 1. create a dummy maven project
> 2. in the pom.xml add in the <dependencies>, <plugins> and <reporting> 
> ALL the files you'll need... possibly include all the versions as well
> 3. go to a computer that does have internet and run mvn clean site 
> package install deploy dependency:go-offline and a handful of other 
> commands you can think of
> 4. package your local .m2 directory into a zip file and copy on your usb 
> flash
> 5. go to your local offline computer and extract the zip file
> 6. in .m2/settings.xml set the <offline>true</offline>
> 
> This is how you work with Maven in offline mode...
> 
> Cheers, Csaba
> 
> 
> On 1.12.2010 11:51, maven apache wrote:
> > 2010/12/1 Antonio Petrelli<an...@gmail.com>
> >
> >> 2010/12/1 maven apache<ap...@gmail.com>:
> >>> In a word,all development related machine can not access the internet.
> >> But
> >>> they can access each other in the Local Area Network.
> >>>
> >>> I mean the build machine as my own work machine. It can access the
> >>> repository machine through Local Area Network.
> >> But the repository machine should access the Internet at least once.
> >> Isn't it possible?
> >>
> > No. Once. All the jars can only be downloaded in a online machine then
> > transfered to the repository machine by usb-dirver :(.
> >
> > If it can access the Internate once,I would not have these problems.
> >
> >> Stupid security reasons :-D
> >>
> > :(
> >
> >> Antonio
> >>
> >> ---------------------------------------------------------------------
> >> 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: can we use maven in offline environment?

Posted by Gajo Csaba <cs...@cosylab.com>.
1. create a dummy maven project
2. in the pom.xml add in the <dependencies>, <plugins>  and <reporting> 
ALL the files you'll need... possibly include all the versions as well
3. go to a computer that does have internet and run mvn clean site 
package install deploy dependency:go-offline and a handful of other 
commands you can think of
4. package your local .m2 directory into a zip file and copy on your usb 
flash
5. go to your local offline computer and extract the zip file
6. in .m2/settings.xml set the <offline>true</offline>

This is how you work with Maven in offline mode...

Cheers, Csaba


On 1.12.2010 11:51, maven apache wrote:
> 2010/12/1 Antonio Petrelli<an...@gmail.com>
>
>> 2010/12/1 maven apache<ap...@gmail.com>:
>>> In a word,all development related machine can not access the internet.
>> But
>>> they can access each other in the Local Area Network.
>>>
>>> I mean the build machine as my own work machine. It can access the
>>> repository machine through Local Area Network.
>> But the repository machine should access the Internet at least once.
>> Isn't it possible?
>>
> No. Once. All the jars can only be downloaded in a online machine then
> transfered to the repository machine by usb-dirver :(.
>
> If it can access the Internate once,I would not have these problems.
>
>> Stupid security reasons :-D
>>
> :(
>
>> Antonio
>>
>> ---------------------------------------------------------------------
>> 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: can we use maven in offline environment?

Posted by maven apache <ap...@gmail.com>.
2010/12/1 Antonio Petrelli <an...@gmail.com>

> 2010/12/1 maven apache <ap...@gmail.com>:
> > In a word,all development related machine can not access the internet.
> But
> > they can access each other in the Local Area Network.
> >
> > I mean the build machine as my own work machine. It can access the
> > repository machine through Local Area Network.
>
> But the repository machine should access the Internet at least once.
> Isn't it possible?
>

No. Once. All the jars can only be downloaded in a online machine then
transfered to the repository machine by usb-dirver :(.

If it can access the Internate once,I would not have these problems.

>
> Stupid security reasons :-D
>
:(

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

Re: can we use maven in offline environment?

Posted by Antonio Petrelli <an...@gmail.com>.
2010/12/1 maven apache <ap...@gmail.com>:
> In a word,all development related machine can not access the internet. But
> they can access each other in the Local Area Network.
>
> I mean the build machine as my own work machine. It can access the
> repository machine through Local Area Network.

But the repository machine should access the Internet at least once.
Isn't it possible?

Stupid security reasons :-D

Antonio

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


Re: can we use maven in offline environment?

Posted by maven apache <ap...@gmail.com>.
2010/12/1 Antonio Petrelli <an...@gmail.com>

> 2010/12/1 maven apache <ap...@gmail.com>:
> > 2010/12/1 Antonio Petrelli <an...@gmail.com>
> >> You can use:
> >> mvn dependency:go-offline
> >> to download any plugin and dependency in one shot, but you have still
> >> need to be online at least once.
> >>
> >
> > The fucking is the machine which hold the repository is off line also .:(
>
> Very colourful :-D
>
> > However I am a bit confused: without Maven, how do you download
> >> libraries you need?
> >>
> >
> > We download the needed jars and put the to the develop machine.
> >
> > Since everyone download its own jars,so the version may be different,so I
> > thought maven :).
> >
> > What I considered is every time we download a new jar,and put it to the
> > repository machine(off-line),we should put it as maven's struture--
> *groupId
> > *,artifactId,version. It is a little Cumbersome. :(
>
> You can try a trick: use a Maven repository manager in "proxy" mode
> for all repositories you need on your own machine.
> Change your settings.xml to depend on it.
> Do a dependency:go-offline on your local machine, so the repository
> will be populated.
> Now create a repository on your build machine and downloaded artifacts
> (if you use Nexus, transfer the whole "sonatype-work" directory under
> your home) and let its Maven installation depend on it (settings.xml).
>
> However I am still confused: with "offline" you mean that the build
> machine has no ethernet cable attached? So you phisically need to go
> there and launch/check the build?
>
In a word,all development related machine can not access the internet. But
they can access each other in the Local Area Network.

I mean the build machine as my own work machine. It can access the
repository machine through Local Area Network.

I will have a try,thank you . :)

> If yes, I don't envy you at all :-D
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: can we use maven in offline environment?

Posted by Antonio Petrelli <an...@gmail.com>.
2010/12/1 maven apache <ap...@gmail.com>:
> 2010/12/1 Antonio Petrelli <an...@gmail.com>
>> You can use:
>> mvn dependency:go-offline
>> to download any plugin and dependency in one shot, but you have still
>> need to be online at least once.
>>
>
> The fucking is the machine which hold the repository is off line also .:(

Very colourful :-D

> However I am a bit confused: without Maven, how do you download
>> libraries you need?
>>
>
> We download the needed jars and put the to the develop machine.
>
> Since everyone download its own jars,so the version may be different,so I
> thought maven :).
>
> What I considered is every time we download a new jar,and put it to the
> repository machine(off-line),we should put it as maven's struture-- *groupId
> *,artifactId,version. It is a little Cumbersome. :(

You can try a trick: use a Maven repository manager in "proxy" mode
for all repositories you need on your own machine.
Change your settings.xml to depend on it.
Do a dependency:go-offline on your local machine, so the repository
will be populated.
Now create a repository on your build machine and downloaded artifacts
(if you use Nexus, transfer the whole "sonatype-work" directory under
your home) and let its Maven installation depend on it (settings.xml).

However I am still confused: with "offline" you mean that the build
machine has no ethernet cable attached? So you phisically need to go
there and launch/check the build?
If yes, I don't envy you at all :-D

Antonio

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


Re: can we use maven in offline environment?

Posted by maven apache <ap...@gmail.com>.
2010/12/1 Antonio Petrelli <an...@gmail.com>

> 2010/12/1 maven apache <ap...@gmail.com>:
> > Hi:
> > Out work environment is offline,so I wonder if we can use maven.
> >
> > I know we can build our own repository ,then put the jars we are using in
> > the repositoryl,however jars we are using are so many,it is not a simple
> > work.
> >
> > ALso,even if we put all the jars in the repository,how about when a new
> > depedency is required when building our project? Download the required
> jar
> > then put it in the repository again and again?
>
>
> You can use:
> mvn dependency:go-offline
> to download any plugin and dependency in one shot, but you have still
> need to be online at least once.
>

The fucking is the machine which hold the repository is off line also .:(

However I am a bit confused: without Maven, how do you download
> libraries you need?
>

We download the needed jars and put the to the develop machine.

Since everyone download its own jars,so the version may be different,so I
thought maven :).

What I considered is every time we download a new jar,and put it to the
repository machine(off-line),we should put it as maven's struture-- *groupId
*,artifactId,version. It is a little Cumbersome. :(



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

Re: can we use maven in offline environment?

Posted by Antonio Petrelli <an...@gmail.com>.
2010/12/1 maven apache <ap...@gmail.com>:
> Hi:
> Out work environment is offline,so I wonder if we can use maven.
>
> I know we can build our own repository ,then put the jars we are using in
> the repositoryl,however jars we are using are so many,it is not a simple
> work.
>
> ALso,even if we put all the jars in the repository,how about when a new
> depedency is required when building our project? Download the required jar
> then put it in the repository again and again?


You can use:
mvn dependency:go-offline
to download any plugin and dependency in one shot, but you have still
need to be online at least once.
However I am a bit confused: without Maven, how do you download
libraries you need?

Antonio

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