Discussion:
Creating a Local Repository for Intranet Access without Internet Connection
S. Gökce Çelik
2011-02-21 10:48:09 UTC
Permalink
Hi,

I am working in a company which has separate networks for internet and intranet,
and a connection between those are strictly prohibited.
I have to create a development environment at the intranet side. As far as I
looked around there is no way to maintain the repository without a live
connection to the central repository.
Could you please give me a solution to overcome my problem. Thank you in
advance.

Kindly regards.

Gokce
Sumit Teke
2011-02-21 11:29:15 UTC
Permalink
Have a look at nexus http://nexus.sonatype.org/

Also you change your setting.xml under .m2 to download all dependencies
from your nexus which in turn can download all dependencies from
Internet if required.

Thanks,
Sumit Teke
Omniscient Software Pvt Ltd
T. +91-20-26680814, Ext. 217
F. +91-20-26680815, Ext. 212
M. +91-9975709032
Post by S. Gökce Çelik
Hi,
I am working in a company which has separate networks for internet and intranet,
and a connection between those are strictly prohibited.
I have to create a development environment at the intranet side. As far as I
looked around there is no way to maintain the repository without a live
connection to the central repository.
Could you please give me a solution to overcome my problem. Thank you in
advance.
Kindly regards.
Gokce
---------------------------------------------------------------------
koppaka pradeep
2011-02-21 11:49:06 UTC
Permalink
you can try various repository managers in market like
Nexus,
Apache archiva,
Artifactory...
After setting up your repository manager just include the
<settings>
...
<mirrors>
<mirror>
<id>internal-repository</id>
<name>Maven Repository Manager running on repo.mycompany.com</name>
<url>http://repo.mycompany.com/proxy</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
...
</settings>

This feature is only available in Maven 2.0.5+.
--
View this message in context: http://maven.40175.n5.nabble.com/Creating-a-Local-Repository-for-Intranet-Access-without-Internet-Connection-tp3393980p3394051.html
Sent from the Maven - Users mailing list archive at Nabble.com.
Wendy Smoak
2011-02-21 16:21:15 UTC
Permalink
Post by S. Gökce Çelik
I am working in a company which has separate networks for internet and intranet,
and a connection between those are strictly prohibited.
I have to create a development environment at the intranet side. As far as I
looked around there is no way to maintain the repository without a live
connection to the central repository.
Sure there is. You populate your internal repository manually,
preferably vetting the artifacts somehow based on corporate policies,
checking the signatures, etc.

If there are no strict rules about the artifacts themselves and it's
really only about the network separation, then I'd just do a build
while connected to the outside world, zip up my local repo, transfer
it to the internal repo server, and let my repository manager (Apache
Archiva) fix the metadata and then merge it all into the appropriate
permanent repositories.

Maven is happiest when there is a "remote" repository to connect to,
but there is no requirement that you have access to central. Any repo
that contains the artifacts you need will do.
--
Wendy
Gokce
2011-02-22 08:58:15 UTC
Permalink
Hi to all,
I'm actually trying to create the copy of the central repository in my
closed environment. But I don't know how to download all the repository
items to a media, which I plan to use later in my development environment.
The solutions specified in the previous replies will be helpful after that
point. After getting the whole repository I can manage it with Nexus,
Archiva or Artifactory. But I still didnt catch how can I download the whole
repository.
Thank you again.

Gokce
--
View this message in context: http://maven.40175.n5.nabble.com/Creating-a-Local-Repository-for-Intranet-Access-without-Internet-Connection-tp3393980p3395233.html
Sent from the Maven - Users mailing list archive at Nabble.com.
Anders Hammar
2011-02-22 09:16:56 UTC
Permalink
Well, you shouldn't download the entire central repo. It's rude to those
that are paying for the bandwidth!
Also, there is no easy way to scrape Maven central as it tries its best to
block that bad habit. It will also make to blacklisted for future downloads.

The absolutely easiest way to solve this is to work out a solution where
your repo manager does have Internet access and will be proxying the
artifacts from Internet. For most scenarios, there should be acceptable
solutions to this that the security concerned people can accept. I have done
this for customers with similar setup that you describe. Having a
centralized point where the artifacts are "proxied" (in the repo manager),
gives you the possibility to add functionality such as procurement.

If this still doesn't work, the way to go is to manually fetch the required
artifacts (not all, just the ones you need) and upload it to your repo
manager in the closed network. You will very soon realize that this is not
what you want to spend your days doing, and the managers will also realized
that this is not what they want to spend their money on.
Please remember that fetching the artifacts is not a one time job, but
something you will be doing whenever you need a new version of some
dependency, a new dependency, or simply just a new (or a new version of a)
plugin (which happens VERY often).

