#36 pom.xml에 karaf bundle uninstall/bundle install/setStartLevel 를 처리하기 위해 설정
star
Tasks
pom.xml#
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<inherited>false</inherited>
<executions>
<execution>
<id>bundle-uninstall</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>curl</executable>
<arguments>
<argument>-H</argument>
<argument>Authorization: Basic {여기에 user/pass base64}</argument>
<argument>-H</argument>
<argument>Content-Type: application/json</argument>
<argument>-X</argument>
<argument>POST</argument>
<argument>-d</argument>
<argument>[
{
"type" :"EXEC",
"mbean": "org.apache.karaf:name=root,type=bundle",
"operation" :"uninstall(java.lang.String)",
"arguments" : ["${project.artifactId}"]
}
]
</argument>
<argument>
http://localhost:8181/jolokia
</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>bundle-install</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>curl</executable>
<arguments>
<argument>-H</argument>
<argument>Authorization: Basic {여기에 user/pass base64}</argument>
<argument>-H</argument>
<argument>Content-Type: application/json</argument>
<argument>-X</argument>
<argument>POST</argument>
<argument>-d</argument>
<argument>[
{
"type" :"EXEC",
"mbean": "org.apache.karaf:name=root,type=bundle",
"operation" :"install(java.lang.String, boolean)",
"arguments" : ["mvn:${project.groupId}/${project.artifactId}/${project.version}", "true"]
}
]
</argument>
<argument>
http://localhost:8181/jolokia
</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>bundle-level</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>curl</executable>
<arguments>
<argument>-H</argument>
<argument>Authorization: Basic {여기에 user/pass base64}</argument>
<argument>-H</argument>
<argument>Content-Type: application/json</argument>
<argument>-X</argument>
<argument>POST</argument>
<argument>-d</argument>
<argument>[
{
"type" :"EXEC",
"mbean": "org.apache.karaf:name=root,type=bundle",
"operation" :"setStartLevel(java.lang.String, int)",
"arguments" : ["${project.artifactId}", 95]
}
]
</argument>
<argument>
http://localhost:8181/jolokia
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
Comment 0
Add a comment
Comment 0