I am trying to compile a plugin for Bukkit and I cant seem to get it to work. I have copied some code from github "GitHub Code" and have imported it into eclipse as a maven project. When I try and do run-as 'Maven Build' it displays lot of text but finally gives me these errors.
Failed to execute goal on project BlockHunt: Could not resolve dependencies for project nl.Steffion:BlockHunt:jar:0.2.1-
b${env.BUILD_NUMBER}: Failed to collect dependencies at org.bukkit:bukkit:jar:1.7.9-R0.2-SNAPSHOT:
Failed to read artifact descriptor for org.bukkit:bukkit:jar:1.7.9-R0.2-SNAPSHOT: Could not transfer artifact org.bukkit:bukkit:pom:1.7.9-
R0.2-SNAPSHOT from/to bukkit-maven (http://repo.bukkit.org/content/repositories/releases/): Access denied
to http://repo.bukkit.org/content/repositories/releases/org/bukkit/bukkit/1.7.9-R0.2-SNAPSHOT/bukkit-1.7.9-R0.2-SNAPSHOT.pom.
I read in another post that I can put "dependency:copy-dependencies" in my run configurations for maven and its supposed try and download the stuff i need but it says access denied. I have never used maven or github so this is all new to me but it seems it should be really simple. All I really want to do is download the the code and create a jar file with it so I can use it. If anyone can point me in the right direction to making a jar from the code that would be great.
The plugin developer was getting the JavaDocs from the bukkit website, instead of downloading the jar and accessing it locally.
You may want to take a look at this, it may not specifically solve this problem, but it could help you get the code off of Github and into Eclipse correctly. – Jojodmo yesterday
His example showed you how to link to it locally.
Sometimes bukkit make some of their builds 'private', they do this to stop people downloading builds that did not pass the testing phase.
Remember that the link they are using is 1.7.9. At this time 1.8.1 is out so you might want to use the latest version.
Related
I initially created a plain Java project that followed the steps mentioned here and here but unfortunately, my project didn't work, I am getting this above error. I have not reached the step where it talks about integrating selenium.
Just to mention I used all the latest versions of the jar files as shown below.
I also got other various problems also, and to resolve them when I searched on the internet everyone was talking about the configuration inside the pom.xml file. But this file comes in the Maven project! so I converted my project to a Maven project. But that too didn't resolve my issues so I "disabled the Maven nature". No luck even after that.
currently, it is a Maven project but when I am following this step it is giving me the subject error.
This is how my package explorer look like:-
The trick is to start small with something working. And then after each change check if it still works. This will help you build an understanding of what each component and change does without overwhelming you.
Unfortunately you are following tutorials that do a whole lot at once. Try to break this down a bit. First learn about Maven, with plain Java and maybe a unit test. Then learn about how Eclipse works with Maven projects. Then use Cucumber with Maven, then add Selenium.
This may seem like a lot more work but it is faster because you'll only have to solve one problem at a time.
I don't have any tutorials for Maven or Eclipse but for Cucumber you use:
https://docs.cucumber.io/docs/guides/10-minute-tutorial/
I am an enthusiast attempting to play around and add things to an app that I have been using for the past year which the source codes are available in GitHub. Problem is when I clone or download the repository and open it in Eclipse, I get a ton of error codes whenever I try to 'run as' Java app (in particular I am unable to find the 'main class/starting point' there's way too many files to chose from to find it and most don't work) and when I try to extract the files to an executable jar it gives me a JAR exe that is unusable :-(. I know that the files are workable since I do use the executable jar that is available from the developer and others have also toyed around with the source codes.
Can anyone assist me with this? Maybe I am using the wrong Java manipulator/application. The program I am using for opening these files is Eclipse IDE for Java Developers and my operating system is 64bit Windows 10.
Also, here is the GitHub URL for the repository, in case anyone asks: https://github.com/DraqueT/PolyGlot.
I thank anyone who can be of some assistance as I have been working on this forever and can't seem to find a solution.
The github project looks a lot like a utility library than a full application. But the following could help:
Try to study the README file attached to the github project. (There is one in the source code according to the author). This would help you to setup the project.
Make sure to download all the dependencies for that project. Again, the author has provided some of them in the github project (I could see some Apache POI libraries in there somewhere), but getting the required jars on the maven repository isn't that difficult.
It would also help to know what type of project it is. For example, having a main method in a web application doesn't do much for you, but a Java SE project would need a main method to run. So try to find out what kind of project it is.
If all else fails, you could try to contact the owner of the repository or one of its contributors to assist you.
Cheers!
I've been working on a minecraft plugin with bukkit for a number of months now. However, suddenly, my maven install stopped working. I'm quite new to maven (and programming) in general. I'm using eclipse and have never used maven from the command line. Here is the error:
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/5/maven-parent-5.pom
[WARNING] Failed to canonicalize path C:\Users\Minecraft\.m2\repository\org\apache\maven\maven-parent\5\maven-parent-5.pom.lastUpdated: No more data is available
[WARNING] Failed to create parent directories for tracking file C:\Users\Minecraft\.m2\repository\org\apache\maven\maven-parent\5\maven-parent-5.pom.lastUpdated
[WARNING] Failed to canonicalize path C:\Users\Minecraft\.m2\repository\org\apache\maven\maven-parent\5\maven-parent-5.pom.lastUpdated: No more data is available
When I go to this local directory, there is no "5" directory and yet there is (I can't rename a file to 5 or anything like that). Network shared or something perhaps? But, I am able to delete the entire repository which is one thing I've tried.
What I've tried:
I deleted my repository directory in its entirety and tried again. Same error.
I've disk checked to make sure there were no issues.
It doesn't seem to be a lastupdated issue as described here: Maven downloads have .lastUpdated as extension
I tried using the wizard to create a new maven project. It warns me before the wizard completes that it won't compile. So, the wizard is not even creating a working project anymore.
I helped Douglas resolve this problem. It turns out that this machine had some malware running on it. The system could not create the directory named "5" anywhere. And, as shown above, this particular project required the creation of a directory named 5. The infected file was called rlls.dll. Malwarebytes cleaned out the infected software and allowed us to remove the cache and rerun Maven without any problems. All solved now. Not actually a maven issue at all.
I am at my wit's end and this should not be so difficult. Youtube v2 APIs are deprecated rendering my application useless. So, based on this website (https://developers.google.com/youtube/v3/code_samples/java#search_by_keyword), I am trying to run the sample. I downloaded google v3 client libraries from this location (https://code.google.com/p/google-api-java-client/). Now in the code sample there are multiple imports for com.google.api.services.*. But this jar is not included in the client libraries and I have spent more than 2 hours to figure out where to get this jar. I am going around circular references not finding anything. Is there some obvious stuff that I am missing. I am not familiar with maven, so if it is straightforward maven stuff, please just point me to the google site where I can download latest jar.
Thanks in advance.
I found it at http://mirrors.ibiblio.org/maven2/com/google/apis/google-api-services-youtube/v3-rev136-1.20.0/.
Though it solved my problem for now, can someone explain me the rationale behind having jars in such hidden locations. I am not full time into jave for the past few years, so I am not sure if I missed anything.
Go to this maven central repository link.
You can either download the jar directly or get maven/gradle dependency.
You can get all the google libraries in the maven central repository's google group
Note: Always use a build system, it will make your job easy. You don't need to manually download the file, extract to the right folder blah,blah,blah... Just include the dependency in the maven/gradle file and it will take care of the rest
I have completed the Java Tutorial for Google App Engine.
Now I wanted to do the Backend API Tutorial, but I get errors..
I installed Maven and I was able to generate the project from the command line with maven as described in "Creating an Endpoints Backend Project". I have problems with the next step: Configuring the Maven Project for Endpoints.
Under the point "Setting required plugin configuration" it says "2. Locate and replace the default appengine-maven-plugin configuration entirely with the following: ", before they were talking about the pom file from "helloendpoints/helloendpoints-war".
--> But in that pom.xml-file from "helloendpoints/helloendpoints-war", I cannot locate that configuration... I found that in the pom file of "helloendpoints/helloendpoints-ear".
Question 1: Is this (in ear-folder) the pom-file that i shall edit or should there be that configuration in the pom from the war folder?
However, replacing that code there or not both gives me an error when I invoke maven with "mvn install".
The error-message is the following: "Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war on project helloendpoints-war: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: basedir C:\Users...\helloendpoints\helloendpoints-war\target\generated-sources\appengine-endpoints does not exist".
And I can see that in "...\helloendpoints-war\target", there is no "generated-sources"-folder!
And this is where I am stuck now.
Question 2: Can all this be done without Maven and is there any tutorial for that? Because that is another source of errors and I had to deal with enough errors now... I just want to get an understanding of how the appengine works, how I can use it for my android app and then start from a WORKING basic-project, but I already had to deal with lots of errors. This is pretty frustrating, because I just wanted to do what is told in the tutorial and I still did not write any own code yet...
Question 3: In the next part of the tutorial, are they using the m2e-plugin or anything? Because that was mentioned nowhere, but somehow you have to import that maven project into eclipse...
Yes you can do it without Maven.This and this are simple tutorials from Google that shows you how to add a backend to an Android project.
I would suggest to delete this topic, because I switched to the tutorial without Maven, which has not much to do with my original post. That tutorial works now, but I cannot explain what solved it. I think this whole topic is more confusion and also wasted time for anyone else, who is trying to find an answer here.