David Shawn

+ Follow
since Aug 11, 2015
David likes ...
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Shawn

Enterprise multi-module project built on the pipeline. I have Main POM and Child POM. The child POM is where the node modules are built. I am getting error on the pipeline:

Build Failure Error: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (npm-install) on project.

Local build is successful and I am able to generate the war file. I can't post POM as I have restricted access to Internet.
2 months ago
Thanks for the reply. I am getting error on the library that's internally developed. I can't post the code/pom here as I have only restricted access to the internet.

There are 4 libraries in the package. All these 4 libraries of the package are available on Nexus. All these libraries are jar files. I am refering all the 4 libraries and of which, 3 libraries, I am not getting error. For the fourth one, I am getting error, "Package "package name" doesn't exist.

These libraries are used by many projects and for the other project, with the same reference, I am not getting error. In my team mate system, the build is successful. I am getting this error both on the local build as well as on the pipeline as well.
2 months ago
Enterprise Project; Project Built on Pipeline;

Build Env: Maven , Java and Nexus

I am using dependency management to refer a particular package in Nexus. It’s a multi-module project. Dependencies are referred in dependeny management of Parent POM. The packages are available on Nexus. When I build the project on the pipeline, I am getting error: Package doesn’t exist.

For other projects built on the pipeline, I am not getting this error.

If I do a local build, I am getting the same error as well. I deleted the entire m2 repo for local build but it’s able to download the other dependencies from Nexus and not this one.

But if my team-mate downloads the code from github and does a local build, his build is successfull.

What might be the issue?

Note: I cannot post POM as I have restricted access to Internet.
2 months ago
Thanks for the replies. Sorry about the confusion with regard to the terms SNAPSHOTS and SNAPSHOT Cycle

The Project is built on the pipeline. There are three cycles: Git Cycle , Jenkins Cycle and Deployment Cycle.

Jenkins Cycle: This is often called as SNAPSHOT cycle. As it build a snapshot of the artifact. During this cycle, Maven build the project.

Deployment Cycle: This is called as Release Cycle. During this cycle, it creates a secure and steady artifact from the SNAPSHOT artifact. This is called as Release Cycle.

In the Nexus there are two repositories - Called as SNAPSHOTS and RELEASES. In the snapshots repositories, the dependencies of SNAPSHOTS are stored and in the Releases repository, the Relased dependencies are stored. Snapshots are considered to be unstable, dev build. Releases are considered to be steady builds.

With regard to Jenkins, it's a pipeline and other builds are able to refer to the release as well as to the snapshot dependencies. I do have only restricted access to the Internet and thereby, I can't post the POM.

When the build is getting triggered in the pipeline, the pipeline were able to build only by referring it to the SNAPSHOT dependencies versions and not the Released dependencies versions.

When I refer to the SNAPSHOT dependencies, it builds artifact-SNAPSHOT with the SNAPSHOT dependencies and during the Deployment (Release cycle), it fails in the build citing "Can't release the project to non released dependencies"

The repositories been mentioned correctly same as the other project. Why the pipeline not able to refer the non-snapshot dependencies whereas it successfully build the war file when it refers to the snapshot dependencies?

Local build is successful only if the dependencies version are named as version-SNAPSHOT and build fails if named as version alone. Both the version-SNAPSHOT dependencies and version-withoutSNAPSHOT dependenices are available on Nexus.
2 months ago
Thanks for the reply.

1) . If I use the version as 1.0.0-SNAPSHOT and the library dependencies without SNAPSHOT, its giving compilation time errors

2) If I make the artifact as 1.0.0 without SNAPSHOT and the library dependencies with SNAPSHOT, it fails in the SNAPSHOT cycle citing that it doesn't allow 1.0.0 during the SNAPSHOT cycle

3) If I use the version as 1.0.0-SNAPSHOT and the library dependencies with SNAPSHOT, its failing in the RELEASE cycle.

4) I have updated the dependency jars to 1.0.0 without SNAPSHOT and uploaded it manually to Nexus 2 , but its talking only the SNAPSHOT version.

5) I dont have access to Internet in my company but POM is simple. Its a multi module. Parent Pom refers to only one module of Child Pom. Local build is successful.
2 months ago
I am building a project in a pipeline. I am getting Build Failure Error: Can't release the project due to non-released dependencies.

