wso2 / maven-tools

Apache License 2.0
44 stars 58 forks source link

maven-car-deploy-plugin did not deploy #50

Open zarulizham opened 4 years ago

zarulizham commented 4 years ago

Description: I am working on ESB Project. I am using VS Code and Maven for deploy. My aim to automate the deployment of .CAR file into Carbon Server. I've added these code in pom.xml. But when I run mvn clean deploy, it seems the the .CAR file is not pushed into the Carbon Server.

I am expecting the CAR file should be in %CARBON_HOME%\repository\deployment\server\carbonapps. Am I right?

Below is my pom.xml file

`

4.0.0
<groupId>com.example.tutorial</groupId>
<artifactId>tutorial</artifactId>
<version>1.0-SNAPSHOT</version>
<name>WSO2 EI - ESB Project</name>

<properties>
    <maven.car.deploy.skip>false</maven.car.deploy.skip>
    <maven.deploy.skip>false</maven.deploy.skip>
</properties>

<pluginRepositories>
    <pluginRepository>
        <id>wso2.releases</id>
        <name>WSO2 internal Repository</name>
        <url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
        <releases>
            <enabled>true</enabled>
            <updatePolicy>daily</updatePolicy>
            <checksumPolicy>ignore</checksumPolicy>
        </releases>
    </pluginRepository>
    <pluginRepository>
        <id>wso2.snapshots</id>
        <name>Apache Snapshot Repository</name>
        <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>daily</updatePolicy>
        </snapshots>
        <releases>
            <enabled>false</enabled>
        </releases>
    </pluginRepository>
    <pluginRepository>
        <id>wso2-nexus</id>
        <name>WSO2 internal Repository</name>
        <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
        <releases>
            <enabled>true</enabled>
            <updatePolicy>daily</updatePolicy>
            <checksumPolicy>ignore</checksumPolicy>
        </releases>
    </pluginRepository>

</pluginRepositories>

<build>
    <directory>target/capp</directory>
    <plugins>
        <plugin>
            <groupId>org.wso2.maven</groupId>
            <artifactId>vscode-car-plugin</artifactId>
            <version>5.2.6</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>car</goal>
                    </goals>
                </execution>
            </executions>
            <configuration />
        </plugin>
        <plugin>
            <groupId>org.wso2.maven</groupId>
            <artifactId>maven-car-deploy-plugin</artifactId>
            <version>5.2.10</version>
            <extensions>true</extensions>
            <configuration>
                <carbonServers>
                    <CarbonServer>
                        <trustStorePath>C:\Program Files\WSO2\Enterprise Integrator\6.5.0\repository\resources\security\wso2carbon.jks</trustStorePath>
                        <trustStorePassword>wso2carbon</trustStorePassword>
                        <trustStoreType>JKS</trustStoreType>
                        <serverUrl>https://localhost:9443</serverUrl>
                        <userName>admin</userName>
                        <password>admin</password>
                        <operation>deploy</operation>
                    </CarbonServer>
                </carbonServers>
            </configuration>
        </plugin>
    </plugins>
</build>
<reporting>
    <outputDirectory>${project.basedir}/target/capp/site</outputDirectory>
</reporting>

<distributionManagement>
    <repository>
      <id>internal.repo</id>
      <name>Internal repo</name>
      <url>file:///C:/Program Files/WSO2/Enterprise Integrator/6.5.0/repository/deployment/server/carbonapps</url>
    </repository>
</distributionManagement>

`

Suggested Labels: help

My PC Environment:

nesokreso commented 3 years ago

You should add a goal before the configuration part:

` ...

org.wso2.maven maven-car-deploy-plugin ${maven.car.deploy.plugin.version}

deploy-car

${esb.server.trustStorePath} ${esb.server.trustStorePassword} ${esb.server.trustStoreType} ${esb.server.MgmtUrl} ${esb.server.MgmtUserName} ${esb.server.MgmtPassword} ${operation} ... `