Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
kovacsakos Super Contributor.
Super Contributor.
292 views

Generate JAR for LeanFT - Eclipse built-in jar export option vs Maven assembly plugin

I used IntelliJ IDEA to generate jar file with maven-assembly-plugin.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>3.1.0</version>
    <executions>
        <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
                <goal>single</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <archive>
            <manifest>
                <mainClass>test.LeanFTest</mainClass>
            </manifest>
        </archive>
        <finalName>${project.artifactId}-fatjar-${project.version}</finalName>
        <appendAssemblyId>false</appendAssemblyId>
    </configuration>
</plugin>

It was not worked, was unable to use jar file, so I imported project to Eclipse and used built-in jar export option. This jar is working fine. I couldn't find, what is difference between these jar files.

Labels (1)
0 Likes
2 Replies
Juan Carlos Blanco Frequent Contributor.
Frequent Contributor.

Re: Generate JAR for LeanFT - Eclipse built-in jar export option vs Maven assembly plugin

Hello,

Could you please provide us more detaisl about what are yoou trying to do exactly?

Also are you following any instructions for that? if so please let us know.

Regards.

 

Juan Carlos. 

 

0 Likes
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Generate JAR for LeanFT - Eclipse built-in jar export option vs Maven assembly plugin

Hi Akos,

If you are trying to create a jar only with the contents of the LeanFT project, you don't need to use the maven-assembly-plugin at all.
However, if you are trying to create a jar with its dependencies using the maven-assembly-plugin, you need to add the following to the configuration of the plugin:
<descriptorRefs>
    <descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>

Regarding eclipse, there are many options when exporting a JAR in eclipse, please provide us more information about how you export it, and what you are trying to achieve.

Regards,
Yevgeny.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.