Skip to content

Commit 32051f6

Browse files
committed
Always building distributable zip file, even when release profile is not specified
1 parent 027dc25 commit 32051f6

File tree

2 files changed

+63
-80
lines changed

2 files changed

+63
-80
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,9 @@ The BrowserMobProxyServer implementation uses native DNS resolution by default,
398398

399399
## Building the latest from source
400400

401-
You'll need maven (`brew install maven` if you're on OS X); use the `release` profile to generate the batch files from this repository.
401+
You'll need maven (`brew install maven` if you're on OS X):
402402

403-
[~]$ mvn -DskipTests -P release
403+
[~]$ mvn -DskipTests
404404

405405
You'll find the standalone BrowserMob Proxy distributable zip at `browsermob-dist/target/browsermob-proxy-2.1.3-SNAPSHOT-bin.zip`. Unzip the contents and run the `browsermob-proxy` or `browsermob-proxy.bat` files in the `bin` directory.
406406

browsermob-dist/pom.xml

Lines changed: 61 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<parent>
45
<artifactId>browsermob-proxy</artifactId>
56
<groupId>net.lightbody.bmp</groupId>
@@ -77,93 +78,75 @@
7778
<build>
7879
<defaultGoal>package</defaultGoal>
7980
<plugins>
80-
<!-- Don't create an empty browsermob-proxy-dist jar file unless we are releasing -->
81+
<!-- Don't install the executable jar in the maven repo -->
8182
<plugin>
8283
<groupId>org.apache.maven.plugins</groupId>
83-
<artifactId>maven-jar-plugin</artifactId>
84+
<artifactId>maven-install-plugin</artifactId>
8485
<configuration>
85-
<skipIfEmpty>true</skipIfEmpty>
86+
<skip>true</skip>
8687
</configuration>
8788
</plugin>
88-
<!-- Don't install the executable jar in the maven repo -->
89+
<!-- Always create the jar file when releasing, to avoid problems with the shade plugin trying to re-shade a shaded jar -->
8990
<plugin>
9091
<groupId>org.apache.maven.plugins</groupId>
91-
<artifactId>maven-install-plugin</artifactId>
92+
<artifactId>maven-jar-plugin</artifactId>
93+
<version>${maven-jar-plugin.version}</version>
9294
<configuration>
93-
<skip>true</skip>
95+
<forceCreation>true</forceCreation>
96+
<skipIfEmpty>false</skipIfEmpty>
9497
</configuration>
9598
</plugin>
96-
97-
</plugins>
98-
</build>
99-
100-
<profiles>
101-
<profile>
102-
<id>release</id>
103-
<build>
104-
<plugins>
105-
<!-- Always create the jar file when releasing, to avoid problems with the shade plugin trying to re-shade a shaded jar -->
106-
<plugin>
107-
<groupId>org.apache.maven.plugins</groupId>
108-
<artifactId>maven-jar-plugin</artifactId>
109-
<version>${maven-jar-plugin.version}</version>
99+
<plugin>
100+
<groupId>org.apache.maven.plugins</groupId>
101+
<artifactId>maven-shade-plugin</artifactId>
102+
<version>2.4.3</version>
103+
<executions>
104+
<execution>
105+
<phase>package</phase>
106+
<goals>
107+
<goal>shade</goal>
108+
</goals>
109+
<configuration>
110+
<filters>
111+
<filter>
112+
<artifact>*:*</artifact>
113+
<excludes>
114+
<exclude>META-INF/*.SF</exclude>
115+
<exclude>META-INF/*.DSA</exclude>
116+
<exclude>META-INF/*.RSA</exclude>
117+
</excludes>
118+
</filter>
119+
</filters>
120+
<transformers>
121+
<transformer
122+
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
123+
<mainClass>net.lightbody.bmp.proxy.Main</mainClass>
124+
</transformer>
125+
</transformers>
126+
<shadedArtifactAttached>false</shadedArtifactAttached>
127+
</configuration>
128+
</execution>
129+
</executions>
130+
</plugin>
131+
<plugin>
132+
<artifactId>maven-assembly-plugin</artifactId>
133+
<version>3.0.0</version>
134+
<executions>
135+
<execution>
136+
<id>make-bundles</id>
137+
<goals>
138+
<goal>single</goal>
139+
</goals>
140+
<phase>package</phase>
110141
<configuration>
111-
<forceCreation>true</forceCreation>
112-
<skipIfEmpty>false</skipIfEmpty>
142+
<descriptors>
143+
<descriptor>assembly.xml</descriptor>
144+
</descriptors>
145+
<finalName>${zip.name}</finalName>
113146
</configuration>
114-
</plugin>
115-
<plugin>
116-
<groupId>org.apache.maven.plugins</groupId>
117-
<artifactId>maven-shade-plugin</artifactId>
118-
<version>2.4.3</version>
119-
<executions>
120-
<execution>
121-
<phase>package</phase>
122-
<goals>
123-
<goal>shade</goal>
124-
</goals>
125-
<configuration>
126-
<filters>
127-
<filter>
128-
<artifact>*:*</artifact>
129-
<excludes>
130-
<exclude>META-INF/*.SF</exclude>
131-
<exclude>META-INF/*.DSA</exclude>
132-
<exclude>META-INF/*.RSA</exclude>
133-
</excludes>
134-
</filter>
135-
</filters>
136-
<transformers>
137-
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
138-
<mainClass>net.lightbody.bmp.proxy.Main</mainClass>
139-
</transformer>
140-
</transformers>
141-
<shadedArtifactAttached>false</shadedArtifactAttached>
142-
</configuration>
143-
</execution>
144-
</executions>
145-
</plugin>
146-
<plugin>
147-
<artifactId>maven-assembly-plugin</artifactId>
148-
<version>3.0.0</version>
149-
<executions>
150-
<execution>
151-
<id>make-bundles</id>
152-
<goals>
153-
<goal>single</goal>
154-
</goals>
155-
<phase>package</phase>
156-
<configuration>
157-
<descriptors>
158-
<descriptor>assembly.xml</descriptor>
159-
</descriptors>
160-
<finalName>${zip.name}</finalName>
161-
</configuration>
162-
</execution>
163-
</executions>
164-
</plugin>
165-
</plugins>
166-
</build>
167-
</profile>
168-
</profiles>
147+
</execution>
148+
</executions>
149+
</plugin>
150+
</plugins>
151+
</build>
169152
</project>

0 commit comments

Comments
 (0)