forked from ModeShape/modeshape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
177 lines (157 loc) · 10.4 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
173
174
175
176
177
<?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>
<parent>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-parent</artifactId>
<version>5.5-SNAPSHOT</version>
<relativePath>../modeshape-parent/pom.xml</relativePath>
</parent>
<!-- The groupId and version values are inherited from parent -->
<artifactId>modeshape-client</artifactId>
<packaging>pom</packaging>
<name>ModeShape Client Jar</name>
<description>Library that allows ModeShape Tools to interact with ModeShape</description>
<url>http://www.modeshape.org</url>
<profiles>
<profile>
<id>assembly</id>
<properties>
<ant.jdbc.parseDirectory>${project.build.directory}/jdbc_parse</ant.jdbc.parseDirectory>
</properties>
<dependencies>
<dependency>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-jdbc</artifactId>
<version>${project.version}</version>
<classifier>jar-with-dependencies</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<!-- Copy the jdbc jar with dependencies to a temporary location, which will be then processed by ANT -->
<artifactItem>
<groupId>org.modeshape</groupId>
<artifactId>modeshape-jdbc</artifactId>
<version>${project.version}</version>
<classifier>jar-with-dependencies</classifier>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!--
The following ant tasks are used to remove any duplicates from the modeshape-jdbc jar and to merge the
services.
Note: this is all changing in future releases.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>repackage-client-jar</id>
<phase>package</phase>
<configuration>
<target>
<unzip src="${project.build.directory}/modeshape-jdbc-${project.version}-jar-with-dependencies.jar"
dest="${project.build.directory}/tempjars"/>
<unzip src="${project.build.directory}/tempjars/jcr-${version.javax.jcr}.jar"
dest="${ant.jdbc.parseDirectory}"/>
<unzip src="${project.build.directory}/tempjars/commons-codec-1.9.jar"
dest="${ant.jdbc.parseDirectory}"/>
<move file="${ant.jdbc.parseDirectory}/META-INF/LICENSE.txt"
tofile="${ant.jdbc.parseDirectory}/META-INF/LICENSE_commons-codec.txt"/>
<unzip src="${project.build.directory}/tempjars/commons-logging-1.2.jar"
dest="${ant.jdbc.parseDirectory}"/>
<move file="${ant.jdbc.parseDirectory}/META-INF/LICENSE.txt"
tofile="${ant.jdbc.parseDirectory}/META-INF/LICENSE_commons-logging.txt"/>
<move file="${ant.jdbc.parseDirectory}/META-INF/NOTICE.txt"
tofile="${ant.jdbc.parseDirectory}/META-INF/NOTICE_commons-logging.txt"/>
<unzip src="${project.build.directory}/tempjars/httpclient-${version.org.apache.httpcomponents}.jar"
dest="${ant.jdbc.parseDirectory}"/>
<move file="${ant.jdbc.parseDirectory}/META-INF/LICENSE"
tofile="${ant.jdbc.parseDirectory}/META-INF/LICENSE_httpclient.txt"/>
<move file="${ant.jdbc.parseDirectory}/META-INF/NOTICE"
tofile="${ant.jdbc.parseDirectory}/META-INF/NOTICE_httpclient.txt"/>
<unzip src="${project.build.directory}/tempjars/httpcore-${version.org.apache.httpcomponents}.jar"
dest="${ant.jdbc.parseDirectory}"/>
<move file="${ant.jdbc.parseDirectory}/META-INF/LICENSE"
tofile="${ant.jdbc.parseDirectory}/META-INF/LICENSE_httpcore.txt"/>
<move file="${ant.jdbc.parseDirectory}/META-INF/NOTICE"
tofile="${ant.jdbc.parseDirectory}/META-INF/NOTICE_httpcore.txt"/>
<unzip src="${project.build.directory}/tempjars/jettison-${version.org.codehaus.jettison}.jar"
dest="${ant.jdbc.parseDirectory}"/>
<move file="${ant.jdbc.parseDirectory}/META-INF/LICENSE"
tofile="${ant.jdbc.parseDirectory}/META-INF/LICENSE_jettison.txt"/>
<unzip src="${project.build.directory}/tempjars/modeshape-common-${project.version}.jar"
dest="${ant.jdbc.parseDirectory}"/>
<unzip src="${project.build.directory}/tempjars/modeshape-jcr-api-${project.version}.jar"
dest="${ant.jdbc.parseDirectory}"/>
<move file="${project.build.directory}/tempjars/META-INF/services/java.sql.Driver"
tofile="${project.build.directory}/tempdrivers/jdbc_drivers"/>
<unzip src="${project.build.directory}/tempjars/modeshape-jdbc-local-${project.version}.jar"
dest="${ant.jdbc.parseDirectory}"/>
<move file="${ant.jdbc.parseDirectory}/META-INF/services/java.sql.Driver"
tofile="${project.build.directory}/tempdrivers/jdbc_local_drivers"/>
<copy todir="${ant.jdbc.parseDirectory}/org">
<fileset dir="${project.build.directory}/tempjars/org"/>
</copy>
<concat destfile="${ant.jdbc.parseDirectory}/META-INF/services/java.sql.Driver"
fixlastline="yes">
<fileset file="${project.build.directory}/tempdrivers/jdbc_drivers"/>
<fileset file="${project.build.directory}/tempdrivers/jdbc_local_drivers"/>
</concat>
<delete file="${project.build.directory}/modeshape-jdbc-${project.version}-jar-with-dependencies.jar"/>
<delete dir="${project.build.directory}/tempjars"/>
<delete dir="${project.build.directory}/tempproviders"/>
<delete dir="${project.build.directory}/tempdrivers"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<!--Creates & attaches the main jar assembly -->
<execution>
<id>default</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>true</attach>
<descriptors>
<descriptor>src/assembly/kit.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
<attach>true</attach>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>