如何在 NetBeans 8.2 中添加 IBM WAS 8.5

Posted

技术标签:

【中文标题】如何在 NetBeans 8.2 中添加 IBM WAS 8.5【英文标题】:How to add IBM WAS 8.5 in NetBeans 8.2 【发布时间】:2017-09-14 22:24:51 【问题描述】:

您好,我需要将 WebSphere Application Server 版本 8.5.5.3 Liberty Profile 添加到我的 NetBeans 8.2,但我无法通过 WasCe 插件来完成,这仅适用于 Apache Geronimo 和 IBM WebSphere AS CE。

谁能帮帮我?

【问题讨论】:

【参考方案1】:

编译安装这个插件:https://github.com/tjmcmanus/NetbeansLibertyPlugin.git

改用这个 pom.xml 文件:

<?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>org.netbeans.modules.liberty</groupId>
    <artifactId>NetBeansLibertyPlugin</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>nbm</packaging>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>nbm-maven-plugin</artifactId>
                <version>3.13</version>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <useDefaultManifestFile>true</useDefaultManifestFile>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>netbeans</id>
            <name>Repository hosting NetBeans modules</name>
            <url>http://bits.netbeans.org/nexus/content/groups/netbeans</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
     <dependencies>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-modules-server</artifactId>
            <version>$netbeans.version</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-nodes</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-dialogs</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-util</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-util-ui</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-awt</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-filesystems</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-io</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-modules-keyring</artifactId>
            <version>$netbeans.version</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-filesystems-nb</artifactId>
            <version>$netbeans.version</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-api-templates</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-util-lookup</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-actions</artifactId>
            <version>$netbeans.version</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-modules-j2eeserver</artifactId>
            <version>$netbeans.version</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-modules-project-libraries</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-modules-java-platform</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-modules-j2eeapis</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <!--fix transitive dependency by Ricardo Guillen-->
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-modules-j2ee-core</artifactId>
            <version>$netbeans.version</version>
        </dependency>
        <dependency>
          <groupId>org.netbeans.api</groupId>
          <artifactId>org-netbeans-api-annotations-common</artifactId>
          <version>$netbeans.version</version>
        </dependency>
    </dependencies>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!--update version by Ricardo Guillen-->
        <netbeans.version>RELEASE82</netbeans.version>
    </properties>
    <name>NetBeansLibertyPlugin</name>
</project>

【讨论】:

我能够使用您提供的 POM 在 netbeans 中成功编译和安装插件,但我无法启动新创建的 Liberty Server。我得到 NullPointerException 我能够编译和创建 webshpere 服务器。但是 websphere 属性什么也没显示。所以我无法启动服务器

以上是关于如何在 NetBeans 8.2 中添加 IBM WAS 8.5的主要内容,如果未能解决你的问题,请参考以下文章

如何在 NetBeans 8.2 中使用 Spring 5.0?

如何在 Netbeans 8.2 中转换选项卡中的空格?

如何在 Netbeans IDE 8.2 中更改评论颜色?

在哪里或如何下载适用于 NetBeans 8.2 的 Darcula LAF?

从Netbeans 8.2切换到Apache Netbeans 10用于PHP开发

在 netbeans 8.2 的计算机上找不到 JDK