Skip to content

Commit 9cb5bfc

Browse files
committed
Include source JAR (MM.src.jar) in BEAST package ZIP
Move maven-source-plugin from release profile to default build so the sources JAR is produced during mvn package. Add it to the assembly descriptor at the ZIP root, matching the BEAST 2.7 convention.
1 parent 6d74b66 commit 9cb5bfc

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

pom.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,19 @@
168168
</configuration>
169169
</plugin>
170170

171+
<!-- Source JAR (included in BEAST package ZIP as MM.src.jar) -->
172+
<plugin>
173+
<groupId>org.apache.maven.plugins</groupId>
174+
<artifactId>maven-source-plugin</artifactId>
175+
<version>3.3.1</version>
176+
<executions>
177+
<execution>
178+
<id>attach-sources</id>
179+
<goals><goal>jar-no-fork</goal></goals>
180+
</execution>
181+
</executions>
182+
</plugin>
183+
171184
<!-- Assemble BEAST package ZIP -->
172185
<plugin>
173186
<groupId>org.apache.maven.plugins</groupId>
@@ -196,17 +209,6 @@
196209
<id>release</id>
197210
<build>
198211
<plugins>
199-
<plugin>
200-
<groupId>org.apache.maven.plugins</groupId>
201-
<artifactId>maven-source-plugin</artifactId>
202-
<version>3.3.1</version>
203-
<executions>
204-
<execution>
205-
<id>attach-sources</id>
206-
<goals><goal>jar-no-fork</goal></goals>
207-
</execution>
208-
</executions>
209-
</plugin>
210212
<plugin>
211213
<groupId>org.apache.maven.plugins</groupId>
212214
<artifactId>maven-javadoc-plugin</artifactId>

src/assembly/beast-package.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
<source>${project.basedir}/version.xml</source>
1414
<outputDirectory>/</outputDirectory>
1515
</file>
16+
<!-- Source JAR at top level (BEAST convention: PKG_NAME.src.jar) -->
17+
<file>
18+
<source>${project.build.directory}/${project.build.finalName}-sources.jar</source>
19+
<destName>${beast.pkg.name}.src.jar</destName>
20+
<outputDirectory>/</outputDirectory>
21+
</file>
1622
</files>
1723

1824
<!-- Module JAR only (BEAST core, JavaFX, and their transitive deps are provided by the runtime) -->

0 commit comments

Comments
 (0)