eclipse - problems with creating maven project - eclipse

I have tried to create a project with Maven in eclipse with no luck. I have researched and read, then tried the other solutions on other threads but I have no luck.
My settings.xml file is set and is filled out.
Whenever I try to make a maven project i always get this error:
Could not get the value for parameter encoding for plugin execution
default-resources Plugin
org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its
dependencies could not be resolved: Failure to transfer
org.codehaus.plexus:plexus-interpolation:jar:1.13 from
https://repo.maven.apache.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. Original error:
Could not transfer artifact
org.codehaus.plexus:plexus-interpolation:jar:1.13 from/to central
(https://repo.maven.apache.org/maven2): The operation was cancelled.

What solutions have you already tried ?
I had the same problem a few months ago, and it was because I was behind a proxy.
If it is the same for you, you could look at your web browser configuration.
From the documentation on Configuring a proxy:
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxyHost</host>
<port>proxyPort</port>
<username>proxyUser</username>
<password>userPassword</password>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>

Related

How to include your github repository in gradle dependencies

There are a lot of questions like this, but none seem to either work for me or answer my question directly.
I'm using Jhipster and MongoDB Atlas. Jhipster uses a library called Mongobee has a method used in it that works for MongoDB, but not for MongoDB Atlas. To boot, Mongobee seems not to be maintained anymore.
So I found someone's suggested PR that they sent to Mongobee for review, I took the code changes, forked Mongobee, and added these changes in my own repository.
I want to add this to my build.gradle dependencies, but keep coming up with "could not resolve all files for configuration 'compileClasspath'
could not find com.github.myUserName:mongobee"
the URL to my repo:
https://github.com/myFakeUserName/mongobee
I've included jitpack.io in my
buildscript {
repositories{
mvn {url...}
}
I'm hoping to get this forked and modified repo to be included as a gradle dependency in my java based application.
Okay, after a long while, I think I finally understand.
1) jitpack can't be used in buildscripts
I learned that here What's the difference between buildscript and allprojects in build.gradle?
2) afterwards run ./gradlew install
3) run ./gradlew build --refresh-dependencies
4) crack a cold one ferda' bois'.
Now, I'm currently pointing to my local MongoDB instance. I'm going to try to point it at Mongo Atlas (which is outside the scope of the immediate question), and if this is successful, I'll add my repo I forked from mongobee and modified with some other user's code(to whom, I'll give credit to) that solves this issue Reading of DBname.system.indexes failed on Atlas cluster by mongobee after getting connected.

How to update a maven dependency with a same version number in Azure Artifacts

We changed our maven private repository Nexus to Azure Artifacts.
And when we upload a private maven dependency with a some version, it told us below info:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
(default-deploy) on project HmapBasic: Failed to deploy artifacts:
Could not transfer artifact com.hand:HmapBasic:pom:3.0.3-RELEASE
from/to dev-azure-com-kohlerdevops-konnect-unified
(https://pkgs.dev.azure.com/KohlerDevOps/_packaging/Konnect-Unified/maven/v1/):
Failed to transfer file:
https://pkgs.dev.azure.com/KohlerDevOps/_packaging/Konnect-Unified/maven/v1/com/hand/HmapBasic/3.0.3-RELEASE/HmapBasic-3.0.3-RELEASE.pom.
Return code is: 409
I searched the code 409 error. It means we have already uploaded the dependency with this version and we can't upload this again.
We want to use the new dependency cover the old one without changing version(because if we change the version, all of our projects need to change pom.xml)
how can we do that in Azure Artifacts?
How to update a maven dependency with a same version number in Azure Artifacts
I am afraid you have to change the pom.xml, I understand how frustrating this is for you. But this is what Azure Artifacts deliberately designed to ensure the correctness of the build results.
Check the document: Understand immutability of packages.
Once you publish a particular version of a package to a feed, that
version number is permanently reserved. You cannot upload a newer
revision package with that same version number, or delete it and
upload a new package at the same version.
The reason for this design:
That because many package clients, including NuGet, keep a local cache
of packages on your machine. Once a client has cached a particular
package#version, it will return that copy on future install/restore
requests. If, on the server, you replace package#version (rev 1) with
a new package#version (rev 2), the client is unable to tell the
difference. the client still use the old version in cache. This can lead to indeterminate build results from
different machines.
So we could not overwrite all packages that have already been
uploaded, even we could not delete them and re-uploaded. To resolve
this issue, the only way is that upload the packages with a new
version.
Check my another thread for some more info.
Hope this helps.
I just made a test on Azure DevOps and if you use the "SNAPSHOT" suffix it will overwrite the previous package/artifact. For instance 2.0.0-SNAPSHOT.

Liberty for Java App Starter Code Issue on Eclipse

I hope that you can help me on this one.
I created a Liberty for Java App on Bluemix, downloaded the starter code, and imported it to my Java EE IDE(Eclipse Neon). Unfortunately I am getting this type of error:
Project build error: Non-resolvable parent POM for
net.wasdev.wlp.sample:JavaHelloWorldApp:1.0-SNAPSHOT: Failure to
transfer net.wasdev.maven.parent:java7-parent:pom:1.4 from
https://repo.maven.apache.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. Original error:
Could not transfer artifact
net.wasdev.maven.parent:java7-parent:pom:1.4 from/to central
(https://repo.maven.apache.org/maven2): Connection refused: connect
and 'parent.relativePath' points at no local POM

jenkins with copy artifact plugin without maven from GitHub

I am trying to deploy a war file into WAS8.5 with GitHub. at first I am specifying "EAR Path" with the war file in "Websphere Deployment" option. Then I made some changes in eclipse workspace and pushed into GitHub. Jenkins is checking for latest build but unable to deploy the same in Server. I have used copy artifact plugin, but still nothing happening. I may be wrong in configurations or something. I am getting the following exception:
Copied 0 artifacts from "simplewebapp" build number 20
ERROR: Failed to copy artifacts from simplewebapp with filter: *.war
Archiving artifacts
Finished: FAILURE
and in \jobs\simplewebapp\builds\lastSuccessfulBuild\archive\SimpleWebApp, am unable to see any archive file. How can i achieve it without Maven?
Kindly show me with some examples.
jenkinone
jenkintwo
As a final answer, I recommend to host your project code in GitHub, to use Jenkins/Maven to build your project and to publish the EAR/WAR file to WebSphere using this deployer plugin.

maven plugin - throwing Build Error

I am facing the below error while I am importing a plugin to the eclipse, using existing Maven Project option.
Project build error: Unresolveable build extension: Plugin com.atlassian.maven.plugins:maven-jira-plugin:3.2.3 or one of its dependencies could not be resolved: Failure to find com.atlassian.maven.plugins:maven-jira-plugin:jar:3.2.3 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
I am using sdk 3.2.3 & JIRA 4.2.1
You need to add an Atlassian Maven repository to your project, or your local Maven repository manager. Refer to Atlassian documentation for repository URLs. As far as I can see the maven-jira-plugin is there.