Correct Maven Artifacts for LWJGL - java

I am trying to install LWJGL 3.2.3 with Eclipse and Maven. I copied and pasted the dependencies for everything on their website (this is what I got) into pom.xml. It gave me errors for versions, so I added the versions for every single dependency with <version>3.2.3</version>. That seemed to work, but now I have an error with <classifiers and I think it's for the OS artifact thing? I replaced the placeholders with windows and that leads me to Missing artifact org.lwjgl:lwjgl-meow:jar:windows:3.2.3, with lwjgl-meow being replaced by the library name.

The placeholders were meant to be natives-windows. Thank you #httpdigest!

Related

new dependency not recognised by Maven

Using maven version 3.6.3 and JDK version "openjdk-17"
I've tried using Maven's dependencies so I could use the xstream library in my project. Following a guide I added com.thoughtworks.xstream to my pom.xml file:
I then tried to use xstream, but intellij couldn't resolve "XStream" even though it seems to work for JavaFX just fine. This code does not compile.
EDIT: I loaded a new project, where I used, what I believe to be, up to date versions. Maven 3.8.1, the latest intellij version, and everything else (JDK, openjfx) at version 17.0.2 yet when I try to use "XStream" in my project code (after reloading the maven project) it says "Cannot resolve symbol XStream"
Edit 2:
I added junit to the dependencies, it works. I add Gson to the dependencies. It doesn't work.
I figured out that in the "modules-info.java" file, "requires xstream" is needed. That is all
One of the following may solve your problem:
These are based on my previous experiences.
because may be auto import disabled. re Import maven project.(intellij: press Ctrl+Shift+A then actions - input "reload" find "Reload All Maven Projects").
in my experience, sometimes it does happen that the dependency is not fully received. remove xstream special version folder from .m2 (com->thoughtworks->xstream) and repeat step 1.
maybe repository not valid. check repository source in file settings.xml in .m2 (if exist) or replace to other source.
invalid cache and restart (intellij: file-> invalid caches/restart). This has solved my problem several times.
Your access to the site or repository may be closed. check network policy or use vpn (Poor probability)

Dependency not found for javafx in IntellIJ

I have installed a fresh version of IntellIJ Idea (2018.1.2) and JDK 10.0.1. Maven 3.0 seems to come bundled with IntellIJ, but I have additionally downloaded and successfully installed it. In my pom file, there is a javafx dependency, and I am getting this:
Updating indices and reimporting doesn't help. What simple thing that will make it work am I too dumb to understand?
This artifact is not on maven central. (see https://search.maven.org/#search%7Cga%7C1%7Ccom.oracle%20javafx)
Maybe you have to configure a repository in your maven configuration where you can find your missing artifacts.
I think you are trying to use JavaFX as a Maven dependency. However, JavaFX is not available in a public Maven repository. JavaFX does not need to be hosted in a Maven repository as it is included as part of the underlying Java runtime.

How to resolve missing artifact error when using Eclipse AWS plugin?

I am using the aws Java plugin for Eclipse. I didn't have any issues during the installation process but after I used the plugin to create a sample DynamoDB project, I got this error
Missing artifact com.amazonaws:aws-java-sdk-cl....watchmetris.jar:1.11.123(click for 156 more...).
clicking didn't do anything.
I thought the error was due to the fact that I didn't install that jar during the installation process - I only installed "AWS Toolkit for Eclipse".
I went back into Eclipse and installed every non optional plugin from the aws(see below)
After I restarted Eclipse and tried creating my DynamoDB project again, I get a different failed to read artifact descriptor error(see below)
Has anyone experienced this issue before or know what the solution is? Elastic load balancer should be apart of AWS Toolkit which I installed. I've tried removing and reinstalling the aws plugin but I'am still getting missing artifact errors. I've looked at other threads on AWS plugin for Eclipse as well.
For anyone dealing with this issue with this issue, I got it to work! I can't really explain why it works though - maybe Maven's way of resetting some setting.
What I did was go inside pom.xml, the configuration file for Maven, and into the Dependencies tab. This is what I saw
I reasoned that the missing artifact was in the aws-java-sdk jar so I removed it. I then deleted the project from disk and created a new one. The new project came with the correct dependencies and no compiler errors!
The problem is not your AWS Toolkit, it's a problem of your Maven. Please try to create a project with Maven to check if Maven's setting is correct. If Maven is correct, please see your pom file in XML and check the dependency is correct? If you cannot create Maven project, it's means that your Maven setting is wrong somewhere!
I received a similar error "failure to transfer com.amazonaws:aws-java-sdk ...". The pom resolution could work, but here's another solution. So, when you start an aws project for the first time, certain artifacts necessary for maven are stored under .m2\repository\com\amazonaws.
What happened to me was that when I deleted one of my aws projects, I also deleted the resources being referred to which was somewhere in the aforementioned directory. And because the directory existed, eclipse's aws toolkit didn't bother downloading it again. I solved it by just deleting the $home.m2\repository\com\amazonaws directory. So next time I created a new aws project, it had to download all the artifacts.

Where are the dependency libraries defined in the build.gradle file downloaded?

I'd like to know where dependency jars are downloaded. Originally, I wanted to know this since I was trying to understand how I could add these jars specifically to my project class-path in my IntelliJ project but found a workaround here. But I'd just like to know what gets downloaded to what location on my machine.
Thanks
Gradle's dependency cache is located under ~/.gradle/caches. (Inspecting the dependencies of the generated IntelliJ project will reveal that.) The exact cache layout is unspecified, and may change between Gradle versions.

Why does M2Eclipse complain about missing artifact when mvn command line doesn't?

I've just set up a brand new installation of Eclipse Helios and have configured M2Eclipse to use an external (v 2.2.1) installation of Maven.
The system compiles fine on the command line, but from within M2Eclipse several of my project modules have an error:
Missing artifact javax.jms:jms:jar:1.1:test
I can get past the error by excluding the jms artifact from the Atomikos dependencies. But my main question is how can the two provide different results!
Even more odd is that I have another installation of Eclipse Helios and everything works fine.
The dependency resolver in m2eclipse is not using the external Maven installation, it has to use the embedded Maven version. So, I'd recommend to get the latest version of m2eclipse, as well as Maven 3.x version to minimize the difference in dependency resolution.
Additionally, it is possible that you had some alternative repositories defined in your maven 2.2.1 conf/settings.xml file. If you use the embedded maven3 these will be ignored.
You also can specify your maven 2.2.1 installation as the maven installation for m2eclipse.
I posted a similar question and finally found an answer. See m2eclipse says "Missing artifact" but I can build from cmdline!
You can find a different solution at http://getsatisfaction.com/sonatype/topics/_missing_artifact_from_m2eclipse_but_it_is_not_true
Same problem here: I use maven 2.2.1 as the installation to use from eclipse, as it is the one which works on the command line. Maven 3 does not work for this concrete project, complaining about some missing dependencies which, after much research, in my case turned out to come from old maven 1 repositories with legacy layout. Maven 3 hates these and will burst burst into cry when it finds them.
So maven 2 works just fine on the command line, but maven 3 does not. The problem with eclipse is that even if you specify maven 2 as the installation to build your projects, it uses maven 3 (the embedded installation) for dependency resolution, so if you are so unlucky to require a legacy repository you are screwed (I mean, eclipse won't help).

Categories

Resources