Any dependency not download in maven - eclipse

I have tried with add maven plugin below listed
1)market place
2)hlep->new install Software ->add new -> M2E and location http://download.eclipse.org/technology/m2e/releases/
3)I have also tried to download appache maven and follwed below URL step
http://o7planning.org/en/10101/install-maven-into-eclipse
But WhenI add new Maven Project I get error like as
It's not allowed download any existing depedency or add into Pom.xml
1)Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:
2)Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from
I have try to remove m2/repositories .lastmodified file
It's not work
Any other soluation please let me know

Related

Eclipse maven not adding dependencies

I am new to maven and am experiencing difficulties while trying to mavenise a Java project.
Setting:
IDE: Eclipse Oxygen.2 Release (4.7.2)
Java: 8
m2e: 1.8.2
What I did:
- copy-pasted the entire original java project and renamed it
- right-click in eclipse: Configure > Convert to Maven project
- in java build path, deletion of libraries import from original local lib repo. The build path shows the Maven Dependencies folder, with the only junit library.
- maven install => downloaded things in the user/.m2/repository/, but not all.
What does not work:
When I try to add a dependency right from a file:
,
nothing pops up in the artifact selection windows, even though there is a commons-logging/ folder in m2/repository
When I try to add the dependency manually in the pom.xml:
<dependency>
<groupId>org.kie.modules</groupId>
<artifactId>org-apache-commons-configuration-main</artifactId>
<version>6.5.0.Final</version>
<type>pom</type>
</dependency>
but the package resolution error still appears in the java file, and I get this warning after Maven install
`[WARNING] The POM for org.kie.modules:org-apache-commons-configuration-main:pom:6.5.0.Final is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details`
I did Maven Update project, eclipse project clean, nothing changes.
My goal for now is just that eclipse understands (at least for one library), that it has to take it from maven repository. I still have many other dependencies to solve (intra-project), but that will be the next step.
Thanks for your help.
The cause of the issue is stated in the warning message :
[WARNING] The POM for
org.kie.modules:org-apache-commons-configuration-main:pom:6.5.0.Final
is invalid, transitive dependencies (if any) will not be available,
enable debug logging for more details
It means that the pom.xml downloaded in your local maven repository exists but is not valid.
Delete the folder of the dependency downloaded in your local maven repository and try again.
If you still have the same problem, check that your central repository that provides the dependency provides also correctly the pom.xml for that.
You can do it by browsing the directory of the dependency from a web browser.
For example we can see that the maven central repository provides a valid pom :
http://central.maven.org/maven2/org/kie/modules/org-apache-commons-collections-main/6.5.0.Final/org-apache-commons-collections-main-6.5.0.Final.pom

JBoss Fuse Workspace Reference

I have created a JBoss Fuse Camel integration project and I can deploy it as a Profile on the Karaf Server using fabric8:deploy. The project is running fine so far.
Now I want to create a new Profile to do some other tasks. In oder to avoid double code, I wanted to create a Commons Project and add common code into this. But i cannot figure out how to add the dependency so that fabric8:deploy will still work and also deploy the commons library on BOTH profiles.
How should I add the commons project to both projects pom.xml?
I tried to add it as a normal dependency:
<dependency>
<groupId>com.my.project</groupId>
<artifactId>common-tools</artifactId>
<version>1.0.0</version>
</dependency>
but i'm getting this error when i want to deploy it via fabric8:deploy:
The POM for com.my.project:common-tools:jar:1.0.0 is missing, no dependency information available
and
Failed to execute goal on project inbound: Could not resolve dependencies for project com.my.project:inbound:bundle:1.0.1-SNAPSHOT: Failure to find com.my.project:common-tools:jar:1.0.0 in https://maven.repository.redhat.com/ga was cached in the local repository, resolution will not be reattempted until the update interval of red-hat-ga-repository has elapsed or updates are forced -> [Help 1]
The message indicates that your common-tools project could not be found in the maven repositories. Do you have it in your local maven repo? Have you done a:
mvn clean install
for the common-tools project?

RapidClipse Error

Am new to RapidClipse. I tried running it and got this error.
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'test2'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Please help.
RapidClipse projects are maven projects who are build with a maven plugin.
The 'Maven Project Builder' itself uses some additional plugins, among others the "maven-resources-plugin".
If a plugin doesn't exist in local repository, maven searches for it in remote repositories and tries to download it automatically to the local repository (default location: .m2/repository folder in user home directory).
This process fails here.
You can trigger the resolve-and-download process manually:
Be sure there is a working internet connection and, if necessary, the proxy settings are correct.
Rightclick on a Rapidclipse project in ProjectManagement or Project Explorer and go to Maven - Update project
Activate the checkbox Force Update of Snapshots/Releases and finish the dialog with OK
After that, the building process for the project should work.

Spring tool suit could not build with maven

my project can be built from the command line with maven clean install but i cannot update it through maven-> update project. it says
Could not calculate build plan: Plugin
org.apache.maven.plugins:maven-resources-plugin:2.4 or one of its
dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-resources-plugin:jar:2.4
i have tried installing maven-resources-plugin.jar manually to the repository, still its the same.

ArtifactDescriptorException: Failed to read artifact descriptor Maven error

I am using the latest Eclipse for Java EE with JBoss Tools installed so Maven is included. I imported an existing Maven project to my workspace and tried to update the dependencies but I only get errors error in my POM that some argument is invalid and no artifact could have been transfered.
There are actually two different errors and maybe they depend on each other?
You can check: the server is available and I also tried to reinstall Eclipse and JBoss. So what else is missing?
ArtifactDescriptorException: Failed to read artifact descriptor for
edu.kit.aifb.ai2.sqsclient:sqsclient:jar:1.0.0:
ArtifactResolutionException: Failure to transfer
edu.kit.aifb.ai2.sqsclient:sqsclient:pom:1.0.0 from
http://eorg-ai2.aifb.kit.edu:8081/nexus/content/repositories/releases
was cached in the local repository, resolution will not be reattempted
until the update interval of Beehive has elapsed or updates are
forced. Original error: Could not transfer artifact
edu.kit.aifb.ai2.sqsclient:sqsclient:pom:1.0.0 from/to Beehive
(http://eorg-ai2.aifb.kit.edu:8081/nexus/content/repositories/releases):
Invalid argument: getsockname to
http://eorg-ai2.aifb.kit.edu:8081/nexus/content/repositories/releases/edu/kit/aifb/ai2/sqsclient/sqsclient/1.0.0/sqsclient-1.0.0.pom
There is indeed nothing in my repository-folder but .pom.lastUpdated-files
Error resolving version for plugin
'org.apache.maven.plugins:maven-shade-plugin' from the repositories
[local (C:\Users\Gregor.Gregs.m2\repository), central
(http://repo1.maven.org/maven2)]: Plugin not found in any plugin
repository
Thank you
For me it was because Eclipse was caching the exception ( even after I solved the original problem ) so try to:
right click on project -> maven -> update-project -> force to update snapshot/release -> OK.
it worked for me for a similar problem.
Check in you eclipse that settings file path is pointing to right one.
Window --> Preferences --> Maven--> User Settings.
right click on project -> maven -> update-project -> force to update snapshot/release -> OK.
it worked for me too