Search in sources :

Example 1 with DependencyBuilder

use of com.mulesoft.tools.migration.project.model.pom.Dependency.DependencyBuilder in project mule-migration-assistant by mulesoft.

the class FederationPomContributionMigrationStep method execute.

@Override
public void execute(PomModel pomModel, MigrationReport migrationReport) throws RuntimeException {
    new HttpTransformPomContributionMigrationStep().execute(pomModel, migrationReport);
    pomModel.addDependency(new DependencyBuilder().withGroupId(COM_MULESOFT_ANYPOINT_GROUP_ID).withArtifactId(MULE_FEDERATION_EXTENSION_ARTIFACT_ID).withVersion(targetVersion(FEDERATION_EXTENSION_VERSION_PROPERTY)).withClassifier(MULE_PLUGIN_CLASSIFIER).build());
}
Also used : DependencyBuilder(com.mulesoft.tools.migration.project.model.pom.Dependency.DependencyBuilder) HttpTransformPomContributionMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.mule.HttpTransformPomContributionMigrationStep)

Example 2 with DependencyBuilder

use of com.mulesoft.tools.migration.project.model.pom.Dependency.DependencyBuilder in project mule-migration-assistant by mulesoft.

the class SecurityFiltersPomContribution method execute.

@Override
public void execute(PomModel object, MigrationReport report) throws RuntimeException {
    super.execute(object, report);
    object.removeDependency(new DependencyBuilder().withGroupId("com.mulesoft.security").withArtifactId("mule-module-security-filters").withVersion("*").build());
}
Also used : DependencyBuilder(com.mulesoft.tools.migration.project.model.pom.Dependency.DependencyBuilder)

Example 3 with DependencyBuilder

use of com.mulesoft.tools.migration.project.model.pom.Dependency.DependencyBuilder in project mule-migration-assistant by mulesoft.

the class OAuth2PomContribution method execute.

@Override
public void execute(PomModel object, MigrationReport report) throws RuntimeException {
    object.addDependency(new Dependency.DependencyBuilder().withGroupId("com.mulesoft.modules").withArtifactId("mule-oauth2-provider-module").withVersion(targetVersion("mule-oauth2-provider-module")).withClassifier("mule-plugin").build());
    object.removeDependency(new DependencyBuilder().withGroupId("com.mulesoft.security").withArtifactId("mule-module-security-oauth2-provider").withVersion("*").build());
}
Also used : DependencyBuilder(com.mulesoft.tools.migration.project.model.pom.Dependency.DependencyBuilder)

Example 4 with DependencyBuilder

use of com.mulesoft.tools.migration.project.model.pom.Dependency.DependencyBuilder in project mule-migration-assistant by mulesoft.

the class ChecksumPomContribution method execute.

@Override
public void execute(PomModel object, MigrationReport report) throws RuntimeException {
    object.addDependency(new Dependency.DependencyBuilder().withGroupId("com.mulesoft.modules").withArtifactId("mule-cryptography-module").withVersion(targetVersion("mule-cryptography-module")).withClassifier("mule-plugin").build());
    object.removeDependency(new DependencyBuilder().withGroupId("com.mulesoft.security").withArtifactId("mule-module-security-crc32").withVersion("*").build());
}
Also used : DependencyBuilder(com.mulesoft.tools.migration.project.model.pom.Dependency.DependencyBuilder)

Example 5 with DependencyBuilder

use of com.mulesoft.tools.migration.project.model.pom.Dependency.DependencyBuilder in project mule-migration-assistant by mulesoft.

the class AbstractJmsEndpoint method addActiveMqConnection.

private static Element addActiveMqConnection(final Element m4JmsConfig, final Element m3Connector, ApplicationModel appModel) {
    Dependency activeMqClient = new DependencyBuilder().withGroupId("org.apache.activemq").withArtifactId("activemq-client").withVersion("${activeMq.version}").build();
    addSharedLibs(appModel.getPomModel().get(), activeMqClient);
    Element amqConnection = new Element("active-mq-connection", JMS_NAMESPACE);
    m4JmsConfig.addContent(amqConnection);
    boolean addFactory = false;
    Element factoryConfiguration = new Element("factory-configuration", JMS_NAMESPACE);
    if (m3Connector.getAttribute("brokerURL") != null) {
        factoryConfiguration.setAttribute("brokerUrl", m3Connector.getAttributeValue("brokerURL"));
        addFactory = true;
    }
    if (m3Connector.getAttributeValue("maxRedelivery") != null) {
        factoryConfiguration.setAttribute("maxRedelivery", m3Connector.getAttributeValue("maxRedelivery"));
        addFactory = true;
    }
    if (addFactory) {
        amqConnection.addContent(factoryConfiguration);
    }
    return amqConnection;
}
Also used : DependencyBuilder(com.mulesoft.tools.migration.project.model.pom.Dependency.DependencyBuilder) XmlDslUtils.addTopLevelElement(com.mulesoft.tools.migration.step.util.XmlDslUtils.addTopLevelElement) Element(org.jdom2.Element) Dependency(com.mulesoft.tools.migration.project.model.pom.Dependency)

Aggregations

DependencyBuilder (com.mulesoft.tools.migration.project.model.pom.Dependency.DependencyBuilder)10 Dependency (com.mulesoft.tools.migration.project.model.pom.Dependency)2 MigrationAbortException (com.mulesoft.tools.migration.exception.MigrationAbortException)1 HttpTransformPomContributionMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.mule.HttpTransformPomContributionMigrationStep)1 Plugin (com.mulesoft.tools.migration.project.model.pom.Plugin)1 XmlDslUtils.addTopLevelElement (com.mulesoft.tools.migration.step.util.XmlDslUtils.addTopLevelElement)1 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 Properties (java.util.Properties)1 Element (org.jdom2.Element)1