I want to install processing via maven in intellij. I have added the following to my POM file:
<dependencies>
<dependency>
<groupId>org.processing</groupId>
<artifactId>processing-complete</artifactId>
<version>3.3.7</version>
</dependency>
</dependencies>
When trying to build, it says Cannot resolve org.processing:processing-complete:3.3.7
However, the file is definitely there in the repository: https://repo.maven.apache.org/maven2/org/processing/processing-complete/3.3.7/
anyone has any idea how to successfully build the complete processing library using maven or gradle?
PS. I am a huge noob with maven, so it might be something simple, but I've tried a bunch of stuff and nothing seems to work.
Edited to have the maven log: from mvn -X dependency:sources
https://gist.github.com/jurrejelle/91b59785c7a3184e776f0a1797c416f4
Your dependency section is asking for a jar file (the default type), which isn't present in the artifact. If you look on Maven Central, you can see that the given dependency tag includes a pom type tag:
<dependency>
<groupId>org.processing</groupId>
<artifactId>processing-complete</artifactId>
<version>3.3.7</version>
<type>pom</type>
</dependency>
I was able to reproduce your error using the XML you posted, and adding <type>pom</type> in my pom.xml cleared up the error for me.
Related
I am moving some test code from an older jHipster project to a new one. The old project uses the org.springframework.cloud.netflix.zuul library, specifically org.springframework.cloud:spring-cloud-netflix-core:1.3.0.RELEASE .
I put the below in my new project's pom.xml:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zuul</artifactId>
<version>1.3.0.RELEASE</version>
</dependency>
However, it seems to be pulling in org.springframework.boot:spring-boot:2.2.5.RELEASE. This release does not contain zuul in it however, as this code fails import org.springframework.cloud.netflix.zuul.
Does anyone know a fix or workaround?
Old library.
org.springframework.cloud:spring-cloud-netflix-core:1.3.0.RELEASE
My new project is using
org.springframework.boot:spring-boot:2.2.5.RELEASE
UPDATE:
Sorry I updated my question - my pom file already has this code. But it is very weird to me that even though I put to 1.3.0, I can see in my maven dependencies that it's pulling in 2.2.5. Also when I right click my project, I see maven - reimport and maven - generate sources etc.. I don't see a update project. And clicking both of those doesn't seem to downgrade it to 1.3.0
If you update your pom.xml file your problem would solve.
In your pom.xml file you'll see dependencies tag you need to add the library you want and then right click your project and say maven -> update project
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-core</artifactId>
<version>1.3.0.RELEASE</version>
</dependency>
</dependencies>
Add following dependency to your pom.xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
Upgrading spring-boot to >= 2.5 requires some extra configuration in order for Zuul to keep working, see:
https://gist.github.com/aldobongio/6a22f49863c7a777612f7887bbb8fd1d
The dependency version I want to use is 4.5.0 as specified in my pom.xml
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.5.0</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>4.5.0</version>
</dependency>
However, when I run mvn clean install -DskipTest=true. Maven will download and use version 4.2.2.
libraries
I tried searching in the entire project thinking maybe there are other files(in this case pom.xml) that specify the version to 4.2.2 but found nothing.
Has anybody encountered this issue before? I'm new to Java and I can't think of any other reason as to why this is happening.
Look at the output of mvn dependency:list. It will list you all dependencies of the project with their respective versions.
This is the truth. If your Eclipse or IntelliJ or whatever list something else, they are most certainly wrong/outdated.
I am following this guide to build an application named [Entando][2].
Particularly I did the steps in 2.2 using the maven command to build the application
mvn archetype:generate -Dfilter=entando-archetype-webapp-generic
and it was successful.
Then to launch the application there is written to use the maven command
mvn clean jetty:run
At first I had the error described here but solved thanks to the answer there.
Now I am getting a similar error for javax.xml.ws:WebServiceContext:
I tried to modify the pom.xml file by adding:
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>WebServiceContext</artifactId>
<version>2.2.11</version>
</dependency>
but it did not work resulting in the error:
Could not find artifact javax.xml.ws:WebServiceContext:jar:1.1.1 in snapshot-repository (https://oss.sonatype.org/content/repositories/snapshots/)
How can I solve it?
I found a solution, I will share it in case someone will need it:
In the pom.xml I added:
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.2.6</version>
</dependency>
No need to add this javax.xml.ws dependency if you are using JDK 1.8 its rt.java already include this. If your JDK do not have rt.java ,just reconfigure it in your eclipse.
Add this dependency in your project-
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.2.6</version>
</dependency>
and mvn clean install
I am trying to build jboss 6.2.2 from source. I have configure the settings.xml to use the official jboss repository as described here.
However midway i am getting error
[ERROR] Failed to execute goal on project jboss-as-clustering-jgroups: Could not resolve dependencies for project org.jboss.as:jboss-as-clustering-jgroups:jar:7.3.2.Final-redhat-SNAPSHOT: Could not find artifact org.jboss.as:jboss-as-clustering-common:jar:tests:7.3.2.Final-redhat-SNAPSHOT -> [Help 1]
But when i see the .m2 repository it seems like it is being downloaded correctly and the jar is present there. I tried deleting the whole jboss-as-clustering-common folder and doing a fresh mvn install, but i got the same error, even though this folder was downloaded again. I also tried mvn clean and did a build again, but to no use. What can be possibly wrong?
I think jboss-as-clustering-common is a dependency of jboss-as-clustering-jgroups. Both poms are attached.
Did you mean to use it this way
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-clustering</artifactId>
<version>${Pick a version which you need to use}</version>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-clustering-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-clustering-jgroups</artifactId>
<version>${project.version}</version>
</dependency>
I am very new to Neo4j and I want to get started with an embedded Neo4j in a Java Application.
I try to create an HelloWorld Application like the following:
https://neo4j.com/docs/java-reference/current/#tutorials-java-embedded
You can find the source code here:
https://github.com/neo4j/neo4j/blob/3.1/manual/embedded-examples/src/main/java/org/neo4j/examples/EmbeddedNeo4j.java
I created a new maven project and added org.neo4j:neo4j 3.0.3 as a dependency. Unfortunately I cannot import "org.neo4j.graphdb.factory.GraphDatabaseFactory", all other imports seem to be ok.
Now I figured out, that the import is working for version "3.1.0-SNAPSHOT" of the neo4j dependency.
Here you can find the relevant part of my pom-file:
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>3.1.0-SNAPSHOT</version>
</dependency>
</dependencies>
Because I want to use a stable version, I want to achieve this with version 3.0.3 as well, but I cannot find something that this factory is depending on this version or how you should do it at version 3.0.3. Can somebody provide information about this?
The dependency you should include in your pom.xml is
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>3.0.3</version>
</dependency>
As I see you already included the right dependency. Then I guess something went wrong during the resolving. Therefore purge your local repository and resolve the dependency again with following command
mvn dependency:purge-local-repository -Dinclude=org.neo4j:neo4j
If it's still not working you have to check if you are resolving the artifact from the maven central repository or somewhere else.