Java/Maven compilation failure (no suitable constructor found) -
i ran strange problem..
work on project use processbuilder class.
on local machine (java6 , java7 tested) can mvn clean install
& mvn assembly:single
project without errors. want let project build travis-ci , ran following error
error: no suitable constructor found processbuilder(string)
full log file here.. javadoc processbuilder show me constructor.
.travis.yml looks this
language: java
jdk:
- oraclejdk7
- openjdk6
- openjdk7after_success:
- mvn assembly:single
any ideas why build fails on travis-ci?
thanks, f481
edit:
locally i'm using maven 3, travis-ci (travis doc: "travis java builder use maven 3 build it.") pom.xml: https://github.com/multiservercontrol/minecontrol/blob/master/pom.xml
, java code of first error: this.processbuilder = new processbuilder("");
full class available here
edit2: specified source , target version maven compilation this:
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>3.0</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin>
now build working jdk7: https://travis-ci.org/multiservercontrol/minecontrol/jobs/5963859
but don't reason behavior.. , want build project jdk 5,6 too.
how can that?
i specified version of maven compiler plugin , source , target version compilation this:
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>3.0</version> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin>
now build working! nilsh pushed me in right direction.
Comments
Post a Comment