i was getting below error while creating Maven Project in Eclipse mars in javaEE perspective.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-war-plugin:jar:2.2
So by some search i found that by deleting .m2 repository folder i will get rid of that error.After that i created a maven project in eclipse and gave run as choose maven build->clean install.after this inside libraries in maven dependencies i find only junit-3.8.1.jar file,other .jar files are not found.What should i do to add those .jar files and inside repositry some folders like asm,xmlpull,net,javax,io,commons-lang,commons-io files are missing
any suggestions and answer are appreciated.
Related
I have my project jar published in Jfrog artifactory after being build. Now when some other project wants to download this and its dependencies, they have added it as a dependency in their build.gradle file. However, when we are trying to execute "gradle dependencies", only the project jar is being downloaded and not its dependencies.
Can someone help why the dependencies are not being downloaded.
Note: The pom.xml for the project jar is not uploaded to artifactory. Is this absolutely mandatory for downloading dependencies for project jar ?
I am having trouble deleting an external dependency from my build path. I have searched this site and the web but have not found a good answer.
I use gradle 4.9 and eclipse 4.7.3a to manage my automated tests. I have placed external jars in a folder named artifact in a git project's root directory.
My build.gradle file contains this line in the dependencies section:
compile fileTree(dir: "./artifact", include: '*.jar')
Well and good, it all works. However, when I try to delete a dependency using
Build Path > Configure Build Path... > Libraries > Project and External Dependencies
all the buttons, including Remove, are grayed out.
I can delete the file from the artifact directory and issue
gradle cleanEclipse
from the command line but when I open Eclipse and try to open the project (under Project Explorer) I get 'Open Project' has encountered a problem. The project description file (.project) for 'project name' is missing.
After replacing the old jar with the new version (different file name of course), I tried running
gradle
which is supposed to recreate configuration files deleted by cleanEclipse. No joy. Next, I tried running
gradle build
But after restarting eclipse, still a failure. The only thing that worked was to delete the project from eclipse and then to re-import it.
Is there an easier way?
Thank you.
Well, I found an answer.
After deleting and copying in the new jar file into the artifact directory, in eclipse, I selected Project > Clean ...
Then I right-clicked on the project and selected Gradle > Refresh Gradle project
I guess writing the question got me thinking about how eclipse handles .project files. Maybe this will help the next person.
I want to install the following plugin:
https://github.com/AgileReview-Project/AgileReview-EclipsePlugin
Its a maven project. I already successfully build the plugin with maven. Now, I want to install it.
How can I install it? When I build the file with Maven, no Jar file was created that I can use for installation.
pom is container of sub-modules, I see a lot of sub-directories in the project.
Somewhere, nested within the project structure you will find artifacts (modules) with jar packaging. Maven generally builds everything into /target subdirectories of each module. So after mvn install look into target subdirectory in a module with jar packaging.
The link you have (https://github.com/AgileReview-Project/AgileReview-EclipsePlugin) is the actual work code project of the plugin. (It is only interesting for the people working on the plugin or others who want to change/improve it).
According to AgileReview website, you'll have to simply do the old-way plugin installation. All the steps and infos are here
I download a j2ee project with a pom file which mention the dependency jar files needed. I want to know to run this pom file and download the jars need for my project? I right click and ran the pom file as maven build. Then it prompt me the Edit and Configuration UI which has the goals and profiles.
What are the values that i need to specify here?
Also is there any special configuration i need to add to eclipse (helios)?
How does the necessary jar files downloaded? Is it from the xsi:schemaLocation location specify in the pom file?
You can use these maven goals for that.
eclipse:eclipse - Download the dependency jars and set them to the classpath(you need to configure your settings.xml in the maven with the maven archiva repo path for maven to download jars from there)
install - build the project and install it in the local repo.
Have a look at this answer for the whole list of goals.
IF you install the Maven to Eclipse integration plugin (m2e), Eclipse will automagically add the project dependencies to the project's build path, and download them in the process.
I have imported multiple projects in eclipse through maven. After importing the projects in eclipse I saw that there are some error on the project folder in project explorer. All that errors are on pom.xml.
When I opened pom.xml the error is like this:
Project build error: Non-resolvable parent POM: Failure to find org.openhie.openempi:openempi:pom:2.2.5 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM
How to resolve this errors in eclipse? I tried a lot by adding the missing JAR's as specified in error message sometime, but still the errors are highlighting on pom.xml.
Please advice me for this.
Thanks
Install http://www.eclipse.org/m2e/ via the eclipse marketplace. The plugin adds a
classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"
entry in the .classpath file for eclipse and every jar from the maven dependencies will be in your classpath.
You have a maven plugin that does that. You have to go with the command line at the root of your maven project and type
mvn eclipse:eclipse
It will create (or update) an eclipse project with dependencies to the jar located in your local maven repository, and the eclipse project artifacts (.project, .classpath and other stuff) in the same repository.
Then import your project in eclipse using "Import existing project" wizard.
http://maven.apache.org/guides/mini/guide-ide-eclipse.html for more information