This repository has been archived by the owner on May 16, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpom.xml
172 lines (165 loc) · 8.27 KB
/
pom.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>org.jboss.helpers</groupId>
<artifactId>settings-xml-creator</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Maven settings.xml creator</name>
<description>A helper utility which allows you to extract EAP6 and WFK2 Maven repository from zip files and creates a local
settings.xml files which has these repositories activated.</description>
<properties>
<eap6.enterprise.repository.zip>${basedir}/jboss-eap-6.0.0.DR10-maven-repository.zip</eap6.enterprise.repository.zip>
<wfk2.enterprise.repository.zip>${basedir}/jboss-wfk-2.0.0-DR07-repository.zip</wfk2.enterprise.repository.zip>
<eap6.enterprise.repository.dir>${basedir}/jboss-eap-6.0.0.DR10-maven-repository</eap6.enterprise.repository.dir>
<wfk2.enterprise.repository.dir>${basedir}/jboss-wfk-2.0.0-DR07-repository</wfk2.enterprise.repository.dir>
</properties>
<dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>generate-maven-settings</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<escapeWindowsPaths>true</escapeWindowsPaths>
<outputDirectory>${basedir}/../</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${basedir}/src/main/resources/</directory>
<filtering>true</filtering>
<includes>
<include>**/settings.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>repository-zip-exist</id>
<phase>validate</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireFilesExist>
<files>
<file>${eap6.enterprise.repository.zip}</file>
</files>
<message>EAP6 Enterprise Repository Zip must exist. Please download the file first.</message>
</requireFilesExist>
<requireFilesExist>
<files>
<file>${wfk2.enterprise.repository.zip}</file>
</files>
<message>WFK2 Enterprise Repository Zip must exist. Please download the file first.</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
<execution>
<id>repository-dirs-exist</id>
<phase>process-resources</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireFilesExist>
<files>
<file>${eap6.enterprise.repository.dir}</file>
</files>
<message>EAP6 Enterprise Repository must exist. Please unzip the file first.</message>
</requireFilesExist>
<requireFilesExist>
<files>
<file>${wfk2.enterprise.repository.dir}</file>
</files>
<message>WFK2 Enterprise Repository must exist. Please unzip the file first</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>remove-wfk-repository</id>
<phase>clean</phase>
<configuration>
<target name="remove-wfk-repository">
<echo>Removing WFK 2 Enterprise Maven Repository from ${wfk2.enterprise.repository.dir}</echo>
<delete dir="${wfk2.enterprise.repository.dir}" quiet="true" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>remove-eap-repository</id>
<phase>clean</phase>
<configuration>
<target name="remove-eap-repository">
<echo>Removing EAP 6 Enterprise Maven Repository at ${eap6.enterprise.repository.dir}</echo>
<delete dir="${eap6.enterprise.repository.dir}" quiet="true" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>unzip-wfk-artifacts</id>
<phase>generate-resources</phase>
<configuration>
<target name="unzip-wfk-repository">
<echo>Unzipping WFK 2 Enterprise Maven Repository into ${basedir}</echo>
<unzip src="${wfk2.enterprise.repository.zip}" dest="${basedir}" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>unzip-eap-artifacts</id>
<phase>generate-resources</phase>
<configuration>
<target name="unzip-eap-repository">
<echo>Extracting EAP 6 Enterprise Maven Repository into ${basedir}</echo>
<unzip src="${eap6.enterprise.repository.zip}" dest="${basedir}" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>