I get this error when deploying my play 2.3 java project. This is my first time deploying
[info] Set current project to scala_buildpack_build_dir (in build file:/tmp/scala_buildpack_build_dir/)
[success] Total time: 0 s, completed Aug 4, 2014 1:29:13 AM
[info] Updating {file:/tmp/scala_buildpack_build_dir/}scala_buildpack_build_dir...
[info] Resolving org.scala-lang#scala-library;2.10.4 ...
[info] Resolving org.scala-lang#scala-compiler;2.10.4 ...
[info] Resolving org.scala-lang#scala-reflect;2.10.4 ...
[info] Resolving org.scala-lang#jline;2.10.4 ...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[success] Total time: 0 s, completed Aug 4, 2014 1:29:13 AM
[error] Not a valid command: stage (similar: last-grep, set, last)
[error] Not a valid project ID: stage
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: stage (similar: state, target, tags)
[error] stage
[error] ^
! Failed to build app with sbt
Related
I'm proceeding with the README.md procedure at the following URL, but when compiling, I get the following error message and cannot proceed.
https://github.com/actions-on-google/smart-home-dashboard
[ERROR] Failed to execute goal
org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile
(default) on project dashboard: An error occurred while invoking
protoc.: Error while executing process. Cannot run program
"C:\test\target\protoc-plugins\protoc-3.5.1-1-windows-x86_64.exe":
CreateProcess error=206, The filename or extension is too long ->
[Help 1]
I put the source code near the C drive, but it didn't solve.
If anyone knows how to solve it, Would you tell me how to solve?
OS:Windows 10
Result of command line:
C:\test>mvn compile
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for com.google.homegraph:dashboard:war:0.1.0-SNAPSHOT
[WARNING]
'dependencies.dependency.(groupId:artifactId:type:classifier)' must be
unique: com.googlecode.objectify:objectify:jar -> duplicate
declaration of version 5.1.22 # line 164, column 15
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique
but found duplicate declaration of plugin
org.apache.maven.plugins:maven-war-plugin # line 304, column 13
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer
support building such malformed projects.
[WARNING]
[INFO]
------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO]
------------------------------------------------------------------------
[INFO] os.detected.name: windows
[INFO] os.detected.arch: x86_64
[INFO] os.detected.version: 10.0
[INFO] os.detected.version.major: 10
[INFO] os.detected.version.minor: 0
[INFO] os.detected.classifier: windows-x86_64
[WARNING] The project
com.google.homegraph:dashboard:war:0.1.0-SNAPSHOT uses prerequisites
which is only intended for maven-plugin projects but not for non
maven-plugin projects. For such purposes you should use the
maven-enforcer-plugin. See
https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[INFO]
[INFO] -------------------< com.google.homegraph:dashboard >-------------------
[INFO] Building dashboard 0.1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- protobuf-maven-plugin:0.5.0:compile (default) # dashboard ---
[INFO] Compiling 1579 proto file(s) to
C:\test\target\generated-sources\protobuf\java
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.583 s
[INFO] Finished at: 2019-10-22T18:03:49+09:00
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile
(default) on project dashboard: An error occurred while invoking
protoc.: Error while executing process. Cannot run program
"C:\test\target\protoc-plugins\protoc-3.5.1-1-windows-x86_64.exe":
CreateProcess error=206, The filename or extension is too long ->
[Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I'm sorry, it seems my procedure was wrong.
I didn't have to do manually the "Build from source" field in README.md,
I copied extra files in this step.
It was automatically added when compiling at the beginning of the work.
Finally, I was able to compile in the following environment.
OS:Linux (CentOS7)
maven version:3.3.9 (I matched it to the version written in `pom.xml`.)
Unable to successfully build a jenkins job when the jenkins is run as a windows service. these are steps I followed-
1) ran java -jar jenkins.war from cmd
2) navigated to 'install as a windows service' under manage jenkins and created jenkins service under services.msc.
3) closed the cmd (through which the jenkins war file was initially run)
4) created a maven project and tried code from local pom location as well as from the bit bucket.
5) executed via clean install goals and options
result- build unstable. browser did not launch and tests failed.
any help much appreciated.
Results when build with code supplied from local pom file
Results :
Tests in error:
Then Login is successful(Scenario: Verify that login is successful with valid username and password): Expected condition failed: waiting for text ('DASHBOARD') to be present in element found by By.id: menutitle (tried for 10 second(s) with 3 SECONDS interval)(..)
Scenario: Verify that login is successful with valid username and password: Expected condition failed: waiting for text ('DASHBOARD') to be present in element found by By.id: menutitle (tried for 10 second(s) with 3 SECONDS interval)(..)
Tests run: 4, Failures: 0, Errors: 2, Skipped: 0
[ERROR] There are test failures.
Please refer to C:\Users\rajeshg\IdeaProjects\Test_analysis\target\surefire-reports for the individual test results.
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # NxTier ---
[INFO] Building jar: C:\Users\rajeshg\IdeaProjects\Test_analysis\target\NxTier-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # NxTier ---
[INFO] Installing C:\Users\rajeshg\IdeaProjects\Test_analysis\target\NxTier-1.0-SNAPSHOT.jar to C:\WINDOWS\system32\config\systemprofile\.m2\repository\aBILLity\NxTier\1.0-SNAPSHOT\NxTier-1.0-SNAPSHOT.jar
[INFO] Installing C:\Users\rajeshg\IdeaProjects\Test_analysis\pom.xml to C:\WINDOWS\system32\config\systemprofile\.m2\repository\aBILLity\NxTier\1.0-SNAPSHOT\NxTier-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 41.212 s
[INFO] Finished at: 2016-12-16T13:58:55+00:00
[INFO] Final Memory: 27M/311M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving C:\Users\rajeshg\IdeaProjects\Test_analysis\pom.xml to aBILLity/NxTier/1.0-SNAPSHOT/NxTier-1.0-SNAPSHOT.pom
[JENKINS] Archiving C:\Users\rajeshg\IdeaProjects\Test_analysis\target\NxTier-1.0-SNAPSHOT.jar to aBILLity/NxTier/1.0-SNAPSHOT/NxTier-1.0-SNAPSHOT.jar
channel stopped
Finished: UNSTABL
In my brand new Play 2.3.1 Java application, I write the first tests, but they don't work at all. I launch activator test, a simple test class put directly in the default package in the test directory isn't reached.
import org.junit.Assert;
import org.junit.Test;
public class TestTest {
#Test
public void testTest() {
Assert.assertEquals(true, false);
}
}
When I launch activator testOnly TestTest, I have the following output :
[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
[info] No tests to run for test:testOnly
[success] Totaltime: 6 s, completed 11 juil. 2014 09:08:38
What could be the cause ?
Ran into the same issue where no tests were found; activator clean resolved the problem.
It works for me so your issue need more details to have a useful solution.
Run activator --version to check the version. Mine is based on sbt launcher 0.13.5.
➜ sandbox activator --version
sbt launcher version 0.13.5
It doesn't say much about the version of activator itself (however activator 1.2.x is likely sbt 0.13.5). Upgrade if yours is older.
Ran activator new my-brand-new-play-app play-java to create a Play/Java application.
➜ sandbox activator new my-brand-new-play-app play-java
Fetching the latest list of templates...
OK, application "my-brand-new-play-app" is being created using the "play-java" template.
To run "my-brand-new-play-app" from the command line, "cd my-brand-new-play-app" then:
/Users/jacek/sandbox/my-brand-new-play-app/activator run
To run the test for "my-brand-new-play-app" from the command line, "cd my-brand-new-play-app" then:
/Users/jacek/sandbox/my-brand-new-play-app/activator test
To run the Activator UI for "my-brand-new-play-app" from the command line, "cd my-brand-new-play-app" then:
/Users/jacek/sandbox/my-brand-new-play-app/activator ui
I then copied your TestTest class to test/TestTest.java with no changes:
➜ my-brand-new-play-app cat test/TestTest.java
import org.junit.Assert;
import org.junit.Test;
public class TestTest {
#Test
public void testTest() {
Assert.assertEquals(true, false);
}
}
With the only change to create the test file, I ran activator test. After a whole lot of file downloads, the results was:
➜ my-brand-new-play-app activator test
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Loading project definition from /Users/jacek/sandbox/my-brand-new-play-app/project
[info] Set current project to my-brand-new-play-app (in build file:/Users/jacek/sandbox/my-brand-new-play-app/)
[info] ApplicationTest
[info] + ApplicationTest.simpleCheck
[info] + ApplicationTest.renderTemplate
[info]
[info]
[info] Total for test ApplicationTest
[info] Finished in 0.015 seconds
[info] 2 tests, 0 failures, 0 errors
[error] Test IntegrationTest.test failed: <''> should contain the String:<'Your new application is ready.'>, took 1.742 sec
[info] IntegrationTest
[info] x IntegrationTest.test
[error] sbt.ForkMain$ForkError: <''> should contain the String:<'Your new application is ready.'>
[error] at org.fest.assertions.Fail.failure(Fail.java:228)
[error] at org.fest.assertions.Assert.failure(Assert.java:149)
[error] at org.fest.assertions.StringAssert.contains(StringAssert.java:73)
[error] at IntegrationTest$1.invoke(IntegrationTest.java:23)
[error] at IntegrationTest$1.invoke(IntegrationTest.java:20)
[error] at play.test.Helpers.running(Helpers.java:549)
[error] at play.test.Helpers.running(Helpers.java:536)
[error] at IntegrationTest.test(IntegrationTest.java:20)
[info]
[info]
[info] Total for test IntegrationTest
[info] Finished in 0.005 seconds
[info] 1 tests, 1 failures, 0 errors
[error] Test TestTest.testTest failed: expected:<true> but was:<false>, took 0.0 sec
[info] TestTest
[info] x TestTest.testTest
[error] sbt.ForkMain$ForkError: expected:<true> but was:<false>
[error] at org.junit.Assert.fail(Assert.java:88)
[error] at org.junit.Assert.failNotEquals(Assert.java:743)
[error] at org.junit.Assert.assertEquals(Assert.java:118)
[error] at org.junit.Assert.assertEquals(Assert.java:144)
[error] at TestTest.testTest(TestTest.java:8)
[info]
[info]
[info] Total for test TestTest
[info] Finished in 0.002 seconds
[info] 1 tests, 1 failures, 0 errors
[error] Failed: Total 4, Failed 2, Errors 0, Passed 2
[error] Failed tests:
[error] IntegrationTest
[error] TestTest
[error] (test:test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 3 s, completed Jul 10, 2014 11:27:04 PM
The TestTest test was indeed executed.
I also executed the TestTest only with 'testOnly TestTest' as follows:
➜ my-brand-new-play-app activator 'testOnly TestTest'
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Loading project definition from /Users/jacek/sandbox/my-brand-new-play-app/project
[info] Set current project to my-brand-new-play-app (in build file:/Users/jacek/sandbox/my-brand-new-play-app/)
[error] Test TestTest.testTest failed: expected:<true> but was:<false>, took 0.003 sec
[info] TestTest
[info] x TestTest.testTest
[error] sbt.ForkMain$ForkError: expected:<true> but was:<false>
[error] at org.junit.Assert.fail(Assert.java:88)
[error] at org.junit.Assert.failNotEquals(Assert.java:743)
[error] at org.junit.Assert.assertEquals(Assert.java:118)
[error] at org.junit.Assert.assertEquals(Assert.java:144)
[error] at TestTest.testTest(TestTest.java:8)
[info]
[info]
[info] Total for test TestTest
[info] Finished in 0.012 seconds
[info] 1 tests, 1 failures, 0 errors
[error] Failed: Total 1, Failed 1, Errors 0, Passed 0
[error] Failed tests:
[error] TestTest
[error] (test:testOnly) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 1 s, completed Jul 10, 2014 11:29:37 PM
All in all, it worked fine. I'm unsure what might be the issue of yours exactly since I followed your steps as closely as the description of the issue allowed.
The solution with activator clean sometimes doesn't work when Eclipse is running. Closing Eclipse and then peforming activator clean afterwards worked for me.
Im building an app in playframework 2.2., and when I run the app locally with play run it runs fine but when I try to upload to heroku with git push heroku master it starts uploading fine but after a while it always ends with these errors:
[info] downloading http://s3pository.heroku.com/maven-central/org/par
ed/parboiled-core/1.1.5/parboiled-core-1.1.5.jar ...
[info] [SUCCESSFUL ] org.parboiled#parboiled-core;1.1.5!parboiled-c
jar(bundle) (245ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm/4.1/asm-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm;4.1!asm.jar (198ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm-tree/4.1/asm-tree-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm-tree;4.1!asm-tree.jar (109ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm-analysis/4.1/asm-analysis-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm-analysis;4.1!asm-analysis.jar
ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/ow2
/asm-util/4.1/asm-util-4.1.jar ...
[info] [SUCCESSFUL ] org.ow2.asm#asm-util;4.1!asm-util.jar (354ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/sca
ang/scala-compiler/2.10.3/scala-compiler-2.10.3.jar ...
[info] [SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.3!scala-com
r.jar (8070ms)
[info] downloading http://s3pository.heroku.com/maven-central/org/sca
ang/jline/2.10.3/jline-2.10.3.jar ...
[info] [SUCCESSFUL ] org.scala-lang#jline;2.10.3!jline.jar (307ms)
[info] Done updating.
[info] Compiling 5 Scala sources and 11 Java sources to /tmp/scala_bu
ack_build_dir/target/scala-2.10/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.10.3. Compil
..
[info] Compilation completed in 23.023 s
[error] /tmp/scala_buildpack_build_dir/app/utils/DatabaseConnection.j
45: illegal start of type
[error] List<String> results = new ArrayList<>();
[error] ^
[error] 1 error
[error] (compile:compile) javac returned nonzero exit code
[error] Total time: 387 s, completed Mar 25, 2014 4:20:51 PM
! Failed to build app with sbt
! Push rejected, failed to compile Play 2.x - Java app
To git#heroku.com:glacial-plateau-2895.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:glacial-plateau-2895.git'
Can someone help me?
I've searched but i didn't find similar problems that could help me.
Thanks in advance.
[error] /tmp/scala_buildpack_build_dir/app/utils/DatabaseConnection.java:45:
illegal start of type
[error] List<String> results = new ArrayList<>();
[error] ^
Means that the JDK on your Heroku environment is Java 6 whereas your code is Java 7. Upgrade ;)
Here's info how to...
If you want to use java 7 on Heroku, you'll need to add a file with a directive in the root folder of your project. Details here - https://devcenter.heroku.com/articles/add-java-version-to-an-existing-maven-app
I am trying to modify the PrimeFaces 1.1 sources to fit my application needs. However I ran into trouble compiling the sources.
I am using the sources from:
http://repository.prime.com.tr/org/primefaces/primefaces/1.1/
Downloaded and extracted:
primefaces-1.1-sources.jar
However when i try to run the primefaces-1.1.pom it fails because its referencing to some XML files which contains the tag info, but I couldn't find those in the sources. I assume this build file is for PrimeFaces 2.x?
Or am i missing something? Would be great if you could help me!
Using Maven "Install"
"c:\program files (x86)\jetbrains\intellij idea 10.0\jre\jre\bin\java" -Dclassworlds.conf=D:\Werk\Binaries\Maven\bin\m2.conf -Dmaven.home=D:\Werk\Binaries\Maven -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 10.0\bin" -Dfile.encoding=windows-1252 -classpath "D:\Werk\Binaries\Maven\boot\plexus-classworlds-2.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 10.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher --no-plugin-registry --fail-fast --no-plugin-updates --strict-checksums --update-snapshots -f C:\Users\Mark\Downloads\primefaces-1.1-sources\pom.xml install
[WARNING] Command line option -npu is deprecated and will be removed in future Maven versions.
[WARNING] Command line option -npr is deprecated and will be removed in future Maven versions.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.primefaces:primefaces:jar:1.1
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 156, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building primefaces 1.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- xslt-maven-plugin:1.0:transform (generate-ui-metadata) # primefaces ---
[ERROR] XSL file does not exist: C:\Users\Mark\Downloads\primefaces-1.1-sources\src\main\resources-maven-jsf\misc\resolve_entities.xsl
[INFO]
[INFO] --- xslt-maven-plugin:1.0:transform (generate-touch-metadata) # primefaces ---
[ERROR] XSL file does not exist: C:\Users\Mark\Downloads\primefaces-1.1-sources\src\main\resources-maven-jsf\misc\resolve_entities.xsl
[INFO]
[INFO] --- maven-jsf-plugin:1.1.3:generate-tld (generate-ui) # primefaces ---
[INFO] Generating TLD
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.711s
[INFO] Finished at: Thu Dec 30 11:29:43 CET 2010
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.primefaces:maven-jsf-plugin:1.1.3:generate-tld (generate-ui) on project primefaces: Execution generate-ui of goal org.primefaces:maven-jsf-plugin:1.1.3:generate-tld failed. NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Process finished with exit code 1
If you just need to modify a single class (or a few), it may be easiest to take that class's source code alone, modify and compile it with the rest of Primefaces as JAR in the classpath, then replace that single class file in the JAR.