Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Creating a shaded/"uber-jar?"

Matthias,

Excellent! Thanks! I think this will help with some of our next steps.

Jay

On Fri, Jun 7, 2019 at 9:25 PM Matthias Sohn <matthias.sohn@xxxxxxxxx> wrote:
We used the maven-shade-plugin to build the jgit command line app:

We switched to the spring-boot-maven-plugin and now use nested jars
since we added Bouncycastle for signing support which is JCE and Eclipse signed.
These signatures would break during shading and we didn't want to re-sign the shaded jar
since the JCE signature is meant to be used for JCE providers only.

especially

here are the complete sources of the  pom.xml
and the shell script we use to start the command line application

-Matthias

On Fri, Jun 7, 2019 at 11:03 PM Jay Jay Billings <jayjaybillings@xxxxxxxxx> wrote:
FYI - Greg and I looked at this more. Something like this appears to work:

            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-p2-repository-plugin</artifactId>
                <version>${tycho-version}</version>
                <configuration>
            <!--        <createArtifactRepository>false</createArtifactRepository>-->
                    <includeAllDependencies>true</includeAllDependencies>
                </configuration>
            </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.4.3</version>
        <configuration>
          <!-- put your configurations here -->
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

This produces a single shaded jar that appears to be correct, but I haven't tried it in a program yet.

Jay

On Fri, Jun 7, 2019 at 3:43 PM Jay Jay Billings <jayjaybillings@xxxxxxxxx> wrote:
Hello Tycho team!

Does anyone have a suggestion for how to create a shaded/uber-jar of a project and all of its dependencies? This would be comparable to using the maven-shaded plugin. I have found one good reference for it on the mailing list:


Is that still the best way to do it?

Here's our use case. Greg Watson and I are looking taking some of the backend bundles from Eclipse PTP and Eclipse ICE to use in some new web services we are building. These are Spring+Vaadin web applications, so it would be easiest for us to just put a gigantic jar on the classpath.

Any thoughts or suggestions?

Best,
Jay

--
Jay Jay Billings
Twitter Handle: @jayjaybillings


--
Jay Jay Billings
Twitter Handle: @jayjaybillings
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/tycho-user


--
Jay Jay Billings
Twitter Handle: @jayjaybillings

Back to the top