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

  • Home
  • SEARCH
  • 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 6554785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:44:28+00:00 2026-05-25T12:44:28+00:00

I have several Maven modules with Vaadin library dependency in the root pom.xml file.

  • 0

I have several Maven modules with Vaadin library dependency in the root pom.xml file.

I’m trying to build a set of OSGI bundles (1 per Maven module) using Maven+BND.

I added this to my “root” pom.xml file:

    <dependencies>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin</artifactId>
        <version>6.6.6</version>
    </dependency>
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-user</artifactId>
        <version>2.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.osgi.core</artifactId>
        <version>1.0.0</version>
    </dependency>
    </dependencies>

unfortunately, the resulting JAR files (bundles) include GWT (com.google.gwt) classes. This
1) makes the bundles huge, with lots of duplicated dependencies.
2) generated thousands of build warnings about “split packages”.

QUESTION: how to prevent adding GWT classes into my Jar files?

I tried setting “scope” of GWT to “provided”, setting “type” to “bundle”, and even optional=true – didn’t help.

here’s the part of my root pom.xml, which is responsible for Vaadin/GWT stuff:

    <plugins>
        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <version>2.3.5</version>
            <extensions>true</extensions>
            <configuration>
                <instructions>
                    <Export-Package>mycompany.*</Export-Package>
                    <Private-Package>*.impl.*</Private-Package>
                    <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                    <!--                        <Bundle-Activator>com.alskor.publicpackage.MyActivator</Bundle-Activator>-->
                </instructions>
            </configuration>
        </plugin>
        <!-- Compiles your custom GWT components with the GWT compiler -->
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <!-- Version 2.1.0-1 works at least with Vaadin 6.5 -->
            <version>2.3.0-1</version>
            <configuration>
                <!-- if you don't specify any modules, the plugin will find them -->
                <!--modules>
                    ..
                </modules-->
                <webappDirectory>${project.build.directory}/${project.build.finalName}/VAADIN/widgetsets
                </webappDirectory>
                <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
                <runTarget>clean</runTarget>
                <hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
                <noServer>true</noServer>
                <port>8080</port>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>resources</goal>
                        <goal>compile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <!-- Updates Vaadin 6.2+ widgetset definitions based on project dependencies -->
        <plugin>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-maven-plugin</artifactId>
            <version>1.0.1</version>
            <executions>
                <execution>
                    <configuration>
                        <!-- if you don't specify any modules, the plugin will find them -->
                        <!--
                        <modules>
                            <module>${package}.gwt.MyWidgetSet</module>
                        </modules>
                        -->
                    </configuration>
                    <goals>
                        <goal>update-widgetset</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
  • 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-25T12:44:29+00:00Added an answer on May 25, 2026 at 12:44 pm

    The wildcards in your Export-Package and Private-Package statements strike me as exceedingly dangerous. It’s possible that the GWT packages are being dragged in because of the *.impl.* pattern in Private-Package.

    Also you should never use wildcards in Export-Package: exports should be tightly controlled and versioned.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a aggregation .pom set up to include several, individual modules, similar to
In a maven project I have several modules which only have a persitence.xml for
I'm developing a maven project with several modules in eclipse. The parent pom.xml declares
I have flex application consisting of several modules which is configured using maven. I'm
I'm writing an application that consists of several maven modules. All of them have
I have a maven project with several modules, One of these modules produces a
I have a maven2 project with several jar modules, build the project will get
I have a maven POM file for a web service. For one of the
I have a project with several modules. When all tests pass, Maven test runs
We have a big (~215 bundles and counting) osgi (felix+springdm) project, build with maven

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.