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
Related
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>
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.
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.
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
I am using maven and JavaFX Maven Plugin. Maven will download jar from repository and save it to ~/.m2 directory. But if I use maven as sudo. For example, if I type sudo mvn com.zenjava:javafx-maven-plugin:2.0:fix-classpath, is there any difference with the command without sudo? Does maven download the plugin and save it to ~/.m2 as well?
I ask this question because I run this command both under sudo and no-sudo. It seems maven will re-download the plugin each time.
I think your question is related to this one.
So the answer to your question, would be if you are not changing the home directory while executing sudo, maven will download plugins to your user .m2 directory.