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

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.

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)

A build scan was not published as you have not authenticated with server 'ge.spring.io'

I'm working on Windows 10 pro, Java 1_8 or Java 1_15. No corporate proxy,
connectivity to the internet works just fine.
I'm trying to build spring-boot from the source. I cloned the github repo, then checked out the tag that I needed.
git clone https://github.com/spring-projects/spring-boot.git
git checkout tags/v2.3.9.RELEASE
It failed to switch to that tag. It's actually the first time I saw an error while trying to switch to a tag. That's ok. I deleted that directory, switched to the tag in the browser and downloaded the zip.
I unzipped the directory and then attempted to build with gradle from source.
gradlew build
I got the following error
A build scan was not published as you have not authenticated with server 'ge.spring.io'
I originally tried with JDK 1.8 then switched to JDK 15. Same error both times.
I noticed that spring boot page suggested gradle wrapper. So I googled on how to do that and found that I needed to run
gradle wrapper
That produced the same error message.
So I thought maybe I should register with ge.spring.io. I actually looked into that when I first got the error. I didn't see any method to register. So now I looked even deeper and still could not find out how to register. I googled on how to register, nothing. I cannot be the only this has ever happened to. I also find it extremely odd that I cannot register, unless this repo is only for paying customers. If that is the case it's not really open source. Just putting the source out there with no way to build the actual binaries, while the source is open is absurd. So I know this cannot be a paid for sight that I need to register with just to build the source.
I looked through configuration files for where it might be referencing this site, I could not find it.
I thought, maybe the jars had built and it just could not push them to the site. That's fine I just need to jar files. However, I cannot find the jar files either.
By now I'm sure you surmised I'm not familiar with gradle, you would be correct. I can follow instructions on how to run it, but I have never used it n a project. I've used maven, ant, make and others.
If this error can be ignored, and I should look somewhere for the built jars, that would be the solution I'm looking for. If I need to register for the site in order to finish the build, then how do I do that?
The message about the build scan can be ignored. A build scan describes what happened during the build and isn’t needed to access the build’s output.
When you run build, each module’s jar is written to its build/libs directory. For example, you’ll find the jar for the spring-boot module in spring-boot-project/spring-boot/build/libs. Alternatively, you may want to run publishToMavenLocal. It will publish each module to your local Maven cache from where you can consume it in a Maven build, or a Gradle build configured with mavenLocal() as a repository.

Compilation error occurs if jars are added manually in Intellij

I am using Maven in my project, and for some reasons, some additional jars should be added manually (I have followed the step like Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project).
The package can be imported successfully. However, the compilation error happens, which indicates the package does not exist and cannot find the symbol of the used object.
I have tried the following tips but it remain unchanged:
Invalid caches / restarts
reimport
delete .idea file and .iml file
The scenario is quit similar to this one : https://intellij-support.jetbrains.com/hc/en-us/community/posts/206821195--beginner-question-including-external-jar-compile-error.
Please see the following sample images. It may run successfully but cannot be compiled well.
The reason is that when you add a library manually via IntelliJ, only IntelliJ knows about them and when you compile your code using Maven, it can't be find by Maven because Maven only searches for dependencies you defined in pom.xml.
You should install your libraries in your (at least) local maven repository and add them as a normal dependency in your pom.xml. Then you don't need to add them manually in IntelliJ.
You should follow the steps mentioned at Guide to installing 3rd party JARs
Update:
Also you should note that if you're working as a team, you should install this on the local maven repository of all developers (which is not practical). The best solution is to install a Maven repository (e.g. Nexus, Artifactory or Archiva) in a server on your local network and upload your private jar files on those servers. Then all developers can define the address of the local Maven repository server in their local Maven settings and use artifacts/libraries from that servers. Plus it works as a local cache/proxy to fetch any Maven artifacts and prevents unnecessary calls to public maven repositories.

Maven Build Error - Firefly Plugin - No plugin found

I have tried several methods to resolve this issue.
I am trying to install the Vaadin Starter App "Bakery"
Version using : Java, Shiro, Vaadin Platforms.
Error on build failure:
No plugin found for prefix 'firefly' in the current project and in the plugin groups
I've tried methods listed [here][1]
and another post by deleting my .m2/resources and letting it repopulate. and also a mvn clean install, but I keep getting same error messages.
Here is a [link][1] to the error messages:
Above the plugin error are some type of fetch cant get meta data messages.
I'm thinking it needs a different version of a plugin, needs pom file or settings file edited, but just have not found solution yet.
No plugin found for prefix 'firefly' in the current project and in the plugin groups
I believe it was with the plugin causing a problem. I went to this link, found the file, over-wrote the existing file with the one at the link, did a rebuild and it worked.
Maven-compiler-plugin

Could not resolve dependencies while building in Maven

Hi I am trying to build a maven project.
After building initial projects successfully, its failing. The error shows that it failed to collect dependency from a particular location in the local repository.
When I went to that location the jar files are missing in it. So I guess it is supposed to download from the remote repository.
I am wondering whether it fails to download or I am getting anything wrong? Also a few posts suggest to delete the .m2 folder. Will that cause any problems or am I suppose to delete the few folders in it?
Thanks
Try to force update dependencies with the switch -U. At least you can be sure that it is not because of your local error in .m2.

Categories

Resources