-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
166 lines (156 loc) · 4.86 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
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.paginagmbh.oxygen</groupId>
<artifactId>clipboardEditorVariable</artifactId>
<version>0.0.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>clipboardEditorVariable</name>
<url>https://github.com/paginagmbh/oxygen-plugin_clipboard-editor-variable</url>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<oxygen.sdk.version>18.1.0.0</oxygen.sdk.version>
</properties>
<dependencies>
<dependency>
<groupId>com.oxygenxml</groupId>
<artifactId>oxygen-sdk</artifactId>
<version>${oxygen.sdk.version}</version>
</dependency>
</dependencies>
<build>
<!-- is used from within the plugin.xml -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- rename JAR file for distribution -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<!-- We only want the final JAR package in the target folder so that
it's easier for users to identify it. -->
<outputDirectory>${project.build.directory}/build</outputDirectory>
<finalName>${project.artifactId}</finalName>
</configuration>
</plugin>
<!-- package all components mentioned in assembly.xml -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archiveBaseDirectory>${project.basedir}</archiveBaseDirectory>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<!-- copy and process plugin.xml to target/ -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>filter-plugin-descriptors</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/build</outputDirectory>
<resources>
<resource>
<directory>${basedir}</directory>
<filtering>true</filtering>
<includes>
<include>plugin.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- If an Oxygen plugins dir is provided we will automatically deploy the plugins in it. -->
<id>auto-install</id>
<activation>
<property>
<name>oxygen.plugins.dir</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<!-- ant-contrib has a dependency on ant-1.5 -->
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<executions>
<execution>
<id>deploy-to-oxygen</id>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath"/>
<!-- checks if build went well and ZIP file was created ... -->
<available property="package.available"
file="target/${project.build.finalName}.zip"/>
<if>
<equals arg1="${package.available}" arg2="true"/>
<then>
<!-- ... then deletes the old plugin version ... -->
<delete
dir="${oxygen.plugins.dir}/${project.build.finalName}"/>
<!-- ... and extracts the new build ZIP -->
<unzip src="target/${project.build.finalName}.zip"
dest="${oxygen.plugins.dir}"/>
</then>
</if>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>