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-10624020: MMP-596: NoClassDefFoundError when compiling smart connectors. (#1163) #1218

Open
wants to merge 1 commit into
base: support/4.5.x
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@

import java.io.File;
import java.nio.file.Paths;
import java.util.Properties;

import io.qameta.allure.Description;
import io.qameta.allure.Feature;
import io.qameta.allure.Features;
import io.qameta.allure.Stories;
import io.qameta.allure.Story;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;

Expand All @@ -40,11 +43,18 @@ public class DomainTestCase extends AbstractEmbeddedTestCase {
@Rule
public DynamicPort dynamicPort = new DynamicPort("httpPort");

@Before
public void installSmartConnectorUsingCore() {
BundleDescriptor connectorBundleDescriptor = getExtensionBundleDescriptor("smart-connector-using-core");
final Properties props = new Properties();
// Skip the enforcer to allow using SNAPSHOT versions of the extensions-maven-plugin
props.put("enforcer.skip", "true");
installMavenArtifact(getExtensionFolder("smart-connector-using-core"), connectorBundleDescriptor, props);
}

@Description("Embedded deploys a domain and an application associated to that domain")
@Test
public void domainWithHttpConnector() throws Exception {
BundleDescriptor connectorBundleDescriptor = getExtensionBundleDescriptor("smart-connector-using-core");
installMavenArtifact(getExtensionFolder("smart-connector-using-core"), connectorBundleDescriptor);
BundleDescriptor domainBundleDescriptor = getDomainBundleDescriptor("simple-domain");
doWithinDomain(domainBundleDescriptor, getDomainFolder("simple-domain"), port -> {
BundleDescriptor appBundleDescriptor = getApplicationBundleDescriptor("http-echo-domain-app", empty());
Expand All @@ -58,8 +68,6 @@ public void domainWithHttpConnector() throws Exception {
@Description("Embedded deploys a domain and an associated application that contains an xml sdk operation")
@Test
public void domainWithXmlSdkConfig() throws Exception {
BundleDescriptor connectorBundleDescriptor = getExtensionBundleDescriptor("smart-connector-using-core");
installMavenArtifact(getExtensionFolder("smart-connector-using-core"), connectorBundleDescriptor);
BundleDescriptor domainBundleDescriptor = getDomainBundleDescriptor("simple-domain");
doWithinDomain(domainBundleDescriptor, getDomainFolder("simple-domain"), port -> {
BundleDescriptor appBundleDescriptor = getApplicationBundleDescriptor("xml-sdk-domain-app", empty());
Expand All @@ -76,8 +84,6 @@ public void deployUndeployDomain() throws Exception {
runWithContainer(container -> {
try {
testWithSystemProperty("httpPort", dynamicPort.getValue(), () -> {
BundleDescriptor connectorBundleDescriptor = getExtensionBundleDescriptor("smart-connector-using-core");
installMavenArtifact(getExtensionFolder("smart-connector-using-core"), connectorBundleDescriptor);
BundleDescriptor domainBundleDescriptor = getDomainBundleDescriptor("simple-domain");
File domainFile = installMavenArtifact(getDomainFolder("simple-domain"), domainBundleDescriptor);
container.getDeploymentService().deployDomain(ArtifactConfiguration.builder().artifactLocation(domainFile).build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.mule.extensions</groupId>
<artifactId>mule-modules-parent</artifactId>
<version>1.3.1</version>
<version>1.6.0-SNAPSHOT</version>
</parent>

<version>1.0.0</version>
Expand All @@ -19,17 +19,4 @@
<formatterConfigPath>../../formatter.xml</formatterConfigPath>
</properties>

<build>
<plugins>
<plugin>
<!-- BUILD PLUGIN FOR JAVA_AND_SMART_CONNECTORS -->
<groupId>org.mule.runtime.plugins</groupId>
<artifactId>mule-extensions-maven-plugin</artifactId>
<!-- Change back to latest snapshot MMP-596 once is fixed -->
<version>1.4.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>

</project>