Gradle Jar Creating Task getting stucked - reactjs

I am new to gradle. When running the gradle build task in intelliJ, my task keep running infinitely and never completed. The task is written as follows:
task webjar(type: Jar) {
from(fileTree("build")) {
into "META-INF/resources"
}
}
jar.finalizedBy('webjar')
Can anybody help me in pointing out if I am doing anything wrong here?
update: When i am writing the task as follows it finishes successfully:
task webjar(type: Jar) {
destinationDir file("${projectDir}/build")
from(fileTree("build")) {
into "META-INF/resources"
}
}
Thanks,

The issue is that you are attempting to pack the whole build folder into that jar, which includes all the project output.
So that is most likely the issue there. build should not be what you package in META-INF/resources.
Instead you will need to identify which task produces the content to be included in META-INF/resources and use its output as the from argument.

Related

Can we fail jenkins build if build.xml fails which is being called through a bat script

I am calling a batch file from Jenkinsfile. Through that batch file I am calling ant build.xml.
Currently though the ant build.xml is failing pipeline is executing next stage.
Is there any way to avoid this scenario?
For the case that you are using Jenkins declarative pipeline you could add thw following to let Jenkins skip the stages after one becomes unstable:
options
{
skipStagesAfterUnstable()
}

Jenkins/Windows - Launch TestNG suite from .bat

Stackoverflow helped me a lot to reach that point but now I'm completely stuck, here is my problem :
I'm currently developing several tests to check a website. I code with Java in Eclipse, using testNG plugin with ReportNG for report, all of this using Windows 7 pro.
My tests work, and my report is well generated, so now I have to put it on Jenkins for my company so they will run my tests every X hours.
In order to launch my tests, I have made a file, named Run.bat, which runs the Java code, I tested it and it works, here is the code :
Run.bat
set classpath=blex_test_v1\bin;blex_test_v1\lib\*
java org.testng.TestNG blex_test_v1\blex_test_v1.xml
I now try to launch the tests on Jenkins, creating a new job and configuring it with the build section :
Run.bat
And this is my problem, I've tried everything (relative path, only the name of the file etc...) I always get this error :
java.io.IOException: Cannot run program "cmd" (in directory "/var/jenkins_home/jobs/blex_functional_test/workspace"): error=2, No such file or directory
So I checked the Jenkins workspace but my Run.bat is in it :
Workspace
I have read that Jenkins is in Linux so it might cause problem with bat files, so I tried to create a script but I didn't succeed either ..
So my question is : How can I run my test on Jenkins using my file Run.bat ? What am I doing wrong here ?
Thanks a lot !
Finally I can add an answer :
Jenkins is installed on a Unix machine so you can't run a bat file, it has to be a bash script.
To create a bash script, refer here.
Then you have to make sure that the plugin Xvfb is installed (and works) on the computer where Jenkins is installed.
I use testNG with reportNg and it doesn't work with the last firefox version so you I use firefox v34.0.5 and this version must be installed also on the Jenkins computer.
If you want to open the report after the execution, install another plugin and configure it (report HTML or something like that)
God it took me about a week but it's good to see it working !

R Missing Package error when uploading to shinyapps.io

My Shiny program works fine locally on my PC (Windows 8, RStudio 0.99.489) but not when I upload it to shinyapps.io . I've tried 2 ways of packaging the data for upload - saveRDS on each object and save.image on the entire environment. Either way, when I upload it to shiny.io I get:
Preparing to deploy application...DONE
Uploading bundle for application: 77966...DONE
Deploying bundle: 350891 for application: 77966 ...
Waiting for task: 132618597
building: Parsing manifest
building: Building image: 344796
building: Installing packages
################################ Begin Task Log ################################
[2016-01-16T22:19:45.818533554+0000] Installing R package: magrittr (1.5)
Error in library(stylo) : there is no package called �stylo�
Execution halted
################################# End Task Log #################################
Error: Unhandled Exception: Child Task 132618599 failed: Error building image: Build exited with non-zero status: 1
Execution halted
It seems that Shiny isn't aware of the Stylo package. I tried to install it in my code, but that didn't help.
1. Does Shiny have all R packages?
2. If not, is there a list of which packages are available?
Thanks very much.
Are you including the stylo package at the top of your server.R file via library("stylo")? If you are doing that and it's giving you the error, try using require("stylo") instead.
From the docs, the rsconnect package is supposed to automatically detect what packages are necessary for your app. Probably worth a read (if you haven't already) just to be sure you're following everything correctly in order for rsconnect to do its job.
I solved the problem by doing a clean build of my environment -- imported data tables and functions from RDS files only, and carefully avoided references to unnecessary packages. I recreated the one function I needed from Stylo locally, so that I could be certain I wouldn't require it.

parallel builds in jenkins

I just installed the "Build Flow" plugin ver 0.7 and i seem to have issues getting it to work. I configured 2 simple jobs (JOB1 and JOB2). Then another jenkins job which i named "parallel_build} that basically calls this job to build them in parallel.
In the "Define build flow using flow DS" section i have the following
parallel ( {buildIJOB1)}, {build(JOB2)} )
when i execute "parallel_build" job, the console output print the following msg and return a build faillure
parallel {
}
Notifying upstream projects of job completion
Finished: FAILURE
It does not seem to be executing the jobs i intend to run in parallel. The two jobs (JOB1 and JOB2 are pretty simple. All they do is print hello msg.
I appreciate any help in advance.
Jenny
Never mind folks. Upgrading to the latest jenkins version (1.501) from 1.447 fixed the issue. It's all good now.
try this syntax
parallel(
{build("JOB1")},
{build("JOB2")}
)

Is JRebel necessary to run Maven?

Greetings,
I am trying to start a scala/liftweb project for deployment on Google App Engine. To do this, i need to package it up as a .war using maven.
However, whenever I run the 'mvn' command, I am met with:
Error opening zip file or JAR manifest missing : /Applications/JRebel/jrebel.jar
Error occurred during initialization of VM
agent library failed to init: instrument
Is there something wrong with my maven or do I need Jrebel? I see jrebel is not free which is why I am so surprised.
thanks!
No, JRebel is definitely not required to run Maven.
As Matt mentioned, JRebel is not required to run Maven. However, ZeroTurnaround does offer a free version that works with Scala. You can get it here:
http://sales.zeroturnaround.com/
As for your error - it indicates you are trying to start the JVM as though you are using JRebel. What is the full Maven command you are running? What is in your MAVEN_OPTS environment variable? If either of them contain something like -noverify -javaagent:/Applications/JRebel/jrebel.jar, then that's your problem.
One of the reason of the problem is a blank in the path of jrebel.jar
Make sure that there is no blank in the path like in "Program Files"

Resources