compilation - Maven Can't Compile -
i'm new maven , can't understand how examples book have (o'reilly's "enterprise javabeans 3.1") running. says use command "mvn clean install" run examples, things don't work me. when go folder pom.xml is, following feedback:
$ mvn clean install[info] scanning projects... [info] [info] ------------------------------------------------------------------------ [info] building jboss ejb 3.x examples - chapter 4: calculator service ejbs 1.1.0-snapshot [info] ------------------------------------------------------------------------ [info] [info] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jboss-ejb3-examples-ch04-firstejb --- [info] deleting /users/jonathanpomper/desktop/oreilly-ejb-6thedition-book-examples-master/ch04-firstejb/target [info] [info] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-environment) @ jboss-ejb3-examples-ch04-firstejb --- [info] [info] --- maven-resources-plugin:2.4.3:resources (default-resources) @ jboss-ejb3-examples-ch04-firstejb --- [warning] using platform encoding (utf-8 actually) copy filtered resources, i.e. build platform dependent! [info] skip non existing resourcedirectory /users/jonathanpomper/desktop/oreilly-ejb-6thedition-book-examples-master/ch04-firstejb/src/main/resources [info] [info] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ jboss-ejb3-examples-ch04-firstejb --- [info] compiling 11 source files /users/jonathanpomper/desktop/oreilly-ejb-6thedition-book-examples-master/ch04-firstejb/target/classes [info] ------------------------------------------------------------- [error] compilation error : [info] ------------------------------------------------------------- [error] failure executing javac, not parse error: /bin/sh: /bin/javac: no such file or directory [info] 1 error [info] ------------------------------------------------------------- [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 7.530s [info] finished at: mon mar 10 18:17:56 edt 2014 [info] final memory: 27m/218m [info] ------------------------------------------------------------------------ [error] failed execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project jboss-ejb3-examples-ch04-firstejb: compilation failure [error] failure executing javac, not parse error: [error] /bin/sh: /bin/javac: no such file or directory [error] -> [help 1] [error] [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error] [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/mojofailureexception i have tried following link provides, stuck…any awesome! in advance!
edit: here pom.xml:
<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <!-- parent information --> <parent> <groupid>org.jboss.ejb3.examples</groupid> <artifactid>jboss-ejb3-examples-build</artifactid> <version>1.1.0-snapshot</version> <relativepath>../build/pom.xml</relativepath> </parent> <!-- model version --> <modelversion>4.0.0</modelversion> <!-- artifact information --> <artifactid>jboss-ejb3-examples-ch04-firstejb</artifactid> <name>jboss ejb 3.x examples - chapter 4: calculator service ejbs</name> <description>example accompany o'reilly "enterprise java beans 6th edition" chapter 4</description>
<dependency> <groupid>org.jboss.as</groupid> <artifactid>jboss-as-spec-api</artifactid> <type>pom</type> </dependency> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> </dependency> <!-- arquillian test harness --> <dependency> <groupid>org.jboss.as</groupid> <artifactid>jboss-as-arquillian-container-managed</artifactid> </dependency> <dependency> <groupid>org.jboss.arquillian.junit</groupid> <artifactid>arquillian-junit-container</artifactid> </dependency> <dependency> <groupid>org.jboss.as</groupid> <artifactid>jboss-as-dist</artifactid> <type>zip</type> <scope>test</scope> </dependency> <!-- hack: arq managed container not exporting deps needed run, @ minimum, jboss-threads as7-1557 --> <dependency> <groupid>org.jboss.as</groupid> <artifactid>jboss-as-build</artifactid> <type>pom</type> <scope>test</scope> <exclusions> <exclusion> <groupid>javax.faces</groupid> <artifactid>jsf-impl</artifactid> </exclusion> <exclusion> <groupid>xalan</groupid> <artifactid>serializer</artifactid> </exclusion> </exclusions> </dependency>
<profile> <!-- declare "integration test" profile --> <id>it</id> <activation> <activebydefault>true</activebydefault> </activation> <build> <plugins> <!-- , put "target" --> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-dependency-plugin</artifactid> <executions> <execution> <id>unpack</id> <phase>pre-integration-test</phase> <!-- run before testing --> <goals> <goal>unpack</goal> </goals> <configuration> <artifactitems> <artifactitem> <groupid>org.jboss.as</groupid> <artifactid>jboss-as-dist</artifactid> <version>${version.org.jboss.as.7}</version> <type>zip</type> <overwrite>false</overwrite> <outputdirectory>${project.build.directory}</outputdirectory> </artifactitem> </artifactitems> </configuration> </execution> </executions> </plugin> <!-- surefire --> <plugin> <artifactid>maven-surefire-plugin</artifactid> <executions> <execution> <id>integration-test</id> <phase>integration-test</phase> <goals> <goal>test</goal> </goals> <configuration> <redirecttestoutputtofile>true</redirecttestoutputtofile> <trimstacktrace>false</trimstacktrace> <printsummary>true</printsummary> <includes> <include>**/*integrationtestcase.java</include> </includes> <forkmode>once</forkmode> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile>
the java_home not set/set improperly. working now!
Comments
Post a Comment