-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from ia3andy/bundle-deps
Bundle artifacts
- Loading branch information
Showing
85 changed files
with
681 additions
and
357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
target/ | ||
.idea/ | ||
*.iml | ||
/src/main/resources/**.tgz | ||
**/src/main/resources/**.tgz | ||
/nbactions.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>io.mvnpm</groupId> | ||
<artifactId>esbuild-java-parent</artifactId> | ||
<version>999-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>esbuild-java-bundle-original</artifactId> | ||
<name>Esbuild wrapper for Java bundled with original binaries</name> | ||
<properties> | ||
<esbuild.version>0.23.0</esbuild.version> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.mvnpm</groupId> | ||
<artifactId>esbuild-java</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-all</artifactId> | ||
<version>1.3</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>false</filtering> | ||
</resource> | ||
<resource> | ||
<directory>src/main/resources-filtered</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
<plugins> | ||
<plugin> | ||
<groupId>net.revelc.code.formatter</groupId> | ||
<artifactId>formatter-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.revelc.code</groupId> | ||
<artifactId>impsort-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<version>${maven-antrun-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>download</id> | ||
<phase>generate-resources</phase> | ||
<configuration> | ||
<target> | ||
<get dest="src/main/resources" skipexisting="true"> | ||
<url url="https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-${esbuild.version}.tgz"/> | ||
<url url="https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-${esbuild.version}.tgz"/> | ||
<url url="https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-${esbuild.version}.tgz"/> | ||
<url url="https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-${esbuild.version}.tgz"/> | ||
<url url="https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-${esbuild.version}.tgz"/> | ||
<url url="https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-${esbuild.version}.tgz"/> | ||
<url url="https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-${esbuild.version}.tgz"/> | ||
</get> | ||
</target> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
1 change: 1 addition & 0 deletions
1
bundle-original/src/main/resources-filtered/esbuild-java-version.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
esbuild.version=${esbuild.version} |
35 changes: 35 additions & 0 deletions
35
bundle-original/src/test/java/io/mvnpm/esbuild/resolve/BundleResolverTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.mvnpm.esbuild.resolve; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Path; | ||
|
||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import io.mvnpm.esbuild.Bundler; | ||
|
||
public class BundleResolverTest extends BundleTester { | ||
|
||
public static final Resolver THROWING_RESOLVER = version -> { | ||
throw new RuntimeException("Should not call this"); | ||
}; | ||
|
||
@BeforeAll | ||
public static void cleanUp() throws IOException { | ||
cleanUpDefault(); | ||
} | ||
|
||
@Test | ||
public void resolve() throws IOException { | ||
// when | ||
final Path resolve = new BundledResolver(THROWING_RESOLVER).resolve(Bundler.ESBUILD_EMBEDDED_VERSION); | ||
|
||
assertFalse(Bundler.ESBUILD_EMBEDDED_VERSION.contains("mvnpm")); | ||
|
||
// then | ||
assertTrue(resolve.toFile().exists()); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>io.mvnpm</groupId> | ||
<artifactId>esbuild-java-parent</artifactId> | ||
<version>999-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>esbuild-java-bundle-scss</artifactId> | ||
<name>Esbuild wrapper for Java bundled with mvnpm scss binaries</name> | ||
<packaging>jar</packaging> | ||
<properties> | ||
<esbuild.scss.version>v0.0.8</esbuild.scss.version> | ||
<esbuild.version>0.23.0-mvnpm-0.0.8</esbuild.version> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.mvnpm</groupId> | ||
<artifactId>esbuild-java</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-all</artifactId> | ||
<version>1.3</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>false</filtering> | ||
</resource> | ||
<resource> | ||
<directory>src/main/resources-filtered</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
<plugins> | ||
<plugin> | ||
<groupId>net.revelc.code.formatter</groupId> | ||
<artifactId>formatter-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.revelc.code</groupId> | ||
<artifactId>impsort-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<version>${maven-antrun-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>download</id> | ||
<phase>generate-resources</phase> | ||
<configuration> | ||
<target> | ||
<get dest="src/main/resources" skipexisting="true"> | ||
<url url="https://github.com/mvnpm/esbuild/releases/download/${esbuild.scss.version}/esbuild-darwin-arm64-${esbuild.version}.tgz"/> | ||
<url url="https://github.com/mvnpm/esbuild/releases/download/${esbuild.scss.version}/esbuild-darwin-x64-${esbuild.version}.tgz"/> | ||
<url url="https://github.com/mvnpm/esbuild/releases/download/${esbuild.scss.version}/esbuild-win32-x64-${esbuild.version}.tgz"/> | ||
<url url="https://github.com/mvnpm/esbuild/releases/download/${esbuild.scss.version}/esbuild-win32-ia32-${esbuild.version}.tgz"/> | ||
<url url="https://github.com/mvnpm/esbuild/releases/download/${esbuild.scss.version}/esbuild-linux-arm64-${esbuild.version}.tgz"/> | ||
<url url="https://github.com/mvnpm/esbuild/releases/download/${esbuild.scss.version}/esbuild-linux-x64-${esbuild.version}.tgz"/> | ||
<url url="https://github.com/mvnpm/esbuild/releases/download/${esbuild.scss.version}/esbuild-linux-ia32-${esbuild.version}.tgz"/> | ||
</get> | ||
</target> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
2 changes: 2 additions & 0 deletions
2
bundle-scss/src/main/resources-filtered/esbuild-java-version.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
esbuild.scss.version=${esbuild.scss.version} | ||
esbuild.version=${esbuild.version} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
bundle-scss/src/test/java/io/mvnpm/esbuild/resolve/BundleTester.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.mvnpm.esbuild.resolve; | ||
|
||
import java.io.IOException; | ||
|
||
import io.mvnpm.esbuild.Bundler; | ||
import io.mvnpm.esbuild.util.PathUtils; | ||
|
||
public abstract class BundleTester { | ||
|
||
public static void cleanUp(String version) throws IOException { | ||
PathUtils.deleteRecursive(Resolvers.getLocation(version)); | ||
} | ||
|
||
public static void cleanUpDefault() throws IOException { | ||
cleanUp(Bundler.ESBUILD_EMBEDDED_VERSION); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>io.mvnpm</groupId> | ||
<artifactId>esbuild-java-parent</artifactId> | ||
<version>999-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>esbuild-java</artifactId> | ||
<name>Esbuild wrapper for Java</name> | ||
|
||
<description>Small wrapper around esbuild to be able to use it in Java</description> | ||
<properties> | ||
<esbuild.scss.version>v0.0.8</esbuild.scss.version> | ||
<esbuild.version>0.23.0-mvnpm-0.0.8</esbuild.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.mvnpm</groupId> | ||
<artifactId>importmap</artifactId> | ||
<version>1.0.10</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-compress</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-all</artifactId> | ||
<version>1.3</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>false</filtering> | ||
</resource> | ||
<resource> | ||
<directory>src/main/resources-filtered</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<systemProperties> | ||
<property> | ||
<name>java.util.logging.config.file</name> | ||
<value>src/test/resources/logging.properties</value> | ||
</property> | ||
</systemProperties> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.revelc.code.formatter</groupId> | ||
<artifactId>formatter-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.revelc.code</groupId> | ||
<artifactId>impsort-maven-plugin</artifactId> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
|
||
</project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.