Skip to content

Commit 751d391

Browse files
committed
build kvm-agent.zip
1 parent 25dd8de commit 751d391

2 files changed

Lines changed: 120 additions & 0 deletions

File tree

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
20+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
22+
<id>kvm-agent</id>
23+
<formats>
24+
<format>zip</format>
25+
</formats>
26+
<includeBaseDirectory>yes</includeBaseDirectory>
27+
<dependencySets>
28+
<dependencySet>
29+
<outputDirectory></outputDirectory>
30+
<useProjectArtifact/>
31+
</dependencySet>
32+
</dependencySets>
33+
<fileSets>
34+
<fileSet>
35+
<directory>../../../agent/scripts</directory>
36+
<outputDirectory></outputDirectory>
37+
<fileMode>774</fileMode>
38+
<includes>
39+
<include>run.sh</include>
40+
<include>_run.sh</include>
41+
<include>agent.sh</include>
42+
</includes>
43+
</fileSet>
44+
<fileSet>
45+
<directory>target</directory>
46+
<outputDirectory></outputDirectory>
47+
<fileMode>555</fileMode>
48+
<includes>
49+
<include>cloud-plugin-hypervisor-kvm-*.jar</include>
50+
</includes>
51+
</fileSet>
52+
<fileSet>
53+
<directory>../../../scripts</directory>
54+
<outputDirectory>scripts</outputDirectory>
55+
<fileMode>555</fileMode>
56+
</fileSet>
57+
<fileSet>
58+
<directory>../../../agent/conf</directory>
59+
<outputDirectory>conf</outputDirectory>
60+
<directoryMode>555</directoryMode>
61+
<fileMode>774</fileMode>
62+
<includes>
63+
<include>agent.properties</include>
64+
<include>log4j-cloud.xml</include>
65+
</includes>
66+
</fileSet>
67+
</fileSets>
68+
</assembly>

‎plugins/hypervisors/kvm/pom.xml‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,56 @@
4444
<version>0.4.9</version>
4545
</dependency>
4646
</dependencies>
47+
<build>
48+
<defaultGoal>install</defaultGoal>
49+
<sourceDirectory>src</sourceDirectory>
50+
<testSourceDirectory>test</testSourceDirectory>
51+
<plugins>
52+
<plugin>
53+
<artifactId>maven-assembly-plugin</artifactId>
54+
<version>2.3</version>
55+
<configuration>
56+
<finalName>kvm-agent</finalName>
57+
<appendAssemblyId>false</appendAssemblyId>
58+
<descriptors>
59+
<descriptor>agent-descriptor.xml</descriptor>
60+
</descriptors>
61+
</configuration>
62+
<executions>
63+
<execution>
64+
<id>make-agent</id>
65+
<phase>package</phase>
66+
<goals>
67+
<goal>single</goal>
68+
</goals>
69+
</execution>
70+
</executions>
71+
</plugin>
72+
<plugin>
73+
<artifactId>maven-resources-plugin</artifactId>
74+
<version>2.6</version>
75+
<executions>
76+
<execution>
77+
<id>copy-resources</id>
78+
<!-- here the phase you need -->
79+
<phase>package</phase>
80+
<goals>
81+
<goal>copy-resources</goal>
82+
</goals>
83+
<configuration>
84+
<outputDirectory>dist</outputDirectory>
85+
<resources>
86+
<resource>
87+
<directory>target</directory>
88+
<includes>
89+
<include>kvm-agent.zip</include>
90+
</includes>
91+
</resource>
92+
</resources>
93+
</configuration>
94+
</execution>
95+
</executions>
96+
</plugin>
97+
</plugins>
98+
</build>
4799
</project>

0 commit comments

Comments
 (0)