How to change the jenkins home directory location on centos v8? - java

i installed jenkins on docker via command
docker run -p 8080:8080 -p 50000:50000 -d -v jenkins_home:/var/lib/docker/volumes/jenkins_home/_data jenkins/jenkins:lts
I specified the jenkins_home: /var/lib/docker/volumes/jenkins_home/_data
but i did not understand why so jenkins it displays : Home directory /var/jenkins_home
image here
image here
and what is weird is that this directory (/var/jenkins_home) is empty:
/var/jenkins_home# ll total 0
This causes me problems with the docker build step
logs:
Running as SYSTEM
Building in workspace /var/jenkins_home/workspace/jenkins-docker-integration
The recommended git tool is: NONE
using credential git
> git rev-parse --resolve-git-dir /var/jenkins_home/workspace/jenkins-docker-integration/.git # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/************.git # timeout=10
Fetching upstream changes from https://github.com/*************.git
> git --version # timeout=10
> git --version # 'git version 2.20.1'
using GIT_ASKPASS to set credentials git
> git fetch --tags --force --progress -- https://github.com/**************.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
Checking out Revision 814e24793ed004b24a703ea5ffd79060129e30a4 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 814e24793ed004b24a703ea5ffd79060129e30a4 # timeout=10
Commit message: "add jenkins file"
> git rev-list --no-walk 814e24793ed004b24a703ea5ffd79060129e30a4 # timeout=10
[jenkins-docker-integration] $ /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven381/bin/mvn clean install -DskipTests
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< fr.startedup:startedup >-----------------------
[INFO] Building startedup 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # startedup ---
[INFO] Deleting /var/jenkins_home/workspace/jenkins-docker-integration/target
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) # startedup ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # startedup ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 29 source files to /var/jenkins_home/workspace/jenkins-docker-integration/target/classes
[INFO] /var/jenkins_home/workspace/jenkins-docker-integration/src/main/java/fr/startedup/config/apidoc/SwaggerConfiguration.java: /var/jenkins_home/workspace/jenkins-docker-integration/src/main/java/fr/startedup/config/apidoc/SwaggerConfiguration.java uses unchecked or unsafe operations.
[INFO] /var/jenkins_home/workspace/jenkins-docker-integration/src/main/java/fr/startedup/config/apidoc/SwaggerConfiguration.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) # startedup ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # startedup ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /var/jenkins_home/workspace/jenkins-docker-integration/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # startedup ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- asciidoctor-maven-plugin:1.5.8:process-asciidoc (generate-docs) # startedup ---
[INFO] sourceDirectory /var/jenkins_home/workspace/jenkins-docker-integration/src/main/asciidoc does not exist. Skip processing
[INFO]
[INFO] --- maven-war-plugin:3.3.1:war (default-war) # startedup ---
[INFO] Packaging webapp
[INFO] Assembling webapp [startedup] in [/var/jenkins_home/workspace/jenkins-docker-integration/target/startedup-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Building war: /var/jenkins_home/workspace/jenkins-docker-integration/target/startedup-0.0.1-SNAPSHOT.war
[INFO]
[INFO] --- spring-boot-maven-plugin:2.4.5:repackage (repackage) # startedup ---
[INFO] Replacing main artifact with repackaged archive
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # startedup ---
[INFO] Installing /var/jenkins_home/workspace/jenkins-docker-integration/target/startedup-0.0.1-SNAPSHOT.war to /var/jenkins_home/.m2/repository/fr/startedup/startedup/0.0.1-SNAPSHOT/startedup-0.0.1-SNAPSHOT.war
[INFO] Installing /var/jenkins_home/workspace/jenkins-docker-integration/pom.xml to /var/jenkins_home/.m2/repository/fr/startedup/startedup/0.0.1-SNAPSHOT/startedup-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.954 s
[INFO] Finished at: 2021-05-24T11:48:27Z
[INFO] ------------------------------------------------------------------------
[jenkins-docker-integration] $ docker build -t startedup01\version88 --pull=true /var/jenkins_home/workspace/jenkins-docker-integration
ERROR: Cannot run program "docker" (in directory "/var/jenkins_home/workspace/jenkins-docker-integration"): error=2, No such file or directory
java.io.IOException: Cannot run program "docker" (in directory "/var/jenkins_home/workspace/jenkins-docker-integration"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:252)
at hudson.Proc$LocalProc.<init>(Proc.java:221)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:996)
at hudson.Launcher$ProcStarter.start(Launcher.java:508)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:487)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:431)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:373)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:311)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:291)
at com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:262)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
at hudson.model.Build$BuildExecution.build(Build.java:197)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
at hudson.model.Run.execute(Run.java:1907)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 19 more
Build step 'Docker Build and Publish' marked build as failure
Finished: FAILURE

