Apt repository within Sonatype Nexus 3 - maven

Trying to use Nexus 3.15.2 as a local/offline package manager. Npm and Maven repos are OK. But, also want to use as an APT repository. It has yum repository feature but not apt repository type. Tried to use nexus-repository-apt plugin with docker container by following these instructions https://github.com/sonatype-nexus-community/nexus-repository-apt, but i could not make it.
Nexus Version: Sonatype Nexus OSS 3.15.2-01
Nexus Apt Repository Plugin: nexus-repository-apt-1.0.10
What I'm missing?

I followed the instructions given in the link, but this time used version 3.16 instead of 3.15. I even created the image and run it successfully, and created Apt repository and upload packages finally. Do not know why it forbids me to upload apt packages even if I could make the container running in version 3.15. Anyway, works fine with the version 3.16.

Related

Is it possible to install rpm package from a Nexus yum repo using Maven?

I would like to create a zip with some files and rpm packages using Maven assembly plugin and I would like to know if there is a way to download the rpm from a Nexus yum repository with the pom.xml (as a dependency or anything else).
I have found the rpm-maven-plugin but it can only create an rpm, it can't download it from Nexus.
I have found the solution, I used mvn wagon:
mvn wagon:upload-single -Dwagon.serverId=<ServerID> -Dwagon.url=http://<ServerUrl>/repository/<NexusReposirory>/<RPM file name> -Dwagon.fromFile=<RPM file>

Maven install plugin not found

I have to add some .pom files to the local .m2 repository and I am working on an offline system.
After successfully installing maven (checked with mvn -v) i tried to install the desired files using mvn install:install-file -Dfile=<Path/to/pom>.
However, this leads to a NoPluginFoundforPrefixException, because the prefix "install" is apparently unknown. Trying to download it from the central repository after execution obviously fails since the computer is not connected to the internet.
How can I get mvn install to work?
For the first time you need to use internet, so that your local/central repository get all the plugins which required to use mvn install.
Then you can work on offline mode.

Is there a durable store for deb files (like a maven repo?)

I have a maven built docker image that was dependent on libssl1.0.2_1.0.2d-3_amd64.deb, but this has now a 404 and has been replaced by libssl1.0.2_1.0.2e-1_amd64.deb.
This is a problem because maven builds are meant to be durable - ie you can rebuild them at any point in the future. The main maven repo is durable, so artefacts taken from that will be there in the future. I could move the debs I need into the maven repo, but that is a bit of abuse of other peoples storage...
So is there a durable store of debian files that is guaranteed to exist... well at least until the revolution/meteor strike/Jurassic resurrection etc.
You can do this yourself with free, open-source tools. You can create your own APT repository for storing Debian packages. If you are interested in using GPG signature to sign repository metadata read this.
Once you've created the repository, you can create a configuration file in /etc/apt/sources.list.d/ pointing to your repository. You can run apt-get update to refresh your systems apt cache, and then run apt-get install to install the package of your choice.
BTW, you can install a particular version of a package by running: apt-get install packagename=version.
For example, to install version 1.0 of "test", run: apt-get install test=1.0.
Alternatively, if you don't want to deal with any of this yourself you can just use packagecloud.io for hosting Debian, RPM, RubyGem, and Python PyPI repositories. A lot of people who use our service have your exact use case, where Debian packages they depend on disappear from public repositories so they upload them to us.

Install Maven on Ubuntu

I am not able to install maven in Ubuntu 12.04
I tried : sudo apt-get install maven
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package maven is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'maven' has no installation candidate
when i run : apt-cache search maven
libapache-pom-java - Maven metadata for all Apache Software projects
libcommons-parent-java - Maven metadata for Apache Commons project
maven-ant-helper - helper scripts for building Maven components with ant
maven-repo-helper - Helper tools for including Maven metadata in Debian packages
libjenkins-plugin-parent-java - Jenkins Plugin Parent Maven POM
I am getting a message like this. How to resolve this ?
First search for Maven package....
For that run this command in terminal..
apt-cache search maven
Then install...
sudo apt-get install maven
And at last for verification...
mvn -version
Hope this will help you.... ;)
Download maven from apache maven official site and extract.
Move the application directory to /usr/local
sudo cp -R apache-maven-X.X.X /usr/local
Make a soft link in /usr/bin for universal access of mvn
sudo ln -s /usr/local/apache-maven-X.X.X/bin/mvn /usr/bin/mvn
Verify mvn installation
mvn --version

How to install artifacts into the local gradle filestore

Can anyone tell me how to install an artifact/project into the local gradle filestore?
gradle install
installs it to the local maven repository but I need to have it in
~/.gradle/caches/artifacts-15/filestore
It's a pure cache, and you can't install into it (by design). If you could, reproducibility would suffer (build works on one machine but not on another).
If you install it to your local maven repository and refer to the repository in you gradle build file, you will have solved your problem.
See
Is there a way to install jar local gradle repository, as it in mave (maven install:install-file
EDIT: You don't even have to install the jar into your maven repo:
https://stackoverflow.com/a/13531958/260122

Resources