繁体   English   中英

Wildfly Maven插件未部署XA数据源

[英]Wildfly Maven Plugin not deploy xa-datasource

我开始使用Wildfly 8和Maven,但遇到了问题。

我需要进行xa数据源部署。 为此,我使用wildfly maven插件,您可以看到以下配置:

<profiles>
        <profile>
            <id>wildfly-deploy-postgres-ds</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.wildfly.plugins</groupId>
                        <artifactId>wildfly-maven-plugin</artifactId>
                        <version>1.0.1.Final</version>
                        <executions>
                            <execution>
                                <id>deploy-postgresql</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>deploy-artifact</goal>
                                </goals>
                                <configuration>
                                    <groupId>postgresql</groupId>
                                    <artifactId>postgresql</artifactId>
                                    <name>postgresql.jar</name>
                                </configuration>
                            </execution>
                            <execution>
                                <id>add-datasource</id>
                                <phase>install</phase>
                                <goals>
                                    <goal>add-resource</goal>
                                </goals>
                                <configuration>
                                    <address>subsystem=datasources</address>
                                    <resources>
                                        <resource>
                                            <address>xa-data-source=java:jboss/datasources/postgresDS</address>
                                            <properties>
                                                <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
                                                <jndi-name>java:jboss/datasources/postgresDS</jndi-name>
                                                <enabled>true</enabled>
                                                <driver-name>postgresql.jar</driver-name>
                                            </properties>
                                        </resource>
                                        <resource>
                                            <address>xa-data-source=java:jboss/datasources/postgresDS,xa-datasource-properties=DatabaseName</address>
                                            <properties>
                                                <value>logrdb</value>
                                            </properties>
                                        </resource>
                                        <resource>
                                            <address>xa-data-source=java:jboss/datasources/postgresDS,xa-datasource-properties=ServerName</address>
                                            <properties>
                                                <value>localhost</value>
                                            </properties>
                                        </resource>
                                        <resource>
                                            <address>xa-data-source=java:jboss/datasources/postgresDS,xa-datasource-properties=User</address>
                                            <properties>
                                                <value>logr</value>
                                            </properties>
                                        </resource>
                                        <resource>
                                            <address>xa-data-source=java:jboss/datasources/postgresDS,xa-datasource-properties=Password</address>
                                            <properties>
                                                <value>logr</value>
                                            </properties>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

在shell中执行配置文件:

mvn clean install -X -P wildfly-deploy-postgres-ds

收到此错误信息:

[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.1.Final:add-resource (add-datasource) on project xya: Could not execute goal add-resource. Reason: null: IllegalArgumentException -> [Help 1]

您可以在此处查看完整的调试日志> http://pastebin.com/QhvHUnc0

有人知道这个问题的根源吗? 谢谢!

此问题已在1.0.2.Final1.0.2.Final 还要注意子资源应如何用于XA数据源,因为它们需要在添加过程中定义的属性。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM