summaryrefslogtreecommitdiffstats
path: root/pom.xml
blob: 526a10f0157bf28bb57313cf01af101343c87821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

   <modelVersion>4.0.0</modelVersion>

   <parent>
      <groupId>org.rhq</groupId>
      <artifactId>rhq-plugins-parent</artifactId>
      <version>1.4.0-SNAPSHOT</version><!-- TODO adjust RHQ version -->
   </parent>

   <groupId>org.rhq</groupId>
   <artifactId>puppet-plugin</artifactId>
   <packaging>jar</packaging>

   <name>RHQ puppet Plugin</name>
   <description>Content push via puppet</description>

   <properties>
      <scm.module.path>TODO</scm.module.path>
      <rhq.version>1.4.0-SNAPSHOT</rhq.version> <!-- TODO adjust, see above too -->
   </properties>

   <build>
      <plugins>
         <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
               <source>1.5</source>
               <target>1.5</target>
            </configuration>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>dev</id>

         <properties>
            <rhq.rootDir>../../..</rhq.rootDir>
            <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
            <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
         </properties>

         <build>
            <plugins>

               <plugin>
                  <artifactId>maven-antrun-plugin</artifactId>
                  <version>1.1</version>
                  <executions>

                     <execution>
                        <id>deploy</id>
                        <phase>compile</phase>
                        <configuration>
                           <tasks>
                              <mkdir dir="${rhq.deploymentDir}" />
                              <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
                              <echo>*** Updating ${deployment.file}...</echo>
                              <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" />
                           </tasks>
                        </configuration>
                        <goals>
                           <goal>run</goal>
                        </goals>
                     </execution>

                     <execution>
                        <id>deploy-jar-meta-inf</id>
                        <phase>package</phase>
                        <configuration>
                           <tasks>
                              <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
                              <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
                              <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
                                 <patternset>
                                    <include name="META-INF/**" />
                                 </patternset>
                              </unjar>
                              <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF"
                                 update="true">
                              </jar>
                           </tasks>
                        </configuration>
                        <goals>
                           <goal>run</goal>
                        </goals>
                     </execution>

                     <execution>
                        <id>undeploy</id>
                        <phase>clean</phase>
                        <configuration>
                           <tasks>
                              <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
                              <echo>*** Deleting ${deployment.file}...</echo>
                              <delete file="${deployment.file}" />
                           </tasks>
                        </configuration>
                        <goals>
                           <goal>run</goal>
                        </goals>
                     </execution>

                  </executions>
               </plugin>

            </plugins>
         </build>

      </profile>
   </profiles>


   <repositories>
      <repository>
         <snapshots>
            <enabled>false</enabled>
         </snapshots>
         <id>jboss</id>
         <name>JBoss Repository</name>
         <url>http://repository.jboss.org/maven2/</url>
      </repository>
      <!-- TODO add your own maven repositories here (if needed) -->
   </repositories>

   <pluginRepositories>
      <pluginRepository>
         <snapshots>
            <enabled>false</enabled>
         </snapshots>
         <id>jboss</id>
         <name>JBoss Plugin Repository</name>
         <url>http://repository.jboss.org/maven2/</url>
      </pluginRepository>
   </pluginRepositories>


   <dependencies>
      <dependency>
         <groupId>commons-logging</groupId>
         <artifactId>commons-logging</artifactId>
         <version>1.1</version>
      </dependency>
      <dependency>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-core-domain</artifactId>
         <version>${rhq.version}</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-core-plugin-api</artifactId>
         <version>${rhq.version}</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-core-native-system</artifactId>
         <version>${rhq.version}</version>
         <scope>provided</scope>
      </dependency>

      <dependency>
         <groupId>org.rhq</groupId>
         <artifactId>rhq-script-plugin</artifactId>
         <version>${rhq.version}</version>
         <scope>provided</scope>
      </dependency>

   </dependencies>
</project>