Related

Spring boot application deployed on heroky returns empty response (no headers, no data)

I have created a simple Spring boot app and deployed to Heroku. It builds and runs normally, and no errors are displayed in the logs, but when i try to access the application on insomnia, it gives me the following error description: Error: Server returned nothing (no headers, no data).
The application works perfectly when running on localhost.
Here is my Procfile:
web: java -Dserver.port=$PORT -Dspring.profiles.active=prod $JAVA_OPTS -jar target/seniorerp-0.0.1-SNAPSHOT.jar
Heroku build log:
-----> Using buildpack: heroku/java
-----> Java app detected
-----> Installing OpenJDK 11... done
-----> Executing Maven
$ ./mvnw -DskipTests clean dependency:list install
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< thiago.piffer:seniorerp >-----------------------
[INFO] Building seniorerp 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) # seniorerp ---
[INFO]
[INFO] --- maven-dependency-plugin:3.3.0:list (default-cli) # seniorerp ---
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) # seniorerp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) # seniorerp ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 25 source files to /tmp/build_321f1d66/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) # seniorerp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /tmp/build_321f1d66/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) # seniorerp ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 8 source files to /tmp/build_321f1d66/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # seniorerp ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:3.2.2:jar (default-jar) # seniorerp ---
[INFO] Building jar: /tmp/build_321f1d66/target/seniorerp-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.7.2:repackage (repackage) # seniorerp ---
[INFO] Replacing main artifact with repackaged archive
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # seniorerp ---
[INFO] Installing /tmp/build_321f1d66/target/seniorerp-0.0.1-SNAPSHOT.jar to /tmp/codon/tmp/cache/.m2/repository/thiago/piffer/seniorerp/0.0.1-SNAPSHOT/seniorerp-0.0.1-SNAPSHOT.jar
[INFO] Installing /tmp/build_321f1d66/pom.xml to /tmp/codon/tmp/cache/.m2/repository/thiago/piffer/seniorerp/0.0.1-SNAPSHOT/seniorerp-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.955 s
[INFO] Finished at: 2022-08-24T14:10:10Z
[INFO] ------------------------------------------------------------------------
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 96.8M
-----> Launching...
Released v20
https://senior-erp-desafio-tecnico.herokuapp.com/ deployed to Heroku

Jenkins is unable to find the java file in workspace

