I've successfully created a small software engineering environment (SEE) for Java applications that is - amongst other tools - based on maven and nexus. My actual problem is - not a real surprise - that nexus usually requires access to the internet to to get the requested artifacts from the central repositories. But the SEE has to be strictly off-line and there's no way to change it (.. security reasons).
My first quick solution was to mirror the nexus/maven installation on machine, that was connected to the internet, run some standard pom's to populate the mirrored nexus and migrate the cache via CD-ROM to the target system. Pretty ugly. I'm not really looking forward to adapt that process to get updates for artifacts or new ones. In fact, we now usually just import the libraries we need and create new artifacts (with nexus) instead using the official ones from central and others.
Has anybody faced the same challenge and found a more clever and efficient approach?
Edit
Thanks for all the answers, I think I have to be more precise on the actual problem and the solution I'm thinking of at the moment: I think I have to create, populate and synchronize a private 'central' repository, based on central and other repos on the internet, or exactly: two identical repositories. One connected to the internet the other on the local network. Then I can keep the internet connected repository 'up-to-date' and copy the changes via DVD to the local repository - which is visible for Nexus.
Would it work? Is there documentation available on how to setup something like 'central' on a private server, is there a mechanism to synchronize selected artifacts?
(didn't want to post my thoughts at the beginning because I hoped to get totally different ideas)
Edit 2 - "best practice" - added on request
Our "best practice" for using maven in an environment which is totally disconnected from the internet:
dependency:go-offline
(plugin). This populated the local repository with all required artedfactsDo this once a week with all POM files (can be automated) and you have a quite stable and usable local repository.
To use the user interface, fire up a web browser and type in the URL http://localhost:8081/nexus . You should see the user interface as displayed in Figure 3.5, “Application Window”. While we use localhost throughout this book, you may need to use the IP Loopback Address of 127.0.
If the repository manager fails to locate a component, it will cache this result for a given number of minutes. In other words, if the repository manager can't find a component in a remote repository, it will not perform repeated attempts to resolve this component until the Not Found Cache TTL time has been exceeded.
By default, the repository manager listens on port 8081. You can change this port, by changing the value in the $NEXUS_HOME/conf/nexus. properties file shown in "Contents of conf/nexus.
Would it work? Is there documentation available on how to setup something like 'central' on a private server, is there a mechanism to synchronize selected artifacts?
Well, you could become a mirror of central but, what's the point of grabbing ~10 GB of artifacts? You won't need all of them and the usual recommendation is to use a repository manager.
Actually my initial thoughts was:
rsync
the content of this Nexus to a DVD. I found this solution ugly but, now that we have more details on your situation, it might be an acceptable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With