0

团队,

我们的项目使用 EJB,6.1 是我们的服务器,在部署代码时,需要存根文件存在于 EAR(Maven 生成)中。为了实现这一点,我在我们的 pom.xml 中使用了 was6 插件

<plugins>
  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>was6-maven-plugin</artifactId>
        <executions>
        <execution>
           <goals>
                    <goal>ejbdeploy</goal>
            </goals>
         </execution>
        </executions>
    </plugin>

    <plugin>
        <artifactId>maven-ejb-plugin</artifactId>
        <configuration>
        <archive>
        <manifest>
               <addClasspath>true</addClasspath>
                     <classpathPrefix>lib/</classpathPrefix>
        </manifest>
        </archive>
        </configuration>
    </plugin>
</plugins>

为此,我们需要设置环境变量“WAS_HOME”。

但是我们无法在连续构建服务器中设置 wasHome,因此我们收到 BUILD ERROR - “wasHome not defined”

这是实现这一目标的任何其他方式吗?- 在不使用 Maven 中的 WAS 6 maven 插件的情况下为所有 ejb 类创建存根文件。

4

2 回答 2

1

WAS6_HOME 环境变量是 was6-maven-plugin 用来知道 Websphere 所在位置的默认值,但人们经常使用 wasHome 属性来表示这一点。

从这里可以在 pom 或设置文件和 Maven 配置文件中使用 Maven 属性。

另一方面,您可以在没有 maven 插件的情况下生成 EJB 存根,但您始终需要知道 websphere 的安装位置。

问候

于 2014-03-17T15:02:39.787 回答
0

为了实现这一点,我们可以(ejbdeploy = true)在 was6 服务器安装配置 xml 中设置参数并使其正常工作。

感谢所有的回复。

于 2014-03-18T06:02:29.990 回答