We are following the instructions given by some tutorials to integrate our project with jenkins unsuccessfully, we think the reason is the path to the scripts of java. Could you give us a hand? The log result is:
Started by user admin
Running as SYSTEM Building in workspace C:\Users\xxxxxxx\.jenkins\workspace\JenkinsDemo Parsing POMs Established TCP socket on 57342 [JenkinsDemo] $ "C:\Program Files\Java\jdk-11.0.11/bin/java" -cp C:\Users\xxxxxxx\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven35-agent-1.13.jar;C:\Users\xxxxxxx\apache-maven-3.8.1\boot\plexus-classworlds-2.6.0.jar;C:\Users\xxxxxxx\apache-maven-3.8.1/conf/logging jenkins.maven3.agent.Maven35Main C:\Users\xxxxxxx\apache-maven-3.8.1 C:\Users\xxxxxxx\.jenkins\war\WEB-INF\lib\remoting-4.12.jar C:\Users\xxxxxxx\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven35-interceptor-1.13.jar C:\Users\xxxxxxx\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.13.jar 57342 <===[JENKINS REMOTING CAPACITY]===>channel started Executing Maven: -B -f C:\Users\xxxxxxx\.jenkins\workspace\JenkinsDemo\pom.xml install [INFO] Scanning for projects... [INFO] [INFO]
----------------------< JenkinsDemo:JenkinsDemo >----------------------- [INFO] Building JenkinsDemo 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) # JenkinsDemo
--- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Users\xxxxxxx\.jenkins\workspace\JenkinsDemo\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # JenkinsDemo --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # JenkinsDemo --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Users\xxxxxxx\.jenkins\workspace\JenkinsDemo\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # JenkinsDemo --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # JenkinsDemo --- [INFO] No tests to run. [JENKINS] Guardando informes de test [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) # JenkinsDemo --- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) # JenkinsDemo --- [INFO] Installing C:\Users\xxxxxxx\.jenkins\workspace\JenkinsDemo\target\JenkinsDemo-0.0.1-SNAPSHOT.jar to C:\Users\xxxxxxx\.m2\repository\JenkinsDemo\JenkinsDemo\0.0.1-SNAPSHOT\JenkinsDemo-0.0.1-SNAPSHOT.jar [INFO] Installing C:\Users\xxxxxxx\.jenkins\workspace\JenkinsDemo\pom.xml to C:\Users\xxxxxxx\.m2\repository\JenkinsDemo\JenkinsDemo\0.0.1-SNAPSHOT\JenkinsDemo-0.0.1-SNAPSHOT.pom [INFO]
------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO]
------------------------------------------------------------------------ [INFO] Total time: 3.337 s [INFO] Finished at: 2022-05-09T12:20:50+02:00 [INFO]
------------------------------------------------------------------------ Esperando a que Jenkins finalice de recopilar datos [JENKINS] Archiving C:\Users\xxxxxxx\.jenkins\workspace\JenkinsDemo\pom.xml to JenkinsDemo/JenkinsDemo/0.0.1-SNAPSHOT/JenkinsDemo-0.0.1-SNAPSHOT.pom [JENKINS] Archiving C:\Users\xxxxxxx\.jenkins\workspace\JenkinsDemo\target\JenkinsDemo-0.0.1-SNAPSHOT.jar to JenkinsDemo/JenkinsDemo/0.0.1-SNAPSHOT/JenkinsDemo-0.0.1-SNAPSHOT.jar channel stopped [JenkinsDemo] $ cmd /c call C:\Users\xxxxxxx\AppData\Local\Temp\jenkins13221465416928573076.bat
C:\Users\xxxxxxx\.jenkins\workspace\JenkinsDemo>javac EnviarPruebaDeIngles.java error: file not found: EnviarPruebaDeIngles.java Usage: javac <options> <source files> use
--help for a list of possible options
C:\Users\xxxxxxx\.jenkins\workspace\JenkinsDemo>java EnviarPruebaDeIngles Error: Could not find or load main class EnviarPruebaDeIngles Caused by: java.lang.ClassNotFoundException: EnviarPruebaDeIngles
C:\Users\xxxxxxx\.jenkins\workspace\JenkinsDemo>exit 1 Build step 'Execute Windows batch command' marked build as failure Finished: FAILURE
Project configuration is:
Our eclipse with selenium project tree, our intention is to execute like the main classes which are going to be located at com.jenkins.demo

Why is Heroku attempting to run newrelic-agent.jar instead of my app?