Multi-module java project using Maven as the Build tool and Nexus as repository manager in Jenkins pipeline.

When the artifact named as -SNAPSHOT, I was able to build a snapshot, generate war file, upload it to Nexus but during the next cycle in the Build phase, it fails with the error: Can't release the project due to non-released dependencies. I don't have any control over the scripts/steps in the pipeline.
2 months ago

Tim Holloway wrote:Perhaps you could clarify some things. Is this a personal project that only you need to build? A corporate/departmental project? An open-source project?

And while it would appear to be a stand-alone Java application and not a webapp or other specialized environment resource, could you explicitly tell us what it is?

You have JARs that are "not in Nexus". Do you mean a local Nexus repository, or are you looking at an Internet-wide public repository?

Now let's start from the ground up. If memory serves, the target command "mvn install" will build a Maven project and install it into your local Maven repository cache. So you don't need Nexus to resolve those artefacts. On the other hand, if Jenkins does the build, Jenkins has its own Maven repository cache. So to get those artefacts into that cache, you just have to make them Jenkins-managed products as well (with "install" goals), and setup Jenkins dependencies so that Jenkins will ensure that those artefacts have been built and installed before building your dependent project.

Which brings up another item. Is this copy of Jenkins something that you're running on your local machine, or is it a site-wide server? And if it's site-wide, can't you get permissions to install (via "mvn deploy") to the Nexus server? Seems like if you're expected to use the one, you should have some support for authorized use of the other as well. And incidentally, if there are versioning issues, don't forget that Nexus supports snapshot versions for development in addition to the formal versioning for official releases.

Thanks for the reply. It's a corporate project. It's built on the Pipeline. There are two repos: Nexus 2 and Nexus 3. The particular libraries are not available on Nexus 3 and pipeline takes the build only on Nexus 3.

We have raised a request to upload those libraries but it's not going to happen anytime soon. The Jenkins Pipelines takes it's files from the Github repostiory and builds the Java proj using Maven. I don't have control to pipeline or any of the scripts in Jenkins.

We downloaded all the libraries that's not available and put that in a folder in git hub. There are 4 cycles in the Pipeline. Github Cycle / Jenkins Cycle / Deployment Cycle / Release Cycle.

Github Cycle: In this cycle, it follows three stages. It takes the code from the code, build it. It build the snapshot and upload it to Nexus repo. In these 2 stages, it was able to successfully build by taking the code from the github and builds it and artifact generated. Third stage : It's really strange as in this stage, it again builds and build getting failed in this stage citing code for Non Released Dependencies for the jars that's uploaded in the git hub.

What might be the reason for this : When it can build in the first two stages of the Github cycle and getting failed in the third stage for Build Failure for non-released dependencies.

Pipeline is designed in such a way that it looks only on Nexus 3 and build during each phase of the cycle.
3 months ago

I like idea 3 most. It looks like your initial idea, but it makes an actual repository (with the necessary meta-data), instead of just a bunch of files.

Thanks for the reply and for the link.I can't use the file parameter as the pipeline won't take it from the file parameter. I tried to keep the jars in the root of the project repository in the Git hub and it was able to build successfully. It builds during the Snapshot phase and there were no errors and artifact getting generated. As it builds on the pipeline, now it was failing to build during the Deployment phase. What might be the reason for this?
3 months ago
I need to build a Java project on Maven. I am working on a multi module Maven project that's built on the Jenkins Pipeline in the Nexus repository. I have few libraries that are not available on Nexus repository. I can't manually upload the libraries. I am building this project on a pipeline.

What I did:

I created a folder named jars in the project root of the Git hub repository and manually put all the jar files that are not available on Nexus. In the dependency, I referenced all these local jars as:

  GAV parameters

In the repositories, I gave the URL of the git hub repo as:

            <url> git hub link of the jars folder </url>

The Jenkins were not able to pick the libraries. I am getting the following error: dependency: dependency version - Build Error - Could not build for non released dependencies and  I am getting error for all the jars that are in the jars folder. I tried putting the jars folder in src/main/resources but still getting the same error.

How can I reference this jar folder so that the Jenkins Pipeline can take it? I don't have control over the Jenkins / Scripts that are involved. I am a developer just building it on the Pipeline.

P.S: I don't have access to internet at my company to post the POM or the Build Failure errors.

3 months ago