Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6334687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:42:25+00:00 2026-05-24T18:42:25+00:00

I am trying to create a maven based Enterprise Application with an Application Client

  • 0

I am trying to create a maven based Enterprise Application with an Application Client which runs in the Application Client Container from GlassFish. It should fit togheter as the Project template from Netbeans “Enterprise Application” + “Enterprise Application Client” but with maven and not ant.

Until now I have following projects

  • Assembly Maven Project
  • EAR-Module
  • EJB-Module
  • WEB-Module (works well with inside the ear)
  • Swing Client Module

The Assembly pom.xml looks like:

    <project xml...
      <modules>
        <module>shop-ear</module>
        <module>shop-web</module>
        <module>shop-ejb</module>
        <module>shop-client</module>
      </modules>
    </project>

The ear pom.xml contain

<project ...>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>shop</artifactId>
    <groupId>my.package.name</groupId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <groupId>ch.hslu.edu.enapp</groupId>
  <artifactId>shop-ear</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>ear</packaging>
  <!-- ... -->
  <dependencies>
    <dependency>
        <groupId>my.package.name</groupId>
        <artifactId>shop-ejb</artifactId>
        <version>1.0-SNAPSHOT</version>
        <type>ejb</type>
    </dependency>
    <dependency>
        <groupId>my.package.name</groupId>
        <artifactId>shop-web</artifactId>
        <version>1.0-SNAPSHOT</version>
        <type>war</type>
    </dependency>
    <dependency>
        <groupId>my.package.name</groupId>
        <artifactId>shop-client</artifactId>
        <version>1.0-SNAPSHOT</version>
        <type>jar</type>
    </dependency>
</dependencies>

And the Swing Client pom.xml contains

<project xmlns=....>
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>shop</artifactId>
        <groupId>my.package.name</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <groupId>my.package.name</groupId>
    <artifactId>shop-client</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name>shop-client</name>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</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.3.1</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>my.package.name.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <url>http://download.java.net/maven/2/</url>
            <id>java.net</id>
            <layout>default</layout>
            <name>java.net</name>
        </repository>
    </repositories>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jdesktop</groupId>
            <artifactId>beansbinding</artifactId>
            <version>1.2.1</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
    </dependencies>
</project>

Currently I have no dependencies between the Swing Client and the EJB Module. I just want to get a simple Swing form up and running out of the ACC form GlassFish (v 3.1.1).

But this doesn’t work. The Swing-Client is packed into the lib folder inside the ear-file and I can not start it.

Do you know a tutorial or example which fulfill this task?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:42:27+00:00Added an answer on May 24, 2026 at 6:42 pm

    Your ear pom needs to configure the ear plugin like (maybe you just left it out when you put it into your question?):

    <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <version>6</version>
                    <generateApplicationXml>true</generateApplicationXml>
                    <defaultLibBundleDir>lib</defaultLibBundleDir>
                    <modules>
                        <webModule>
                            <groupId>com.foo</groupId>
                            <artifactId>shop-web</artifactId>
                            <contextRoot>webstuff</contextRoot>
                        </webModule>
                        <ejbModule>
                            <groupId>com.foo</groupId>
                            <artifactId>shop-ejb</artifactId>
                            <classifier>single</classifier>
                            <bundleFileName>shop-ejb.jar</bundleFileName>
                        </ejbModule>
                        <jarModule>
                            <groupId>com.foo</groupId>
                            <artifactId>shop-client</artifactId>
                            <bundleDir>/</bundleDir>
                            <bundleFileName>shop-client.jar</bundleFileName>
                            <includeInApplicationXml>true</includeInApplicationXml> <!-- i don't remember if this was absolutely necessary -->
                        </jarModule>
                    </modules>
              </configuration>
            </plugin>
    

    That will package your application client jar outside the lib folder, and will help you define the context roots for your war modules (there isn’t another way that I could find). The bundleFileName was important to get the URL to launch the client to make more sense.

    I don’t know of a single tutorial that puts this all together, but some resources are:

    • http://blogs.steeplesoft.com/2011/02/java-ees-buried-treasure-the-application-client-container/
    • http://java.sun.com/developer/technicalArticles/J2EE/jws-glassfish/part3.html
    • http://blogs.oracle.com/quinn/entry/customizing_generated_java_web_start
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a web application using maven, tomcat and hibernate. Now I'm
I've installed Maven from the Marketplace , and I'm trying to create a new
I'm trying to create an Android application in Eclipse using the Maven plugin and
I am trying to create netbeans module which whould work upon standard maven java
I am trying to create Wicket with maven application followed by URL: http://wicket.apache.org/start/quickstart.html ,
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation
Trying to create a small monitor application that displays current internet usage as percentage
Trying to create a multi module maven project in eclipse. Parent Pom.xml <project xmlns=http://maven.apache.org/POM/4.0.0
I'm trying to create a very simple webapp with maven and eclipse, but I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.