My app was working, it's working in staging, but after pushing that build to production, Heroku is running this command:
java -Dserver.port=12366 -javaagent:target/newrelic-agent.jar -jar target/newrelic-agent.jar
Why is Heroku trying to run newrelic-agent.jar instead of my app's jar?
My build log looks like this:
-----> Java app detected
-----> Installing JDK 1.8... done
-----> Installing Maven 3.3.9... done
-----> Executing: mvn -DskipTests clean dependency:list install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building projectxserver 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact org.hibernate:hibernate-validator:jar:6.0.9.Final has been relocated to org.hibernate.validator:hibernate-validator:jar:6.0.9.Final
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) # projectxserver ---
[INFO]
[INFO] --- maven-dependency-plugin:3.0.2:list (default-cli) # projectxserver ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) # projectxserver ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 11 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) # projectxserver ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 54 source files to /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/target/classes
[INFO] /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/src/main/java/tech/projectx/server/models/support/JacksonUtil.java: /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/src/main/java/tech/projectx/server/models/support/JacksonUtil.java uses unchecked or unsafe operations.
[INFO] /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/src/main/java/tech/projectx/server/models/support/JacksonUtil.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) # projectxserver ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) # projectxserver ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) # projectxserver ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) # projectxserver ---
[INFO] Building jar: /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/target/projectxserver-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.0.1.RELEASE:repackage (default) # projectxserver ---
[INFO]
[INFO] --- maven-dependency-plugin:3.0.2:copy (copy-new-relic-jar) # projectxserver ---
[INFO] Configured Artifact: com.newrelic.agent.java:newrelic-agent:?:jar
[INFO] Copying newrelic-agent-4.0.0.jar to /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/target/newrelic-agent.jar
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # projectxserver ---
[INFO] Installing /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/target/projectxserver-1.0.0-SNAPSHOT.jar to /app/tmp/cache/.m2/repository/tech/projectx/projectxserver/1.0.0-SNAPSHOT/projectxserver-1.0.0-SNAPSHOT.jar
[INFO] Installing /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/pom.xml to /app/tmp/cache/.m2/repository/tech/projectx/projectxserver/1.0.0-SNAPSHOT/projectxserver-1.0.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.850 s
[INFO] Finished at: 2018-05-08T19:10:25+00:00
[INFO] Final Memory: 61M/410M
[INFO] ------------------------------------------------------------------------
-----> Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> web
-----> Compressing...
Done: 190.1M
-----> Launching...
Released v46
https://projectxserver-production.herokuapp.com/ deployed to Heroku
After re-deploying a few times, it started using the correct jar. Is Heroku picking up a random one?
Heroku tries to automatically figure out the command to run your app when it detects that you are using Spring Boot. However, since the new-relic JAR is in your target/ directory, it thinks that it is your app.
You can fix this in two ways:
Put the new-relic jar in a different directory (Heroku recommends target/dependency or similar).
Create a Procfile and explicitly tell Heroku the command needed to run your app.
If you create a Procfile it will probably look like this:
web: java -Dserver.port=$PORT -javaagent:target/newrelic-agent.jar -jar target/projectxserver-1.0.0-SNAPSHOT.jar
Then run:
git add Procfile
git commit -m "Procfile"
git push heroku master
You can see the logic for the default command in the Java buildpack's bin/release script.

Building Spark with Maven: error finding javac (but path is correct)

