我一直在使用exec-maven-plugin很长一段时间了,但是这个问题似乎太复杂了我无法理解。我的项目是多模块项目,一旦调用了以下插件,它就会完成预期的工作,但maven似乎只是突破了默认的生命周期。看起来我的mainClass有些问题,但不确定是什么。
POM.xml片段如下:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>genclient.proxies.platform</id>
<phase>generate-sources</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>com.mschematic.tools.proxygen.WsProxyGen</mainClass>
<cleanupDaemonThreads>true</cleanupDaemonThreads>
<daemonThreadJoinTimeout>15000</daemonThreadJoinTimeout>
<stopUnresponsiveDaemonThreads>true</stopUnresponsiveDaemonThreads>
<arguments>
<argument>-p</argument>
<argument>com.mschematic.client.platform</argument>
<argument>-d</argument>
<argument>${project.basedir}/generated-sources/platform-beans</argument>
<argument>-wc</argument>
<argument>cu-platform-wsv-1.0.0-SNAPSHOT</argument>
<argument>-wbn</argument>
<argument>WebBean</argument>
<argument>com.mschematic.platform.services.AlertService</argument>
<argument>com.mschematic.platform.services.ApplConfig</argument>
<argument>com.mschematic.platform.services.AuditService</argument>
<argument>com.mschematic.platform.services.AuthorityManager</argument>
<argument>com.mschematic.platform.services.BookingManager</argument>
<argument>com.mschematic.platform.services.CaseManager</argument>
<argument>com.mschematic.platform.services.CustomDataService</argument>
<argument>com.mschematic.platform.services.CustomerHistory</argument>
<argument>com.mschematic.platform.services.DocumentManager</argument>
<argument>com.mschematic.platform.services.FinancialTool</argument>
<argument>com.mschematic.platform.services.FormsManager</argument>
<argument>com.mschematic.platform.services.IdentityService</argument>
<argument>com.mschematic.platform.services.Inbox</argument>
<argument>com.mschematic.platform.services.Monitoring</argument>
<argument>com.mschematic.platform.services.ProcessDirectory</argument>
<argument>com.mschematic.platform.services.ProductManager</argument>
<argument>com.mschematic.platform.services.Reference</argument>
<argument>com.mschematic.platform.services.Sales</argument>
<argument>com.mschematic.platform.services.Scripting</argument>
<argument>com.mschematic.platform.services.ServicingService</argument>
<argument>com.mschematic.platform.services.WaitList</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</build>
调试日志片段如下:
[DEBUG] (f) mainClass = com.mschematic.tools.proxygen.WsProxyGen
[DEBUG] (f) pluginDependencies = [org.codehaus.mojo:exec-maven-plugin:maven-plugin:1.4.0:, org.codehaus.plexus:plexus-interpolation:jar:1.11:compile, backport-util-concurrent:backport-util-concurrent:jar:3.1:compile, org.slf4j:slf4j-jdk14:jar:1.5.6:runtime, org.slf4j:slf4j-api:jar:1.5.6:runtime, org.slf4j:jcl-over-slf4j:jar:1.5.6:runtime, org.apache.maven.reporting:maven-reporting-api:jar:2.2.1:compile, org.apache.maven.doxia:doxia-sink-api:jar:1.1:compile, org.apache.maven.doxia:doxia-logging-api:jar:1.1:compile, commons-cli:commons-cli:jar:1.2:compile, org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:compile, org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile, org.sonatype.plexus:plexus-cipher:jar:1.4:compile, org.codehaus.plexus:plexus-utils:jar:3.0.20:compile, org.apache.commons:commons-exec:jar:1.3:compile]
[DEBUG] (f) project = MavenProject: com.mschematic.base.services.ifxclient:cu-services-ifx-client:1.0.0-SNAPSHOT @ F:\khaja\cu-maven\channelUnited\parent\base\cu-services\cu-services-ifx-client\pom.xml
[DEBUG] (f) remoteRepositories = [ id: central
url: http://repo.maven.apache.org/maven2
layout: default
snapshots: [enabled => false, update => daily]
releases: [enabled => true, update => daily]
]
[DEBUG] (f) skip = false
[DEBUG] (f) stopUnresponsiveDaemonThreads = true
[DEBUG] -- end configuration --
[DEBUG] Invoking : com.mschematic.tools.proxygen.WsProxyGen.main(-p, com.mschematic.client.platform, -d, F:\khaja\cu-maven\channelUnited\parent\base\cu-services\cu-services-ifx-client/generated-sources/platform-beans, -wc, cu-platform-wsv-1.0.0-SNAPSHOT, -wbn, WebBean, com.mschematic.platform.services.AlertService, com.mschematic.platform.services.ApplConfig, com.mschematic.platform.services.AuditService, com.mschematic.platform.services.AuthorityManager, com.mschematic.platform.services.BookingManager, com.mschematic.platform.services.CaseManager, com.mschematic.platform.services.CustomDataService, com.mschematic.platform.services.CustomerHistory, com.mschematic.platform.services.DocumentManager, com.mschematic.platform.services.FinancialTool, com.mschematic.platform.services.FormsManager, com.mschematic.platform.services.IdentityService, com.mschematic.platform.services.Inbox, com.mschematic.platform.services.Monitoring, com.mschematic.platform.services.ProcessDirectory, com.mschematic.platform.services.ProductManager, com.mschematic.platform.services.Reference, com.mschematic.platform.services.Sales, com.mschematic.platform.services.Scripting, com.mschematic.platform.services.ServicingService, com.mschematic.platform.services.WaitList)
[DEBUG] Plugin Dependencies will be excluded.
[DEBUG] Project Dependencies will be included.
[DEBUG] Collected project artifacts [com.mschematic.base.services:cu-services-common:jar:1.0.0-SNAPSHOT:compile, com.mschematic.base.services.ifx:cu-ifx-bean-wsv:jar:1.0.0-SNAPSHOT:compile, com.mschematic.tools:cu-gen-ifx-interface:jar:1.0.0:compile, com.mschematic.base.commonentity:cu-common-entity:jar:1.0.0-SNAPSHOT:compile, org.jboss.ejb3:jboss-ejb3-ext-api:jar:2.0.0:compile, org.apache.cxf:cxf-rt-core:jar:2.6.6:compile, org.apache.cxf:cxf-api:jar:2.6.6:compile, org.codehaus.woodstox:woodstox-core-asl:jar:4.1.4:runtime, org.codehaus.woodstox:stax2-api:jar:3.1.1:runtime, com.sun.xml.bind:jaxb-impl:jar:2.2.5.1:compile, org.apache.ws.xmlschema:xmlschema-core:jar:2.0.3:compile, org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile, com.mschematic.svcfactory:cu-svcframework-EJB:jar:1.0.0:compile, com.mschematic.activation:cu-shared:jar:1.0.0:compile, com.mschematic.platformmodel.base:cu-platform-model-base:jar:1.0.0-SNAPSHOT:compile, org.ow2.jonas.osgi:javaee-api:jar:5.0.5:compile, org.ow2.spec.ee:ow2-ejb-3.0-spec:jar:1.0-M1:compile, org.ow2.spec.ee:ow2-jpa-1.0-spec:jar:1.0-M1:compile, org.ow2.spec.ee:ow2-connector-1.5-spec:jar:1.0-M1:compile, org.ow2.spec.ee:ow2-jta-1.1-spec:jar:1.0-M1:compile, org.ow2.spec.ee:ow2-deployment-1.2-spec:jar:1.0-M1:compile, org.ow2.spec.ee:ow2-jsr77-1.1-spec:jar:1.0-M1:compile, org.apache.axis:axis-jaxrpc:jar:1.4:compile, org.apache.axis:axis-saaj:jar:1.4:compile, wsdl4j:wsdl4j:jar:1.6.1:compile, org.apache.tomcat:servlet-api:jar:6.0.14:compile, org.mortbay.jetty:jsp-api-2.1:jar:6.1.5:compile, org.apache.geronimo.specs:geronimo-jaxr_1.0_spec:jar:1.1:compile, javax.security:jacc:jar:1.1:compile, javax.mail:mail:jar:1.4:compile, javax.activation:activation:jar:1.1:compile, org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1:compile, org.apache.axis2:axis2-jaxws-api:jar:1.3:compile, jaxen:jaxen:jar:1.1.1:compile, jdom:jdom:jar:1.0:compile, xom:xom:jar:1.0:compile, xerces:xmlParserAPIs:jar:2.6.2:compile, com.ibm.icu:icu4j:jar:2.6.1:compile, org.apache.ws.commons.axiom:axiom-api:jar:1.2.5:compile, stax:stax-api:jar:1.0.1:compile, org.apache.ws.commons.axiom:axiom-impl:jar:1.2.5:compile, org.apache.ws.commons.axiom:axiom-dom:jar:1.2.5:compile, xalan:xalan:jar:2.7.0:compile, org.codehaus.woodstox:wstx-asl:jar:3.2.1:compile, commons-io:commons-io:jar:1.2:compile, javax.xml.bind:jaxb-api:jar:2.1:compile, javax.xml.stream:stax-api:jar:1.0-2:compile, org.apache.axis2:axis2-saaj-api:jar:1.3:compile, javax.faces:jsf-api:jar:1.2_08:compile, javax.faces:jsf-impl:jar:1.2_08:compile, org.hibernate:hibernate-entitymanager:jar:3.3.2.GA:compile, org.hibernate:hibernate:jar:3.2.6.ga:compile, net.sf.ehcache:ehcache:jar:1.2.3:compile, asm:asm-attrs:jar:1.5.3:compile, dom4j:dom4j:jar:1.6.1:compile, antlr:antlr:jar:2.7.6:compile, cglib:cglib:jar:2.1_3:compile, asm:asm:jar:1.5.3:compile, commons-collections:commons-collections:jar:2.1.1:compile, org.hibernate:hibernate-annotations:jar:3.3.0.ga:compile, javax.persistence:persistence-api:jar:1.0:compile, org.hibernate:hibernate-commons-annotations:jar:3.0.0.ga:compile, org.hibernate:ejb3-persistence:jar:1.0.1.GA:compile, commons-logging:commons-logging:jar:1.0.4:compile, javassist:javassist:jar:3.4.GA:compile, com.mschematic.platform:cu-subsystems:jar:1.0.0:compile, com.mschematic.base.components.reference:cu-reference-ejb:jar:1.0.0-SNAPSHOT:compile, commons-lang:commons-lang:jar:2.4:compile, com.mschematic.base.components.authority:cu-authority-ejb:jar:1.0.0-SNAPSHOT:compile, com.mschematic.base.components.bpmcase:cu-bpmcase-ejb:jar:1.0.0-SNAPSHOT:compile, org.hibernate:hibernate-tools:jar:3.2.0.ga:compile, org.beanshell:bsh:jar:2.0b4:compile, freemarker:freemarker:jar:2.3.8:compile, org.hibernate:jtidy:jar:r8-20060801:compile, com.mschematic.base.components.forms:cu-forms-ejb:jar:1.0.0-SNAPSHOT:compile, com.mschematic.base.components.product:cu-product-ejb:jar:1.0.0-SNAPSHOT:compile, com.mschematic.base.components.sales:cu-sales-ejb:jar:1.0.0-SNAPSHOT:compile, com.mschematic.base.components.servicing:cu-servicing-ejb:jar:1.0.0-SNAPSHOT:compile, com.mschematic.base.tellercomponent.base:cu-teller-component-base:jar:1.0.0-SNAPSHOT:compile, com.mschematic.base.components.inbox:cu-inbox-ejb:jar:1.0.0-SNAPSHOT:compile, com.mschematic.extension.tellerdevices.print:cu-teller-print-agent:jar:1.0.0-SNAPSHOT:compile, com.sun.media:jai_codec:jar:1.1.3:compile, jp.co.epson:epsonupos:jar:1.4.2_16-b05:compile, com.sun.media:jai_core:jar:1.1.3:compile, jpos:jpos:jar:1.3.0_02:compile, jp.co.epson:pos:jar:1.4.2_16-b05:compile, jp.co.epson:uposcommon:jar:1.4.2_16-b05:compile, xerces:xercesImpl:jar:2.9.1:compile, xml-apis:xml-apis:jar:1.3.04:compile, com.mschematic.extension.tellerdevices.print:cu-teller-print-client:jar:1.0.0-SNAPSHOT:compile, jp.glory.cashier:ds-glory-cashier:jar:1.0.0:compile, gnu.io:rxtxcomm:jar:1.5.0:compile, com.mschematic.extension.tellerdevices.cashdevice:cu-teller-cashdevice-client:jar:1.0.0-SNAPSHOT:compile, com.mschematic.extension.tellerdevices.cashdevice:cu-teller-cashdevice-server:jar:1.0.0-SNAPSHOT:compile, org.springframework:spring-beans:jar:3.2.7.RELEASE:compile, org.springframework:spring-core:jar:3.2.7.RELEASE:compile, commons-pool:commons-pool:jar:1.6:compile, com.itextpdf:itextpdf:jar:5.5.6:compile, org.swinglabs:pdf-renderer:jar:1.0.5:compile, es.arcadiaconsulting.javapns:javapns:jar:2.2-json:compile, log4j:log4j:jar:1.2.15:compile, bouncycastle:bcprov-jdk16:jar:140:compile, com.mschematic.tools:cu-gen-ws-proxy:jar:1.0.0:compile]
[DEBUG] Collected project classpath [F:\khaja\cu-maven\channelUnited\parent\base\cu-services\cu-services-ifx-client\target\classes]
[DEBUG] Adding to classpath : file:/F:/khaja/cu-maven/channelUnited/parent/base/cu-services/cu-services-ifx-client/target/classes
[DEBUG] Adding project dependency artifact: cu-services-common to classpath
[DEBUG] Adding project dependency artifact: cu-ifx-bean-wsv to classpath
[DEBUG] Adding project dependency artifact: cu-gen-ifx-interface to classpath
[DEBUG] Adding project dependency artifact: cu-common-entity to classpath
[DEBUG] Adding project dependency artifact: jboss-ejb3-ext-api to classpath
[DEBUG] Adding project dependency artifact: cxf-rt-core to classpath
[DEBUG] Adding project dependency artifact: cxf-api to classpath
[DEBUG] Adding project dependency artifact: woodstox-core-asl to classpath
[DEBUG] Adding project dependency artifact: stax2-api to classpath
[DEBUG] Adding project dependency artifact: jaxb-impl to classpath
[DEBUG] Adding project dependency artifact: xmlschema-core to classpath
[DEBUG] Adding project dependency artifact: geronimo-javamail_1.4_spec to classpath
[DEBUG] Adding project dependency artifact: cu-svcframework-EJB to classpath
[DEBUG] Adding project dependency artifact: cu-shared to classpath
[DEBUG] Adding project dependency artifact: cu-platform-model-base to classpath
[DEBUG] Adding project dependency artifact: javaee-api to classpath
[DEBUG] Adding project dependency artifact: ow2-ejb-3.0-spec to classpath
[DEBUG] Adding project dependency artifact: ow2-jpa-1.0-spec to classpath
[DEBUG] Adding project dependency artifact: ow2-connector-1.5-spec to classpath
[DEBUG] Adding project dependency artifact: ow2-jta-1.1-spec to classpath
[DEBUG] Adding project dependency artifact: ow2-deployment-1.2-spec to classpath
[DEBUG] Adding project dependency artifact: ow2-jsr77-1.1-spec to classpath
[DEBUG] Adding project dependency artifact: axis-jaxrpc to classpath
[DEBUG] Adding project dependency artifact: axis-saaj to classpath
[DEBUG] Adding project dependency artifact: wsdl4j to classpath
[DEBUG] Adding project dependency artifact: servlet-api to classpath
[DEBUG] Adding project dependency artifact: jsp-api-2.1 to classpath
[DEBUG] Adding project dependency artifact: geronimo-jaxr_1.0_spec to classpath
[DEBUG] Adding project dependency artifact: jacc to classpath
[DEBUG] Adding project dependency artifact: mail to classpath
[DEBUG] Adding project dependency artifact: activation to classpath
[DEBUG] Adding project dependency artifact: geronimo-jms_1.1_spec to classpath
[DEBUG] Adding project dependency artifact: axis2-jaxws-api to classpath
[DEBUG] Adding project dependency artifact: jaxen to classpath
[DEBUG] Adding project dependency artifact: jdom to classpath
[DEBUG] Adding project dependency artifact: xom to classpath
[DEBUG] Adding project dependency artifact: xmlParserAPIs to classpath
[DEBUG] Adding project dependency artifact: icu4j to classpath
[DEBUG] Adding project dependency artifact: axiom-api to classpath
[DEBUG] Adding project dependency artifact: stax-api to classpath
[DEBUG] Adding project dependency artifact: axiom-impl to classpath
[DEBUG] Adding project dependency artifact: axiom-dom to classpath
[DEBUG] Adding project dependency artifact: xalan to classpath
[DEBUG] Adding project dependency artifact: wstx-asl to classpath
[DEBUG] Adding project dependency artifact: commons-io to classpath
[DEBUG] Adding project dependency artifact: jaxb-api to classpath
[DEBUG] Adding project dependency artifact: stax-api to classpath
[DEBUG] Adding project dependency artifact: axis2-saaj-api to classpath
[DEBUG] Adding project dependency artifact: jsf-api to classpath
[DEBUG] Adding project dependency artifact: jsf-impl to classpath
[DEBUG] Adding project dependency artifact: hibernate-entitymanager to classpath
[DEBUG] Adding project dependency artifact: hibernate to classpath
[DEBUG] Adding project dependency artifact: ehcache to classpath
[DEBUG] Adding project dependency artifact: asm-attrs to classpath
[DEBUG] Adding project dependency artifact: dom4j to classpath
[DEBUG] Adding project dependency artifact: antlr to classpath
[DEBUG] Adding project dependency artifact: cglib to classpath
[DEBUG] Adding project dependency artifact: asm to classpath
[DEBUG] Adding project dependency artifact: commons-collections to classpath
[DEBUG] Adding project dependency artifact: hibernate-annotations to classpath
[DEBUG] Adding project dependency artifact: persistence-api to classpath
[DEBUG] Adding project dependency artifact: hibernate-commons-annotations to classpath
[DEBUG] Adding project dependency artifact: ejb3-persistence to classpath
[DEBUG] Adding project dependency artifact: commons-logging to classpath
[DEBUG] Adding project dependency artifact: javassist to classpath
[DEBUG] Adding project dependency artifact: cu-subsystems to classpath
[DEBUG] Adding project dependency artifact: cu-reference-ejb to classpath
[DEBUG] Adding project dependency artifact: commons-lang to classpath
[DEBUG] Adding project dependency artifact: cu-authority-ejb to classpath
[DEBUG] Adding project dependency artifact: cu-bpmcase-ejb to classpath
[DEBUG] Adding project dependency artifact: hibernate-tools to classpath
[DEBUG] Adding project dependency artifact: bsh to classpath
[DEBUG] Adding project dependency artifact: freemarker to classpath
[DEBUG] Adding project dependency artifact: jtidy to classpath
[DEBUG] Adding project dependency artifact: cu-forms-ejb to classpath
[DEBUG] Adding project dependency artifact: cu-product-ejb to classpath
[DEBUG] Adding project dependency artifact: cu-sales-ejb to classpath
[DEBUG] Adding project dependency artifact: cu-servicing-ejb to classpath
[DEBUG] Adding project dependency artifact: cu-teller-component-base to classpath
[DEBUG] Adding project dependency artifact: cu-inbox-ejb to classpath
[DEBUG] Adding project dependency artifact: cu-teller-print-agent to classpath
[DEBUG] Adding project dependency artifact: jai_codec to classpath
[DEBUG] Adding project dependency artifact: epsonupos to classpath
[DEBUG] Adding project dependency artifact: jai_core to classpath
[DEBUG] Adding project dependency artifact: jpos to classpath
[DEBUG] Adding project dependency artifact: pos to classpath
[DEBUG] Adding project dependency artifact: uposcommon to classpath
[DEBUG] Adding project dependency artifact: xercesImpl to classpath
[DEBUG] Adding project dependency artifact: xml-apis to classpath
[DEBUG] Adding project dependency artifact: cu-teller-print-client to classpath
[DEBUG] Adding project dependency artifact: ds-glory-cashier to classpath
[DEBUG] Adding project dependency artifact: rxtxcomm to classpath
[DEBUG] Adding project dependency artifact: cu-teller-cashdevice-client to classpath
[DEBUG] Adding project dependency artifact: cu-teller-cashdevice-server to classpath
[DEBUG] Adding project dependency artifact: spring-beans to classpath
[DEBUG] Adding project dependency artifact: spring-core to classpath
[DEBUG] Adding project dependency artifact: commons-pool to classpath
[DEBUG] Adding project dependency artifact: itextpdf to classpath
[DEBUG] Adding project dependency artifact: pdf-renderer to classpath
[DEBUG] Adding project dependency artifact: javapns to classpath
[DEBUG] Adding project dependency artifact: log4j to classpath
[DEBUG] Adding project dependency artifact: bcprov-jdk16 to classpath
[DEBUG] Adding project dependency artifact: cu-gen-ws-proxy to classpath
[DEBUG] joining on thread Thread[com.mschematic.tools.proxygen.WsProxyGen.main(),5,com.mschematic.tools.proxygen.WsProxyGen]
[DEBUG] Setting accessibility to true in order to invoke main().
答案 0 :(得分:0)
使用JadClipse eclipse插件查看源代码。主要方法是在方法结束时调用System.exit(0),导致maven进程被终止。
希望这将有助于将来。