gpt4 book ai didi

java - Maven-打包jar时如何创建ejb客户端

转载 作者:行者123 更新时间:2023-12-02 12:07:17 33 4
gpt4 key购买 nike

我想构建两个 jar 文件 - 一个用于客户端,一个用于服务器端。我试图关注Maven - how to create ejb client when packing war没有任何运气。我的 pom 很简单,但我不知道它出了什么问题。我只得到一 jar 所有类(class)。

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.valdoprojects.employeemanagementserverapplication</groupId>
<artifactId>EmployeeManagmentServerApplication</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.2.0.Final</version>
<type>maven-plugin</type>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>3.1</version>
<configuration>
<generateClient>true</generateClient>
<clientIncludes>
<clientInclude>/com/valdoprojects/employeemanagement/domain/**</clientInclude>
<clientInclude>**/*Service*</clientInclude>
</clientIncludes>
</configuration>
<goals>
<goal>ejb</goal>
</goals>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

最佳答案

看来您需要更改您的 <packaging>来自jarejb并指定 <ejbVersion><configuration> .

关于java - Maven-打包jar时如何创建ejb客户端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46814056/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com