maven - Deploying Wildfly EJB via mvn wildfly:deploy not putting jar into local repo. Ejb client can't see ejb dependency -


i'm trying run example "java ee 7 development wildfly". first i've deployed ticket-agency-ejb via mvn wildfly:deploy, didn't install jar local repo, did mvn install though isn't mentioned in book.i can see jar in local repo expected. tried run ticket-agency-ejb-client via mvn package install exec:exec getting error:

failed execute goal on project ticket-agency-ejb-client: not resolve dependencies project com.packtpub.wflydevelopment.chapter3:ticket-agency-ejb-client:jar:0.0.1-snapshot: failed collect dependencies @ com.packtpub.wflydevelopment.chapter3:ticket-agency-ejb:jar:0.0.1-snapshot: failed read artifact descriptor com.packtpub.wflydevelopment.chapter3:ticket-agency-ejb:jar:0.0.1-snapshot: not find artifact com.packtpub.wflydevelopment.chapter3:ticket-agency:pom:0.0.1-snapshot -> [help 1]

then did mvn deploy in parent project(ticket-agency) , tried run client again, works intended. i'm confused

1) why mvn wildfly:deploy didn't put jar local repo?

2) why deploying parent necessary?

  1. you need gain understanding of maven lifecycles. according wildfly:deploy, maven lifecycle phase package invoked before artifact deployed wildfly. package creates jar, not install in local repository. happens during subsequent install phase.

  2. "deploying" parent not necessary. deploy phase follows install phase. means installed child modules in local repository prior deploy. running mvn install on parent have had same effect. note maven deploy process uploads artifacts repository manager. not deploy application server.

  3. you must perform @ least 1 mvn install parent because 2 child poms dependent upon it. install parent pom.xml in local repository.

here own project:

