Eclipse Project not working in Jenkins - eclipse

I have a Maven Project that creates a table in AWS DynamoDB and push few values to it. This project is built in Eclipse. But when I try to do a Maven build of same project in Jenkins, the Build Status is successful. But no table is getting created in DynamoDB. Is it because the created .jar file after build in Jenkins is not getting executed? In that case, I tried to add a batch command to execute the created .jar file as java -jar "samples-1.0.0.jar". Then, I am getting an error as no main manifest attribute, in samples-1.0.0.jar. Why is this not happening in Jenkins while it works fine with Eclipse ?

Related

Mule -Local Deployment issues on Mule using AnyPointStudio 6 on Windows 10

I have an application which uses files in src/main/resources. When I do a maven clean install it generates a zip file which it puts in my local .m2 repository and in the the target folder. However, when I choose the Run As-> Run Configurations so that I can run the app locally, Mule chooses the wrong folder, which is in my workspace. That folder doesn't have the resources folder. How can I change the location of the file that Mule should use to run the local deployment, i.e. the embedded local server? The same application deploys correctly on windows 7 and with Anypointstudio 6.
The option Mule -> mavenize is grayed out in my IDE. However, when I select Run As-Run Configuration I can see Run As Maven Application. I choose that option and added the JVM arguments and tried to deploy. The build succeeded as shown:
INFO] Adding as a lib
[INFO] C:\Users\orbee\AnypointStudio\workspace\TestProject\mappings
does not exist, skipping
[INFO] Building zip:
C:\Users\orbee\AnypointStudio\workspace\TestProject\target\TestProject.zip
[INFO] ----------------------------------------------------------------------- -
[INFO] BUILD SUCCESS
The deployment failed however, with the error:
Unable to copy project zip file to the embedded Mule instance. Project:
[Mule Project]
Name: TestProject - Domain: default
Source 'C:\Users\orbee\AnypointStudio\workspace\TestProject\target\
TestProject-0.0.1-SNAPSHOT.zip' does not exist
It fails because it is trying to use the Snapshot zip whilst the zip that was actually built TestProject.zip and hence cannot find it. Is there a way to change the path to use the snapshot zip?
Right-click your project, Run As -> Mule Application with Maven. This will run the maven build, and then deploy it to the embedded server.
If the Run As menu has 'Mule Application' as the option instead of 'Mule Application with Maven', then Anypoint Studio has not determined that your project uses maven. In that case, right-click the project, Mule -> Mavenize or Mule -> Enable Support.

Jmeter Jtl files are not getting created

I have created a maven project. Jmeter scripts are running fine but Jtl files are not getting created.
If we run the scripts from maven from Command line I am getting HTML report but when running the same from Jenkins I am not getting data in the HTML report.
Can someone help on this please
When running from jenkins the results will be created by default in jenkins build folder. Did you check the folder with the right build number?

Working on an Eclipse project (using Builders) in IntelliJ

I've recently been tasked with working on an existing eclipse project that makes use of Builders to run Ant tasks under given conditions. I've never heard of Builders before yesterday, and I'm having difficulties getting the project to work in IntelliJ.
First of all, I would like to know if there is a way I can effectively trick Ant into running from a different base directory than what it already does. Consider the following screenshot from Eclipse:
Here, project A is running an Ant task in a local build file that extends a build file from project B. As you can see from the Base Directory setting, it is different from that of A. When I try to run the task from this build file in IntelliJ, I get build errors because certain directories do not exist in the folder for project A -- they are located in project B.
Secondly, this Builder is set to trigger on Manual Build and Auto Build, but my understanding is that this only triggers if the project the builder is attached to gets built. As far as I can tell, in IntelliJ, I can set an Ant task to trigger before or after a build, but it seems like this will be for the whole project, instead of just the relevant module that represents this Eclipse project. Is there a way I can make it only apply to a given module, or will I have to trigger it for changes to all modules?

automatic build and deploy fails with build failure on jazzhub

I am trying to use the feature of jazzhub (IBM DevOps offerings) of automatically build and deploy on Bluemix. I have used Eclipse plugin for Jazzhub to check in my code to my project. However automatic build always fails with the below type of error.
using .gitcredentials to set credentials
Checking out Revision a0b1e7c78b02e82ad210bc369cdd633212cb544f (origin/master)
First time build. Skipping changelog.
[47f4a135-016e-4a75-bb42-f9a9fda6df05] $ /bin/bash /tmp/hudson3124921405781328608.sh
Buildfile: build.xml does not exist!
Build failed
Build step 'Execute shell' marked build as failure
Connecting to https://P90JEN01.sl.jazz.net:9444*
I am able to build and deploy the same code base from Eclipse directly to bluemix. My understanding is that DevOps service create build.xml file automatically if It does not find one. The document says it
"A project relative path where the build scripts are found and executed. The project root will be used if empty. A default build script (e.g., Ant build.xml file or Grunt Gruntfile.js file) will be generated and delivered to your source control system if one is not found. You may need to edit the generated build script to fit your needs".
Can anyone help me here? how to get pass this error and make a build successfully deployed ?
I believe we may need to create build.xml if you are using ant script:
http://thoughtsoncloud.com/2014/10/create-deploy-stand-alone-java-application-ibm-bluemix/
"The next step is to create the script to build the code. In this example, I created an .ant script. You can write in the language of your choice from the options supported in Bluemix. Create a file named build.xml and write the .ant build script."

eclipse dynamic web project with groovy nature copies .groovy files

I have an eclipse dynamic web project, and it has some groovy files (not a grails project though, just using groovy for some small backend stuff). I have added src/main/groovy as a source folder. However, when I select "Run on Server", it copies the actual .groovy file as if it were a resource. Is there a way to fix this behavior?
I was running into the exact same issue here. I have a web project here using the following:
Eclipse Kepler
Gradle
Groovy
Spring MVC
I have a Tomcat set inside Eclipse, from the command line or from the Gradle view I can compile, assemble and generate war files, however when I try to "Run on server" the files being deployed to Tomcat are the .groovy files, not the actual .class files, even though they are successfully generated inside the build/classes/main folder
So, TO FIX this I deleted and then re-created the Tomcat server within eclipse, after doing that it was able to find and deploy the right set of files compiled by Gradle
Hope this helps