Skip to content

Commit

Permalink
Include javascript files in JAR
Browse files Browse the repository at this point in the history
  • Loading branch information
williamniemiec committed Mar 22, 2022
1 parent 03cf30c commit 5e66685
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 4 deletions.
Binary file added dist/1.x/babel-transpiler-1.0.1.jar
Binary file not shown.
28 changes: 24 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.wniemiec-io-java</groupId>
<artifactId>babel-transpiler</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<name>Babel transpiler</name>
<description>Babel transcription for JavaScript files.</description>
<url>https://github.com/wniemiec-io-java/babel-transpiler</url>
Expand Down Expand Up @@ -112,9 +112,6 @@
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<outputDirectory>${project.basedir}/dist/${version.major}.x</outputDirectory>
</configuration>
</plugin>

<plugin>
Expand Down Expand Up @@ -167,6 +164,29 @@
</execution>
</executions>
</plugin>

<!-- JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${basedir}/src/assembly/distribution.xml</descriptor>
</descriptors>
<outputDirectory>${basedir}/dist/${version.major}.x</outputDirectory>
</configuration>
</plugin>

<!-- Coverage -->
<plugin>
Expand Down
36 changes: 36 additions & 0 deletions src/assembly/distribution.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id>distribution</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>

<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
<unpack>true</unpack>
<scope>runtime</scope>
<includes>
<include>io.github.wniemiec-*:*</include>
</includes>
</dependencySet>
</dependencySets>

<fileSets>
<fileSet>
<directory>${project.build.outputDirectory}</directory>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>examples/**</exclude>
<exclude>results/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${basedir}/src/main/javascript</directory>
<outputDirectory>/javascript/</outputDirectory>
</fileSet>
</fileSets>
</assembly>

0 comments on commit 5e66685

Please sign in to comment.