File: pom.xml

package info (click to toggle)
umlet 15.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 10,636 kB
  • sloc: javascript: 58,367; java: 45,636; xml: 2,049; makefile: 9; sh: 9
file content (203 lines) | stat: -rw-r--r-- 7,074 bytes parent folder | download | duplicates (2)
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>com.umlet</groupId>
		<artifactId>umlet-parent</artifactId>
		<version>15.1</version>
	</parent>

	<artifactId>com.umlet.plugin</artifactId>
	<packaging>eclipse-plugin</packaging>

	<repositories>
		<repository>
			<id>eclipse-mars</id>
			<url>http://download.eclipse.org/releases/mars</url> <!-- update to e.g. photon works but only with tyco v2.3.0 (which requires java11) otherwise animal-sniffer-plugin fails -->
			<layout>p2</layout>
		</repository>
	</repositories>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<!-- unpack all dependencies from umlet-eclipse-plugin-deps and umlet-res -->
					<execution>
						<id>unpack</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.basedir}</outputDirectory>
							<stripVersion>true</stripVersion>
							<excludes>META-INF/**</excludes>
							<artifactItems>
								<artifactItem>
									<groupId>com.umlet</groupId>
									<artifactId>umlet-eclipse-plugin-deps</artifactId>
									<version>${project.version}</version>
								</artifactItem>
								<artifactItem>
									<groupId>com.umlet</groupId>
									<artifactId>umlet-res</artifactId>
									<version>${project.version}</version>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<!-- update Bundle-Version of MANIFEST.MF with current pom.xml version (replace the -<qualifier> with ".qualifier" to be compatible with OSGI versioning; ".qualifier" will be replaced by tycho with a timestamp, other qualifier values are not supported) -->
					<execution>
						<id>updateManifestVersion</id>
						<!-- this goal must be called explicitly at the same time the mvn version is updated (otherwise tycho would still use the old version) -->
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<property name="newVersionTemp" value="${newVersion}" />
								<loadresource property="newVersionOsgi">
									<propertyresource name="newVersionTemp" />
									<filterchain>
										<tokenfilter>
											<replaceregex pattern="-.*" replace=".qualifier" />
										</tokenfilter>
									</filterchain>
								</loadresource>
								<manifest file="${project.build.directory}/../META-INF/MANIFEST.MF" mode="update">
									<attribute name="Bundle-Version" value="${newVersionOsgi}" />
								</manifest>
								<echo message="Updated MANIFEST.MF Bundle-Version to ${newVersionOsgi} (derived from VM Argument: ${newVersion})" />
							</target>
						</configuration>
					</execution>
					<!-- update Bundle-ClassPath of MANIFEST.MF with all libraries -->
					<execution>
						<id>updateManifestClasspath</id>
						<phase>process-resources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<loadfile property="bundle.classpath" srcFile="${project.basedir}/classPath.txt" />
								<echo message="Updating MANIFEST Bundle-ClassPath to: ${bundle.classpath}" />
								<manifest file="${project.build.directory}/../META-INF/MANIFEST.MF" mode="update">
									<attribute name="Bundle-ClassPath" value=".,${bundle.classpath}" />
								</manifest>
								<delete file="${project.basedir}/classPath.txt" />
								<echo message="Updated MANIFEST.MF Bundle-ClassPath to content of lib directory and deleted classPath.txt file" />
							</target>
						</configuration>
					</execution>
					<!-- move umlet-elements and umlet-swing to target/classes (because in Eclipse they are source dirs, the jars are only necessary for the build) -->
					<execution>
						<id>move-umlet-jars</id>
						<phase>process-resources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<move file="${project.basedir}/lib/umlet-elements.jar" todir="${project.build.outputDirectory}/lib" />
								<move file="${project.basedir}/lib/umlet-swing.jar" todir="${project.build.outputDirectory}/lib" />
								<echo message="Moved jar files of linked src folders to ${project.build.outputDirectory}/lib" />
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-maven-plugin</artifactId>
				<version>${tycho.version}</version>
				<extensions>true</extensions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-compiler-plugin</artifactId>
				<version>${tycho.version}</version>
				<configuration>
					<extraClasspathElements>
						<extraClasspathElement>
							<groupId>com.umlet</groupId>
							<artifactId>umlet-swing</artifactId>
							<version>${project.version}</version>
						</extraClasspathElement>
					</extraClasspathElements>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>target-platform-configuration</artifactId>
				<version>${tycho.version}</version>
				<configuration>
					<environments>
						<environment>
							<os>linux</os>
							<ws>gtk</ws>
							<arch>x86</arch>
						</environment>
						<environment>
							<os>linux</os>
							<ws>gtk</ws>
							<arch>x86_64</arch>
						</environment>
						<environment>
							<os>win32</os>
							<ws>win32</ws>
							<arch>x86</arch>
						</environment>
						<environment>
							<os>win32</os>
							<ws>win32</ws>
							<arch>x86_64</arch>
						</environment>
						<environment>
							<os>macosx</os>
							<ws>cocoa</ws>
							<arch>x86_64</arch>
						</environment>
					</environments>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-clean-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<filesets>
						<fileset>
							<directory>${basedir}</directory>
							<includes>
								<include>lib/**/*</include>
								<include>custom_elements/**/*</include>
								<include>palettes/**/*</include>
							</includes>
							<followSymlinks>false</followSymlinks>
						</fileset>
					</filesets>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!-- disable version checking because the ant script with the id updateManifestVersion will replace the version correctly -->
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-packaging-plugin</artifactId>
					<version>${tycho.version}</version>
					<configuration>
						<strictVersions>false</strictVersions>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>