I want to install pig-maven, I download it and run mvn install command, then it tell me an error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process (default) on project pig-main: Failed to resolve dependencies for one or more projects in the reactor. Reason: Missing:
[ERROR] ----------
[ERROR] 1) org.apache.hive:hive-exec:jar:core:0.14.0-SNAPSHOT`
here is some relevant information in pom.xml:
<repositories>
<repository>
<id>repo.apache.snapshots</id>
<url>http://repository.apache.org/content/groups/snapshots-group/</url>
</repository>
<repository>
<id>repo.jboss.org</id>
<url>http://repository.jboss.com/nexus/content/groups/public/</url>
</repository>
</repositories>
...
<hive.version>0.14.0-SNAPSHOT</hive.version>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>${hive.version}</version>
<scope>compile</scope>
<classifier>core</classifier>
</dependency>
in specified snapshot repository I find it has some information of target jar but havent jar and pom. So then what should I do to install pig. The relate data as below:
What you are trying to install is the last version on github, it's a snapshot version and uses snapshots dependencies. You may try follow the tutorial of PIG and install a stable version.
It seems you are trying to install the development version of the project, however it depends on SNAPSHOT dependencies which are not available on your configured repositories.
Depending on what you really want you can:
As #grape_mao suggested, install a stable version using the proper guide (on the Github project go to releases and use the one you want)
If you really want to use this development version:
Find and configure a repository containing hive-exec-0.14.0-SNAPSHOT, the one your are showing does not contain the dependency or
Download and install yourself hive-exec-0.14.0-SNAPSHOT.jar from either a commit from the source code or a .jar file.
Related
Note: Before you mark this as duplicate please check all information as after 4 hours of search I couldn't find any close cases. All results were about Android Library or Gradle which is not correct on this case.
Links:
Build Log: https://jitpack.io/xyz/agmdev/AGMCore/3.3.1/build.log
Github Source: https://github.com/Ashenguard/AGMCore
Error:
Exit code: 0
Timed out after 20 min
ERROR: No build artifacts found
Project: Maven - Spigot
Version: 3.3.1
Today after finishing the coding, compiling, testing (All of them were successful on my PC) I decided it's time to upload it on Github and create the 3.3.1 release on jitpack.io so I or any other developer can use it in further projects as dependency.
Everything was ok until I started the new project depending on the new code I just uploaded.
But I faced the dependency not found on my IDE (Intelij) and I thought it is a connection issue or something similar, But after troubleshooting, I got to the Build being failure on jitpack.io.
Before you ask, I did test mvn install and it worked fine without any issue on my PC, but for some reason that I'm not aware of, jitpack fails...
What confused me more only thing that has been changed on pom.xml since the last successful build, is the version number
Possible issues that were not the issue in this case. (I'll update the list)
Packaging not being jar which was, Same as previous versions.
useIncrementalCompilation was not the issue as well.
This error can happen in multiple scenarios.
Scenario 1:
If the build fails
If there are no pom.xml or .pom files in build directory
If artifacts are not copied to $HOME/.m2/...
Scenario 2:
You can fix it by looking at https://github.com/jitpack/maven-modular
Scenario 3:
Try this jitpack example
Note: You can only solve it by yourself making sure you have double check your poms.
--- Updated --
Workaround:
Try to add JitPack repository and dependency in your pom.xml file:
JitPack repository:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
JitPack dependency:
<dependency>
<groupId>com.github.YourProjectName</groupId>
<artifactId>ID</artifactId>
<version>Tag</version>
</dependency>
Maybe it can fix the issue as you said it only occurs on JitPack.
After months of head-scratching, I found out the issue.
The issue was that Jitpack was not able to find one of the plugins I have used in the project, After adding the maven as a plugin repository the issue is gone and Jitpack is doing its job.
<pluginRepositories>
<pluginRepository>
<id>maven-snapshots</id>
<url>https://repository.apache.org/content/repositories/snapshots/</url>
</pluginRepository>
<pluginRepository>
<id>maven-shade-plugin</id>
<url>https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-shade-plugin</url>
</pluginRepository>
</pluginRepositories>
I try to add jnetpcap as a dependency to maven. I found on the internet the following that should be added to the pom file:
<dependency>
<groupId>jnetpcap</groupId>
<artifactId>jnetpcap</artifactId>
<version>1.4.r1425-1g</version>
</dependency>
I tried this with multiple version numbers, but maven can't find the version:
Dependency 'jnetpcap:jnetpcap:1.4.r1425-1g' not found (the version
is colored red).,
Also I tried to add the library via the project structure in IntelliJ. The Maven repository can find the jnetpcap library but when I try to import it i get:
No files were downloaded for jnetpcap:jnetpcap:1.4.r1425-1g.
The library can be manually imported via the jnetpcap.jar file but I need it as a maven dependency in my pom for creating a jar file of my project. Otherwise I get a jar file which can't execute since it is missing the dependency.
Does somebody know how I can include the dependency or otherwise how I can create a jar file of my project without missing this dependency?
The artifact is correct, however you are missing one little detail which is obvious, looking at the info page at mvnrepository.com:
https://mvnrepository.com/artifact/jnetpcap/jnetpcap/1.4.r1425-1g
Especially look at the table line Repositories. There you will see that this artifact is only listed in the "Clojars" repository, a non-standard repository you most likely have not added to your project.
Therefore adding the dependency is not enough, you also have to add the following section:
<repositories>
<repository>
<id>Clojars</id>
<name>Clojars</name>
<url>https://clojars.org/repo/</url>
</repository>
</repositories>
The version of the jar you are requesting is not published to the maven repository.
This would work
<dependency>
<groupId>jnetpcap</groupId>
<artifactId>jnetpcap</artifactId>
<version>1.4.r1425-1g</version>
</dependency>
I've set up a GitLab project that uses Oracle JDBC. The Oracle driver is not in Maven Central Repository, so I've added it on my project manually. That means that, locally, my builds run just fine.
The catch: I want to use GitLab's devops feature. However, my project won't build on GitLab because of this dependency issue, giving me the following error on maven build:
Could not find artifact com.oracle:ojdbc7:jar:12.1.0.2 in central
(https://repo.maven.apache.org/maven2) -> [Help 1]
I want to know how can I supply this dependency so that my project can be built successfully.
Has anyone experienced a similar issue?
POM.xml contains:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0.2</version>
</dependency>
If your pom.xml contains a dependency - then you should provide it or delete it.
If you're not trying to understand "maven" way of doing things and just want to make it work - try this "lazy" solution:
<repository>
<id>code-lds</id>
<url>https://code.lds.org/nexus/content/groups/main-repo</url>
</repository>
Add this repository to your section. It's a widely-used third-party repository that contains several common artifacts like Oracle drivers and etc.
I'm writing a maven web application using Netbeans.
I have just started using Maven so I'm not quite sure how it works.
When I try to build the application I get the following error:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project BioMarkUI: Fatal error compiling: java.lang.RuntimeException: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for uk.ac.ebi.kraken.interfaces.prediction.Label not found -> [Help 1]
In the POM.xml I have added the following:
<dependency>
<groupId>uk.ac.ebi.uniprot.kraken</groupId>
<artifactId>uniprotjapi</artifactId>
<version>1</version>
</dependency>
<repository>
<id>ebi-repo</id>
<name>ebi-repo</name>
<url>http://www.ebi.ac.uk/~maven/m2repo</url>
</repository>
And in the Dependencies folder I have added the uniprotjapi jars.
When I look through the class-files indeed I can not find a class called 'uk.ac.ebi.kraken.interfaces.prediction.Label'. Where is the information that says that it has to contain this class?
Can it cause trouble that I have made up the version id '1'?(It has no version and Netbeans won't allow me to leave it blank)?
The last version is 2014.01, so try this one. You cannot just make up version numbers else Maven won't be able to find it.
And make sure that you have the new repository in the right place in your POM:
<project>
...
<repositories>
<repository>
<id>my-internal-site</id>
<url>http://myserver/repo</url>
</repository>
</repositories>
...
</project>
See also Introduction to repositories
Wrong version, looking in http://www.ebi.ac.uk/~maven/m2repo/uk/ac/ebi/uniprot/kraken/uniprotjapi/2014.01/uniprotjapi-2014.01.pom you can see you should use version 2014.01 instead of 1 (or something else if you do not want the latest).
I'm using Netbeans and I want to grab the latest hibernate artifact from the jboss maven repository.
I have added the repository in netbeans, and I can navigate to it within the repository browser.
After I add this dependency to my pom.xml file and attempt to build my project, I get an error saying that the artifact could not be downloaded and i should attempt to do so manually.
From the output, it appears that it is only trying to download from the default central repository, and not the new repository i have added.
How I make it so that netbeans downloads the artifact I need from the jboss repository?
==== maven output ====
Downloading: http://repo1.maven.org/maven2/org/hibernate/hibernate/3.5.0.Beta-1/hibernate-3.5.0.Beta-1.pom
Unable to find resource 'org.hibernate:hibernate:pom:3.5.0.Beta-1' in repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/org/hibernate/hibernate/3.5.0.Beta-1/hibernate-3.5.0.Beta-1.pom
Unable to find resource 'org.hibernate:hibernate:pom:3.5.0.Beta-1' in repository central (http://repo1.maven.org/maven2)
[ERROR]BUILD ERROR
Failed to resolve artifact.
Missing:
1) org.hibernate:hibernate:pom:3.5.0.Beta-1
Path to dependency:
1) com.noisyair:wisi:war:0.0.1-SNAPSHOT
2) org.hibernate:hibernate:pom:3.5.0.Beta-1
1 required artifact is missing.
for artifact:
com.noisyair:wisi:war:0.0.1-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
Adding the JBoss repository in NetBeans is one thing but this won't make the content of this repository available to Maven projects. To do so, you need to add the JBoss Maven repository to the pom.xml of your project. Actually, the error you get has nothing to do with NetBeans, it is a pure Maven "issue".
To fix it, provide the following configuration:
<project>
...
<repositories>
<repository>
<id>repository.jboss.org</id>
<url>http://repository.jboss.org/maven2</url>
</repository>
...
</repositories>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.5.0-Beta-2</version>
</dependency>
...
</dependencies>
...
</project>
And Hibernate's jar will get downloaded successfully from the JBoss repository.
By "added the respoitory in netbeans" you mean that you added the repository for the repository browser? Then check that that repository is also declared in your pom file.
Netbeans 6.8 has really great maven support , for maven best practices see
MavenBestPractices ,There is a section called Utilizing and managing Maven repositories that show you how to add repositories to Netbeans , but as previously said you need to add repository to POM that has your artifacts.