I'm trying to build a Spark 1.5.0 snapshot, on Windows. Firstly I ran make-distribution.sh using Cygwin (which pulled Maven etc). Now I'm running
mvn -DskipTests clean package
and getting this error, suggesting it can't find javac.
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) # spark-launcher_2.10 ---
[INFO] Using zinc server for incremental compilation
←[0m[←[0minfo←[0m] ←[0mCompiling 8 Java sources to C:\spark-1.5.0-SNAPSHOT\launcher\target\scala-2.10\classes...←[0m
←[0m[←[31merror←[0m] ←[0mCannot run program "javac": CreateProcess error=2, The system cannot find the file specified←[0m
This questioner How to build Spark 1.2 with Maven (gives java.io.IOException: Cannot run program "javac")? had a similar problem - it was fixed by fixing the environment variables. I think mine are ok:
> where javac
C:\Program Files\Java\jdk1.8.0_45\bin\javac.exe
> javac -help
Usage: javac <options> <source files>
where possible options include:
...
> where mvn
C:\spark-1.5.0-SNAPSHOT\build\apache-maven-3.3.3\bin\mvn
C:\spark-1.5.0-SNAPSHOT\build\apache-maven-3.3.3\bin\mvn.cmd
> echo %JAVA_HOME%
C:\PROGRA~1\Java\jdk1.8.0_45
> mvn -v
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T21:57:37+10:00)
Maven home: C:\spark-1.5.0-SNAPSHOT\build\apache-maven-3.3.3\bin\..
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: C:\PROGRA~1\Java\jdk1.8.0_45\jre
Default locale: en_AU, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
What should I try next?
C:\spark-1.5.0-SNAPSHOT>mvn -DskipTests clean package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Spark Project Parent POM
[INFO] Spark Project Launcher
..
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spark Project Parent POM 1.5.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) # spark-parent_2.10 ---
[INFO] Deleting C:\spark-1.5.0-SNAPSHOT\target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-versions) # spark-parent_2.10 ---
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:add-source (eclipse-add-source) # spark-parent_2.10 ---
[INFO] Add Source directory: C:\spark-1.5.0-SNAPSHOT\src\main\scala
[INFO] Add Test Source directory: C:\spark-1.5.0-SNAPSHOT\src\test\scala
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) # spark-parent_2.10 ---
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) # spark-parent_2.10 ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (create-tmp-dir) # spark-parent_2.10 ---
[INFO] Executing tasks
main:
[mkdir] Created dir: C:\spark-1.5.0-SNAPSHOT\target\tmp
[INFO] Executed tasks
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:testCompile (scala-test-compile-first) # spark-parent_2.10 ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-dependency-plugin:2.10:build-classpath (default) # spark-parent_2.10 ---
[INFO]
[INFO] --- scalatest-maven-plugin:1.0:test (test) # spark-parent_2.10 ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.6:test-jar (prepare-test-jar) # spark-parent_2.10 ---
[INFO] Building jar: C:\spark-1.5.0-SNAPSHOT\target\spark-parent_2.10-1.5.0-SNAPSHOT-tests.jar
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) # spark-parent_2.10 ---
[INFO]
[INFO] --- maven-shade-plugin:2.4.1:shade (default) # spark-parent_2.10 ---
[INFO] Including org.spark-project.spark:unused:jar:1.0.0 in the shaded jar.
[INFO] Replacing original artifact with shaded artifact.
[INFO]
[INFO] --- maven-source-plugin:2.4:jar-no-fork (create-source-jar) # spark-parent_2.10 ---
[INFO]
[INFO] --- maven-source-plugin:2.4:test-jar-no-fork (create-source-jar) # spark-parent_2.10 ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spark Project Launcher 1.5.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) # spark-launcher_2.10 ---
[INFO] Deleting C:\spark-1.5.0-SNAPSHOT\launcher\target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-versions) # spark-launcher_2.10 ---
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:add-source (eclipse-add-source) # spark-launcher_2.10 ---
[INFO] Add Source directory: C:\spark-1.5.0-SNAPSHOT\launcher\src\main\scala
[INFO] Add Test Source directory: C:\spark-1.5.0-SNAPSHOT\launcher\src\test\scala
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) # spark-launcher_2.10 ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # spark-launcher_2.10 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\spark-1.5.0-SNAPSHOT\launcher\src\main\resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) # spark-launcher_2.10 ---
[INFO] Using zinc server for incremental compilation
←[0m[←[0minfo←[0m] ←[0mCompiling 8 Java sources to C:\spark-1.5.0-SNAPSHOT\launcher\target\scala-2.10\classes...←[0m
←[0m[←[31merror←[0m] ←[0mCannot run program "javac": CreateProcess error=2, The system cannot find the file specified←[0m
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spark Project Parent POM ........................... SUCCESS [ 3.158 s]
[INFO] Spark Project Launcher ............................. FAILURE [ 2.930 s]
[INFO] Spark Project Networking ........................... SKIPPED
[INFO] Spark Project Shuffle Streaming Service ............ SKIPPED
..
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile (scala-compile-first) on project spark-launcher_2.10: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile failed. CompileFailed -> [Help 1]
Shutting down zinc first should solve your problem. See the documentation here
./build/zinc-<version>/bin/zinc -shutdown
Another way is to change the pom.xml of spark and comment the line
<!--<useZincServer>true</useZincServer>-->

Apache Tomcat 7 HTTP Connector node not found in intelliJ

I am developing an application using GWT, Maven on Apache Tomcat 7 with intelliJ idea. i have recently debugged and run my application but faced the following problem:Error running Tomcat 7: HTTP Connector node not found: set up one in the server.xml.
Apache Tomcat run code:
"c:\program files (x86)\jetbrains\intellij idea 11.1.4\jre\jre\bin\java" -Dclassworlds.conf=C:\Tools\apache-maven-3.1.1\bin\m2.conf -Dmaven.home=C:\Tools\apache-maven-3.1.1 -Dfile.encoding=UTF-8 -classpath C:\Tools\apache-maven-3.1.1\boot\plexus-classworlds-2.5.1.jar org.codehaus.classworlds.Launcher --offline --no-plugin-registry --fail-fast --strict-checksums --update-snapshots -f D:\Projects\ebank\pom.xml package -P gwtDebug,oracle
[WARNING] Command line option -npr is deprecated and will be removed in future Maven versions.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AppFuse GWT Application 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.sun.xml.bind:jaxb-impl:jar:2.1.13 is missing, no dependency information available
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # AppfuseGWT ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 33 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # AppfuseGWT ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- native2ascii-maven-plugin:1.0-beta-1:native2ascii (native2ascii-utf8) # AppfuseGWT ---
[INFO] Includes: [ApplicationResources_zh*.properties, ApplicationResources_ko*.properties, displaytag_zh*.properties]
[INFO] Excludes: []
[INFO]
[INFO] --- exec-maven-plugin:1.2:exec (default) # AppfuseGWT ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # AppfuseGWT ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 17 resources
[INFO] Copying 9 resources
[INFO]
[INFO] >>> hibernate3-maven-plugin:2.2:hbm2ddl (default) # AppfuseGWT >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # AppfuseGWT ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 33 resources
[INFO]
[INFO] <<< hibernate3-maven-plugin:2.2:hbm2ddl (default) # AppfuseGWT <<<
[INFO]
[INFO] --- hibernate3-maven-plugin:2.2:hbm2ddl (default) # AppfuseGWT ---
[INFO] skipping hibernate3 execution
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # AppfuseGWT ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- dbunit-maven-plugin:1.0-beta-3:operation (test-compile) # AppfuseGWT ---
[INFO] Skip operation: CLEAN_INSERT execution
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # AppfuseGWT ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- dbunit-maven-plugin:1.0-beta-3:operation (test) # AppfuseGWT ---
[INFO] Skip operation: CLEAN_INSERT execution
[INFO]
[INFO] --- gwt-maven-plugin:2.5.0:compile (gwtcompile) # AppfuseGWT ---
[INFO] uz.eopc.webapp.MainModuleDebug is up to date. GWT compilation skipped
[INFO]
[INFO] --- maven-war-plugin:2.3:war (default-war) # AppfuseGWT ---
[INFO] Packaging webapp
[INFO] Assembling webapp [AppfuseGWT] in [D:\Projects\ebank\target\AppfuseGWT-1.0]
[INFO] Processing war project
[INFO] Copying webapp webResources [D:\Projects\ebank\src/main/resources/packaged] to [D:\Projects\ebank\target\AppfuseGWT-1.0]
[INFO] Copying webapp resources [D:\Projects\ebank\src\main\webapp]
[INFO] Webapp assembled in [279 msecs]
[INFO] Building war: D:\Projects\ebank\target\AppfuseGWT-1.0.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.405s
[INFO] Finished at: Mon Dec 09 10:54:04 UZT 2013
[INFO] Final Memory: 12M/29M
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution finished
What should be done to fix this problem?
I have found the answer to fix this problem. I was using ubuntu 12.04 and in linux systems everything is connected with permissions. After i have opened read and write permission to my tomcat directory, it has worked out. to open read and write permission to a directory in ubuntu just write:
$ sudo chmod 777 -R folder_name/

Categories