/Anders
Post by Gokce
Hi to all,
I'm actually trying to create the copy of the central repository in my
closed environment. But I don't know how to download all the repository
items to a media, which I plan to use later in my development environment.
The solutions specified in the previous replies will be helpful after that
point. After getting the whole repository I can manage it with Nexus,
Archiva or Artifactory. But I still didnt catch how can I download the whole
repository.
Thank you again.
Gokce
--
http://maven.40175.n5.nabble.com/Creating-a-Local-Repository-for-Intranet-Access-without-Internet-Connection-tp3393980p3395233.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
Ron Wheeler
2011-02-22 15:22:25 UTC
Permalink
Anders is right and that should be acceptable to people whose paranoia
is matched by their technical know-how.

If not, it would seem that doing a build with a dummy project that
included all of the dependencies that you need including the maven
plug-ins, on the machine connected to the internet would populate the repo.
Very simple POM file.
The machine could then be disconnected from the Internet and used as a
repo internally.
This could be done fairly easily if the server has 2 Ethernet ports and
you could just unplug one or the other depending on where you want to be.
Should satisfy your security guys and not piss off the Maven Central
people who can blacklist you if you try a total scrape of Central.

You may have to do the switch fairly often until you get your dependency
list settled but it should not take too long to get it right.

The maven plug-ins may change fairly often but usually you do not need
very many if you construct your projects in a sensible way and you may
not always have to use the latest version unless one of the bug fixes
applies to you.

It will be a lot more overhead than most of us would like but that is
just one of the costs of high levels of paranoia.
Do you ever watch the closing scene in American Graffiti where Kurt's
whole family and all his buddies are parked behind the airplane seeing
him off?

Ron
Post by Anders Hammar
Well, you shouldn't download the entire central repo. It's rude to those
that are paying for the bandwidth!
Also, there is no easy way to scrape Maven central as it tries its best to
block that bad habit. It will also make to blacklisted for future downloads.
The absolutely easiest way to solve this is to work out a solution where
your repo manager does have Internet access and will be proxying the
artifacts from Internet. For most scenarios, there should be acceptable
solutions to this that the security concerned people can accept. I have done
this for customers with similar setup that you describe. Having a
centralized point where the artifacts are "proxied" (in the repo manager),
gives you the possibility to add functionality such as procurement.
If this still doesn't work, the way to go is to manually fetch the required
artifacts (not all, just the ones you need) and upload it to your repo
manager in the closed network. You will very soon realize that this is not
what you want to spend your days doing, and the managers will also realized
that this is not what they want to spend their money on.
Please remember that fetching the artifacts is not a one time job, but
something you will be doing whenever you need a new version of some
dependency, a new dependency, or simply just a new (or a new version of a)
plugin (which happens VERY often).
/Anders
Post by Gokce
Hi to all,
I'm actually trying to create the copy of the central repository in my
closed environment. But I don't know how to download all the repository
items to a media, which I plan to use later in my development environment.
The solutions specified in the previous replies will be helpful after that
point. After getting the whole repository I can manage it with Nexus,
Archiva or Artifactory. But I still didnt catch how can I download the whole
repository.
Thank you again.
Gokce
--
http://maven.40175.n5.nabble.com/Creating-a-Local-Repository-for-Intranet-Access-without-Internet-Connection-tp3393980p3395233.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
Diego Lin
2011-02-22 09:09:42 UTC
Permalink
Hi Gokce,

You may download Archiva from apache. It is very easy to build the Maven
server according to its documents.

1 Visit your Maven server from a browser.
2 Login as admin of the server.
3 Configure the Repositories and Proxy Connectors in the Administration
section.

The third step is a must.

Thanks,

Diego

-----Original Message-----
From: Gokce [mailto:***@yahoo.com]
Sent: Tuesday, 22 February 2011 16:58
To: ***@maven.apache.org
Subject: Re: Creating a Local Repository for Intranet Access without
Internet Connection


Hi to all,
I'm actually trying to create the copy of the central repository in my
closed environment. But I don't know how to download all the repository
items to a media, which I plan to use later in my development
environment.
The solutions specified in the previous replies will be helpful after
that point. After getting the whole repository I can manage it with
Nexus, Archiva or Artifactory. But I still didnt catch how can I
download the whole repository.
Thank you again.

Gokce
--
View this message in context:
http://maven.40175.n5.nabble.com/Creating-a-Local-Repository-for-Intrane
t-Access-without-Internet-Connection-tp3393980p3395233.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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