-
Notifications
You must be signed in to change notification settings - Fork 283
/
pom.xml
150 lines (145 loc) · 5.81 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
<?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">
<parent>
<artifactId>weld-examples-parent</artifactId>
<groupId>org.jboss.weld.examples</groupId>
<version>6.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.weld.examples.se</groupId>
<artifactId>weld-se-numberguess</artifactId>
<packaging>jar</packaging>
<name>Weld Examples: Numberguess (Java SE)</name>
<url>http://weld.cdi-spec.org</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<distribution>repo</distribution>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
</license>
</licenses>
<properties>
<!-- By default we start with this main class that means a synthetic bean archive will be used w/o discovery -->
<mainClassProperty>org.jboss.weld.environment.se.example.numberguess.Main</mainClassProperty>
</properties>
<dependencies>
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-shaded</artifactId>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/policy</directory>
<filtering>true</filtering>
<targetPath>${basedir}/target</targetPath>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>shaded</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${mainClassProperty}</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>run</id>
<activation>
<property>
<name>run</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<executions>
<execution>
<id>run</id>
<phase>package</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<mainClass>${mainClassProperty}</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Runs Weld SE with Jandex on classpath -->
<profile>
<id>jandex</id>
<dependencies>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
</dependency>
</dependencies>
<properties>
<mainClassProperty>org.jboss.weld.environment.se.StartMain</mainClassProperty>
</properties>
</profile>
<profile>
<id>jandex-index</id>
<build>
<plugins>
<plugin>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>${jandex.version}</version>
<executions>
<execution>
<id>make-index</id>
<goals>
<goal>jandex</goal>
</goals>
<!-- phase is 'process-classes by default' -->
<configuration>
<!-- Nothing needed here for simple cases -->
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
<version>${jandex.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>