Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W-12356154: Singleapp Mode #1227

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions embedded/embedded-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@
<artifactId>zip4j</artifactId>
<version>2.11.3</version>
</dependency>
<dependency>
<groupId>org.mule.runtime</groupId>
<artifactId>mule-runtime-environment-application-server</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
6 changes: 6 additions & 0 deletions embedded/embedded-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mule.runtime</groupId>
<artifactId>mule-runtime-environment-application-server</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
3 changes: 3 additions & 0 deletions standalone/assembly-allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@
/mule-standalone-${productVersion}/lib/mule/mule-metrics-exporter-configuration-api-${productVersion}.jar
/mule-standalone-${productVersion}/lib/mule/mule-metrics-exporter-configuration-impl-${productVersion}.jar
/mule-standalone-${productVersion}/lib/mule/mule-module-observability-${productVersion}.jar
/mule-standalone-${productVersion}/lib/mule/mule-runtime-environment-api-${productVersion}.jar
/mule-standalone-${productVersion}/lib/mule/mule-runtime-environment-application-server-${productVersion}.jar
/mule-standalone-${productVersion}/lib/mule/mule-runtime-environment-single-app-api-${productVersion}.jar

#
# /services
Expand Down
5 changes: 5 additions & 0 deletions standalone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@
<artifactId>mule-module-reboot</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.mule.runtime</groupId>
<artifactId>mule-runtime-environment-application-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.mule.runtime</groupId>
<artifactId>mule-module-tanuki-boot</artifactId>
Expand Down
10 changes: 10 additions & 0 deletions standalone/src/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@
<include>org.mule.runtime:mule-metrics-api</include>
<include>org.mule.runtime:mule-metrics-impl</include>

<!-- Mule Runtime Env Libs -->
<include>org.mule.runtime:mule-runtime-environment-api</include>
<include>org.mule.runtime:mule-runtime-environment-single-app-api</include>
<include>org.mule.runtime:mule-runtime-environment-application-server</include>

<!-- Mule Tracing Libs -->
<include>org.mule.runtime:mule-tracer-api</include>
<include>org.mule.runtime:mule-tracer-exporter-api</include>
Expand Down Expand Up @@ -460,6 +465,11 @@
<exclude>org.mule.runtime:mule-metrics-exporter-configuration-api</exclude>
<exclude>org.mule.runtime:mule-metrics-exporter-configuration-impl</exclude>

<!-- Exclude Runtime Environment Folder -->
<exclude>org.mule.runtime:mule-runtime-environment-api</exclude>
<exclude>org.mule.runtime:mule-runtime-environment-application-server</exclude>
<exclude>org.mule.runtime:mule-runtime-environment-single-app-api</exclude>

<!-- Exclude tracing libraries -->
<exclude>org.mule.runtime:mule-tracer-api</exclude>
<exclude>org.mule.runtime:mule-tracer-exporter-api</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,24 @@ public class DistributionFinder {

private static final String MULE_DISTRIBUTION_PROPERTY = "mule.distribution";

/**
* @return a mule distribution location if one was found.
*/
public static String findDistribution() {
String muleDistribution = getProperty(MULE_DISTRIBUTION_PROPERTY);
if (muleDistribution != null) {
return muleDistribution;
}

return findDistribution("standalone", "standalone");
}

/**
* @return a mule distribution location if one was found.
*/
public static String findDistribution(String muleDistributionDir, String muleDistributionName) {
File distributionTargetFolder =
Paths.get(new File(getProperty("user.dir")).getParent()).resolve("standalone").resolve("target").toFile();
Paths.get(new File(getProperty("user.dir")).getParent()).resolve(muleDistributionDir).resolve("target").toFile();
if (distributionTargetFolder.exists()) {
File[] files = distributionTargetFolder
.listFiles((dir, name) -> name.startsWith("mule-enterprise-standalone-") && name.endsWith(".zip"));
.listFiles((dir, name) -> name.startsWith("mule-enterprise-" + muleDistributionName + "-") && name.endsWith(".zip"));
if (files.length > 0) {
return files[0].getAbsolutePath();
}
Expand Down