triplesraka.blogg.se

Java jxl jar
Java jxl jar













java jxl jar

In order to do that, we need to use different plugin, designed for creating executable jar files: In the last part, we want to cover a standalone web application that is packed inside a j ar file. cons – complex configuration (especially if we want to use advanced features).pros – dependencies inside the jar file, advanced control of packaging our artifact, with shading and class relocation.The output file will be named core-java-0.1.0-SNAPSHOT-shaded.jar, where core-java is our project name followed by snapshot version and plugin name. Second, we need to specify the transformer implementation we used the standard one in our example.įinally, we need to specify the main class of our application. There are three main parts to this configuration.įirst, marks all dependencies to be packaged into the jar. cons – basic control of packaging our artifact, for example, there is no class relocation support.pros – dependencies inside the jar file, one file only.Output in our example will be named as core-java-jar-with-dependencies.jar.

java jxl jar

In the descriptorRefs part of the configuration code, we provided the name that will be added to the project name. The difference is that the Maven Assembly Plugin will automatically copy all required dependencies into a jar file.

#Java jxl jar manual

Similarly to the manual approach, we need to provide the information about the main class. Let's take a look at the configuration in pom.xml: The main goal in the assembly plugin is the single goal, which is used to create all assemblies (all other goals are deprecated and will be removed in a future release). The Apache Maven Assembly Plugin allows users to aggregate the project output along with its dependencies, modules, site documentation, and other files into a single, runnable package. The advantages and disadvantages of this approach are: Please note that we need to provide a fully qualified name of the class, which means it will include package name. We add a classpath, with all dependencies (folder libs/), and provide the information about the main class. The most important part of this is the manifest configuration. Second, we are going to create executable and classpath-aware jar, with the link to the dependencies copied in the first step: Ĭom.

java jxl jar

In our case, we'll create a folder named libs inside the project build directory (which is usually the target folder). First, we specify the goal copy-dependencies, which tells Maven to copy these dependencies into the specified outputDirectory.















Java jxl jar