Skip to content

Commit 6a3a799

Browse files
committed
Allows build pom to be installed without running it.
1 parent 7483278 commit 6a3a799

1 file changed

Lines changed: 112 additions & 94 deletions

File tree

flapi-build-project/pom.xml

Lines changed: 112 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -15,106 +15,124 @@
1515
<flapi.descriptor.method>changeMe</flapi.descriptor.method>
1616
</properties>
1717

18-
<build>
19-
<plugins>
18+
<profiles>
19+
<profile>
20+
<id>normal</id>
21+
<activation>
22+
<property>
23+
<name>!installOnly</name>
24+
</property>
25+
</activation>
26+
<build>
27+
<plugins>
2028

21-
<!-- Flapi plugin -->
22-
<plugin>
23-
<groupId>unquietcode.tools.flapi</groupId>
24-
<artifactId>flapi-build-plugin</artifactId>
25-
<version>${project.version}</version>
26-
<executions>
27-
<execution>
28-
<goals>
29-
<goal>generate</goal>
30-
</goals>
31-
<configuration>
32-
<descriptorClass>${flapi.descriptor.class}</descriptorClass>
33-
<descriptorMethod>${flapi.descriptor.method}</descriptorMethod>
34-
<sourcesDirectory>${flapi.generated.sources}</sourcesDirectory>
35-
</configuration>
36-
</execution>
37-
</executions>
38-
</plugin>
29+
<!-- Flapi plugin -->
30+
<plugin>
31+
<groupId>unquietcode.tools.flapi</groupId>
32+
<artifactId>flapi-build-plugin</artifactId>
33+
<version>${project.version}</version>
34+
<executions>
35+
<execution>
36+
<goals>
37+
<goal>generate</goal>
38+
</goals>
39+
<configuration>
40+
<descriptorClass>${flapi.descriptor.class}</descriptorClass>
41+
<descriptorMethod>${flapi.descriptor.method}</descriptorMethod>
42+
<sourcesDirectory>${flapi.generated.sources}</sourcesDirectory>
43+
</configuration>
44+
</execution>
45+
</executions>
46+
</plugin>
3947

40-
<!-- create a source jar at the end -->
41-
<plugin>
42-
<groupId>org.apache.maven.plugins</groupId>
43-
<artifactId>maven-source-plugin</artifactId>
44-
<version>2.1.2</version>
45-
<executions>
46-
<execution>
47-
<goals>
48-
<goal>jar</goal>
49-
</goals>
50-
<phase>package</phase>
51-
</execution>
52-
</executions>
53-
</plugin>
48+
<!-- create a source jar at the end -->
49+
<plugin>
50+
<groupId>org.apache.maven.plugins</groupId>
51+
<artifactId>maven-source-plugin</artifactId>
52+
<version>2.1.2</version>
53+
<executions>
54+
<execution>
55+
<goals>
56+
<goal>jar</goal>
57+
</goals>
58+
<phase>package</phase>
59+
</execution>
60+
</executions>
61+
</plugin>
5462

55-
<!-- create a javadoc jar at the end -->
56-
<plugin>
57-
<groupId>org.apache.maven.plugins</groupId>
58-
<artifactId>maven-javadoc-plugin</artifactId>
59-
<version>2.8.1</version>
60-
<executions>
61-
<execution>
62-
<goals>
63-
<goal>jar</goal>
64-
</goals>
65-
<phase>package</phase>
66-
</execution>
67-
</executions>
68-
</plugin>
63+
<!-- create a javadoc jar at the end -->
64+
<plugin>
65+
<groupId>org.apache.maven.plugins</groupId>
66+
<artifactId>maven-javadoc-plugin</artifactId>
67+
<version>2.8.1</version>
68+
<executions>
69+
<execution>
70+
<goals>
71+
<goal>jar</goal>
72+
</goals>
73+
<phase>package</phase>
74+
</execution>
75+
</executions>
76+
</plugin>
6977

70-
<!-- add generated sources directory -->
71-
<plugin>
72-
<groupId>org.codehaus.mojo</groupId>
73-
<artifactId>build-helper-maven-plugin</artifactId>
74-
<version>1.7</version>
75-
<executions>
76-
<execution>
77-
<id>add-sources</id>
78-
<goals><goal>add-source</goal></goals>
79-
<phase>generate-test-sources</phase>
78+
<!-- add generated sources directory -->
79+
<plugin>
80+
<groupId>org.codehaus.mojo</groupId>
81+
<artifactId>build-helper-maven-plugin</artifactId>
82+
<version>1.7</version>
83+
<executions>
84+
<execution>
85+
<id>add-sources</id>
86+
<goals>
87+
<goal>add-source</goal>
88+
</goals>
89+
<phase>generate-test-sources</phase>
90+
<configuration>
91+
<sources>
92+
<source>${flapi.generated.sources}</source>
93+
</sources>
94+
</configuration>
95+
</execution>
96+
</executions>
97+
</plugin>
98+
99+
<!-- compile normally, then again for generated sources -->
100+
<plugin>
101+
<groupId>org.apache.maven.plugins</groupId>
102+
<artifactId>maven-compiler-plugin</artifactId>
103+
<version>2.5.1</version>
80104
<configuration>
81-
<sources>
82-
<source>${flapi.generated.sources}</source>
83-
</sources>
105+
<source>1.6</source>
106+
<target>1.6</target>
84107
</configuration>
85-
</execution>
86-
</executions>
87-
</plugin>
88-
89-
<!-- compile normally, then again for generated sources -->
90-
<plugin>
91-
<groupId>org.apache.maven.plugins</groupId>
92-
<artifactId>maven-compiler-plugin</artifactId>
93-
<version>2.5.1</version>
94-
<configuration>
95-
<source>1.6</source>
96-
<target>1.6</target>
97-
</configuration>
98-
<executions>
99-
<execution>
100-
<id>normal</id>
101-
<goals><goal>compile</goal></goals>
102-
<phase>compile</phase>
103-
</execution>
104-
<execution>
105-
<id>generated</id>
106-
<goals><goal>compile</goal></goals>
107-
<phase>process-test-sources</phase>
108-
</execution>
109-
<execution>
110-
<id>test</id>
111-
<goals><goal>testCompile</goal></goals>
112-
<phase>test-compile</phase>
113-
</execution>
114-
</executions>
115-
</plugin>
116-
</plugins>
117-
</build>
108+
<executions>
109+
<execution>
110+
<id>normal</id>
111+
<goals>
112+
<goal>compile</goal>
113+
</goals>
114+
<phase>compile</phase>
115+
</execution>
116+
<execution>
117+
<id>generated</id>
118+
<goals>
119+
<goal>compile</goal>
120+
</goals>
121+
<phase>process-test-sources</phase>
122+
</execution>
123+
<execution>
124+
<id>test</id>
125+
<goals>
126+
<goal>testCompile</goal>
127+
</goals>
128+
<phase>test-compile</phase>
129+
</execution>
130+
</executions>
131+
</plugin>
132+
</plugins>
133+
</build>
134+
</profile>
135+
</profiles>
118136

119137
<dependencies>
120138
<dependency>

0 commit comments

Comments
 (0)