[steve@steves-mbp ticket-agency]$ mvn clean install [info] scanning projects... [info] ------------------------------------------------------------------------ [info] reactor build order: [info]  [info] ticket-agency [info] ticket-agency-ejb [info] ticket-agency-ejb-client [info]                                                                          [info] ------------------------------------------------------------------------ [info] building ticket-agency 1.0 [info] ------------------------------------------------------------------------ [info]  [info] --- maven-clean-plugin:2.5:clean (default-clean) @ ticket-agency --- [info]  [info] --- maven-install-plugin:2.4:install (default-install) @ ticket-agency --- [info] installing /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/pom.xml /users/steve/.m2/repository/com/packtpub/wflydevelopment/chapter3/ticket-agency/1.0/ticket-agency-1.0.pom [info]                                                                          [info] ------------------------------------------------------------------------ [info] building ticket-agency-ejb 1.0 [info] ------------------------------------------------------------------------ [info]  [info] --- maven-clean-plugin:2.5:clean (default-clean) @ ticket-agency-ejb --- [info] deleting /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb/target [info]  [info] --- maven-resources-plugin:2.6:resources (default-resources) @ ticket-agency-ejb --- [info] using 'utf-8' encoding copy filtered resources. [info] copying 2 resources [info]  [info] --- maven-compiler-plugin:3.1:compile (default-compile) @ ticket-agency-ejb --- [info] changes detected - recompiling module! [info] compiling 10 source files /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb/target/classes [info]  [info] --- maven-resources-plugin:2.6:testresources (default-testresources) @ ticket-agency-ejb --- [info] using 'utf-8' encoding copy filtered resources. [info] skip non existing resourcedirectory /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb/src/test/resources [info]  [info] --- maven-compiler-plugin:3.1:testcompile (default-testcompile) @ ticket-agency-ejb --- [info] no sources compile [info]  [info] --- maven-surefire-plugin:2.12.4:test (default-test) @ ticket-agency-ejb --- [info] no tests run. [info]  [info] --- maven-ejb-plugin:2.3:ejb (default-ejb) @ ticket-agency-ejb --- [info] building ejb ticket-agency-ejb ejb version 3.2 [info] building jar: /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb/target/ticket-agency-ejb.jar [info] building ejb client ticket-agency-ejb-client [info] building jar: /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb/target/ticket-agency-ejb-client.jar [info]  [info] --- maven-install-plugin:2.4:install (default-install) @ ticket-agency-ejb --- [info] installing /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb/target/ticket-agency-ejb.jar /users/steve/.m2/repository/com/packtpub/wflydevelopment/chapter3/ticket-agency-ejb/1.0/ticket-agency-ejb-1.0.jar [info] installing /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb/pom.xml /users/steve/.m2/repository/com/packtpub/wflydevelopment/chapter3/ticket-agency-ejb/1.0/ticket-agency-ejb-1.0.pom [info] installing /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb/target/ticket-agency-ejb-client.jar /users/steve/.m2/repository/com/packtpub/wflydevelopment/chapter3/ticket-agency-ejb/1.0/ticket-agency-ejb-1.0-client.jar [info]                                                                          [info] ------------------------------------------------------------------------ [info] building ticket-agency-ejb-client 1.0 [info] ------------------------------------------------------------------------ [info]  [info] --- maven-clean-plugin:2.5:clean (default-clean) @ ticket-agency-ejb-client --- [info] deleting /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb-client/target [info]  [info] --- maven-resources-plugin:2.6:resources (default-resources) @ ticket-agency-ejb-client --- [info] using 'utf-8' encoding copy filtered resources. [info] copying 1 resource [info]  [info] --- maven-compiler-plugin:3.1:compile (default-compile) @ ticket-agency-ejb-client --- [info] changes detected - recompiling module! [info] compiling 2 source files /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb-client/target/classes [info]  [info] --- maven-resources-plugin:2.6:testresources (default-testresources) @ ticket-agency-ejb-client --- [info] using 'utf-8' encoding copy filtered resources. [info] skip non existing resourcedirectory /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb-client/src/test/resources [info]  [info] --- maven-compiler-plugin:3.1:testcompile (default-testcompile) @ ticket-agency-ejb-client --- [info] no sources compile [info]  [info] --- maven-surefire-plugin:2.12.4:test (default-test) @ ticket-agency-ejb-client --- [info] no tests run. [info]  [info] --- maven-jar-plugin:2.4:jar (default-jar) @ ticket-agency-ejb-client --- [info] building jar: /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb-client/target/ticket-agency-ejb-client-1.0.jar [info]  [info] --- maven-install-plugin:2.4:install (default-install) @ ticket-agency-ejb-client --- [info] installing /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb-client/target/ticket-agency-ejb-client-1.0.jar /users/steve/.m2/repository/com/packtpub/wflydevelopment/chapter3/ticket-agency-ejb-client/1.0/ticket-agency-ejb-client-1.0.jar [info] installing /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb-client/pom.xml /users/steve/.m2/repository/com/packtpub/wflydevelopment/chapter3/ticket-agency-ejb-client/1.0/ticket-agency-ejb-client-1.0.pom [info] ------------------------------------------------------------------------ [info] reactor summary: [info]  [info] ticket-agency ...................................... success [  0.204 s] [info] ticket-agency-ejb .................................. success [  1.346 s] [info] ticket-agency-ejb-client ........................... success [  0.282 s] [info] ------------------------------------------------------------------------ [info] build success [info] ------------------------------------------------------------------------ [info] total time: 2.005 s [info] finished at: 2015-10-08t19:29:30+11:00 [info] final memory: 21m/230m [info] ------------------------------------------------------------------------ [steve@steves-mbp ticket-agency]$ mvn -pl ticket-agency-ejb wildfly:deploy [info] scanning projects... [info]                                                                          [info] ------------------------------------------------------------------------ [info] building ticket-agency-ejb 1.0 [info] ------------------------------------------------------------------------ [info]  [info] >>> wildfly-maven-plugin:1.0.2.final:deploy (default-cli) > package @ ticket-agency-ejb >>> [info]  [info] --- maven-resources-plugin:2.6:resources (default-resources) @ ticket-agency-ejb --- [info] using 'utf-8' encoding copy filtered resources. [info] copying 2 resources [info]  [info] --- maven-compiler-plugin:3.1:compile (default-compile) @ ticket-agency-ejb --- [info] nothing compile - classes date [info]  [info] --- maven-resources-plugin:2.6:testresources (default-testresources) @ ticket-agency-ejb --- [info] using 'utf-8' encoding copy filtered resources. [info] skip non existing resourcedirectory /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb/src/test/resources [info]  [info] --- maven-compiler-plugin:3.1:testcompile (default-testcompile) @ ticket-agency-ejb --- [info] no sources compile [info]  [info] --- maven-surefire-plugin:2.12.4:test (default-test) @ ticket-agency-ejb --- [info] no tests run. [info]  [info] --- maven-ejb-plugin:2.3:ejb (default-ejb) @ ticket-agency-ejb --- [info] building ejb ticket-agency-ejb ejb version 3.2 [info] building jar: /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb/target/ticket-agency-ejb.jar [info] building ejb client ticket-agency-ejb-client [info] building jar: /users/steve/work/personal/wildflydevelopmentbycmilandmatloka/ticket-agency/ticket-agency-ejb/target/ticket-agency-ejb-client.jar [info]  [info] <<< wildfly-maven-plugin:1.0.2.final:deploy (default-cli) < package @ ticket-agency-ejb <<< [info]  [info] --- wildfly-maven-plugin:1.0.2.final:deploy (default-cli) @ ticket-agency-ejb --- oct 08, 2015 7:30:03 pm org.xnio.xnio <clinit> info: xnio version 3.2.2.final oct 08, 2015 7:30:03 pm org.xnio.nio.nioxnio <clinit> info: xnio nio implementation version 3.2.2.final oct 08, 2015 7:30:03 pm org.jboss.remoting3.endpointimpl <clinit> info: jboss remoting version 4.0.3.final [info] ------------------------------------------------------------------------ [info] build success [info] ------------------------------------------------------------------------ [info] total time: 2.737 s [info] finished at: 2015-10-08t19:30:05+11:00 [info] final memory: 19m/369m [info] ------------------------------------------------------------------------ [steve@steves-mbp ticket-agency]$ mvn -pl ticket-agency-ejb-client exec:exec [info] scanning projects... [info]                                                                          [info] ------------------------------------------------------------------------ [info] building ticket-agency-ejb-client 1.0 [info] ------------------------------------------------------------------------ [info]  [info] --- exec-maven-plugin:1.2.1:exec (default-cli) @ ticket-agency-ejb-client --- theatre booking system ===================================== commands: book, bookasync, list, mail, money, quit > list oct 08, 2015 7:30:35 pm com.packtpub.wflydevelopment.chapter3.client.ticketagencyclient handlelist info: seat [id=1, name=stalls, price=40, booked=false] seat [id=2, name=circle, price=20, booked=false] seat [id=3, name=balcony, price=10, booked=false] seat [id=4, name=stalls, price=40, booked=false] seat [id=5, name=circle, price=20, booked=false] seat [id=6, name=balcony, price=10, booked=false] seat [id=7, name=stalls, price=40, booked=false] seat [id=8, name=circle, price=20, booked=false] seat [id=9, name=balcony, price=10, booked=false] seat [id=10, name=stalls, price=40, booked=false] seat [id=11, name=circle, price=20, booked=false] seat [id=12, name=balcony, price=10, booked=false] seat [id=13, name=stalls, price=40, booked=false] seat [id=14, name=circle, price=20, booked=false] seat [id=15, name=balcony, price=10, booked=false]  >  

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -