Liberty for Java App Starter Code Issue on Eclipse - ibm-cloud

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

Related

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.

Jenkins with Git Hub clone issue

I am creating a Jenkins job with clone my project from GitHub.
The Jenkins work-space location is configured as follows.
${JENKINS_HOME}/workspace/${ITEM_FULLNAME}/
In Github, I created a sample project called "java".
Step1. I created a Jenkins job with name "test" and configured my github url.
While building, Jenkins clone the project called "java" in
~/.jenkins/workspace/test/java
Now jenkins give the following error while build.
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\pxp167.jenkins\workspace\test). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
Could anyone please help me to understand where I need to change my configuration

eclipse - problems with creating maven project

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>

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.