Skip to content

Commit 2041728

Browse files
committed
Attempt to duplicate source files.
1 parent 34adce3 commit 2041728

File tree

3 files changed

+72
-8
lines changed

3 files changed

+72
-8
lines changed

byte-buddy-agent/pom.xml

Lines changed: 41 additions & 6 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
<modelVersion>4.0.0</modelVersion>
45

56
<parent>
@@ -18,11 +19,12 @@
1819
<packages.list>net.bytebuddy.agent,net.bytebuddy.agent.utility.nullability</packages.list>
1920
<native.compiler.32>i686-w64-mingw32-gcc</native.compiler.32>
2021
<native.compiler.64>x86_64-w64-mingw32-gcc</native.compiler.64>
21-
<net.bytebuddy.test.jnapath />
22+
<net.bytebuddy.test.jnapath/>
2223
</properties>
2324

2425
<name>Byte Buddy agent</name>
25-
<description>The Byte Buddy agent offers convenience for attaching an agent to the local or a remote VM.</description>
26+
<description>The Byte Buddy agent offers convenience for attaching an agent to the local or a remote VM.
27+
</description>
2628

2729
<!--
2830
The JNA dependency can be excluded safely. Byte Buddy will safely discover the
@@ -207,7 +209,9 @@
207209
<arguments>
208210
<argument>-shared</argument>
209211
<argument>-o</argument>
210-
<argument>${project.basedir}/src/main/resources/win32-x86/attach_hotspot_windows.dll</argument>
212+
<argument>
213+
${project.basedir}/src/main/resources/win32-x86/attach_hotspot_windows.dll
214+
</argument>
211215
<argument>${project.basedir}/src/main/c/attach_hotspot_windows.c</argument>
212216
</arguments>
213217
</configuration>
@@ -223,7 +227,9 @@
223227
<arguments>
224228
<argument>-shared</argument>
225229
<argument>-o</argument>
226-
<argument>${project.basedir}/src/main/resources/win32-x86-64/attach_hotspot_windows.dll</argument>
230+
<argument>
231+
${project.basedir}/src/main/resources/win32-x86-64/attach_hotspot_windows.dll
232+
</argument>
227233
<argument>${project.basedir}/src/main/c/attach_hotspot_windows.c</argument>
228234
</arguments>
229235
</configuration>
@@ -252,12 +258,41 @@
252258
</goals>
253259
<phase>prepare-package</phase>
254260
<configuration>
255-
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/9</outputDirectory>
261+
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/9
262+
</outputDirectory>
256263
<target>1.8</target>
257264
</configuration>
258265
</execution>
259266
</executions>
260267
</plugin>
268+
<plugin>
269+
<groupId>org.apache.maven.plugins</groupId>
270+
<artifactId>maven-antrun-plugin</artifactId>
271+
<version>${version.plugin.antrun}</version>
272+
<executions>
273+
<execution>
274+
<id>modify-source-jar</id>
275+
<phase>verify</phase>
276+
<goals>
277+
<goal>run</goal>
278+
</goals>
279+
<configuration>
280+
<skip>${bytebuddy.original-sources}</skip>
281+
<target>
282+
<delete dir="${project.build.directory}/sources-copy" failonerror="false"/>
283+
<unzip src="${project.build.directory}/byte-buddy-agent-${project.version}-sources.jar" dest="${project.build.directory}/sources-copy"/>
284+
<copy todir="${project.build.directory}/sources-copy/META-INF/versions/9">
285+
<fileset dir="${project.build.directory}/sources-copy">
286+
<include name="net/bytebuddy/**/*.java"/>
287+
</fileset>
288+
</copy>
289+
<delete file="${project.build.directory}/byte-buddy-agent-${project.version}-sources.jar"/>
290+
<zip basedir="${project.build.directory}/sources-copy" destfile="${project.build.directory}/byte-buddy-agent-${project.version}-sources.jar"/>
291+
</target>
292+
</configuration>
293+
</execution>
294+
</executions>
295+
</plugin>
261296
</plugins>
262297
</build>
263298
</profile>

byte-buddy-dep/pom.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,34 @@
467467
</execution>
468468
</executions>
469469
</plugin>
470+
<plugin>
471+
<groupId>org.apache.maven.plugins</groupId>
472+
<artifactId>maven-antrun-plugin</artifactId>
473+
<version>${version.plugin.antrun}</version>
474+
<executions>
475+
<execution>
476+
<id>modify-source-jar</id>
477+
<phase>verify</phase>
478+
<goals>
479+
<goal>run</goal>
480+
</goals>
481+
<configuration>
482+
<skip>${bytebuddy.original-sources}</skip>
483+
<target>
484+
<delete dir="${project.build.directory}/sources-copy" failonerror="false"/>
485+
<unzip src="${project.build.directory}/byte-buddy-dep-${project.version}-sources.jar" dest="${project.build.directory}/sources-copy"/>
486+
<copy todir="${project.build.directory}/sources-copy/META-INF/versions/9">
487+
<fileset dir="${project.build.directory}/sources-copy">
488+
<include name="net/bytebuddy/**/*.java"/>
489+
</fileset>
490+
</copy>
491+
<delete file="${project.build.directory}/byte-buddy-dep-${project.version}-sources.jar"/>
492+
<zip basedir="${project.build.directory}/sources-copy" destfile="${project.build.directory}/byte-buddy-dep-${project.version}-sources.jar"/>
493+
</target>
494+
</configuration>
495+
</execution>
496+
</executions>
497+
</plugin>
470498
</plugins>
471499
</build>
472500
</profile>

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
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"
3-
child.project.url.inherit.append.path="false">
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">
43

54
<modelVersion>4.0.0</modelVersion>
65

@@ -60,6 +59,7 @@
6059
<properties>
6160
<copyright.holder>Rafael Winterhalter</copyright.holder>
6261
<bytebuddy.extras>false</bytebuddy.extras>
62+
<bytebuddy.original-sources>true</bytebuddy.original-sources>
6363
<bytebuddy.integration>false</bytebuddy.integration>
6464
<bytebuddy.experimental>true</bytebuddy.experimental>
6565
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -1058,6 +1058,7 @@
10581058
</activation>
10591059
<properties>
10601060
<bytebuddy.extras>true</bytebuddy.extras>
1061+
<bytebuddy.original-sources>false</bytebuddy.original-sources>
10611062
</properties>
10621063
<build>
10631064
<plugins>

0 commit comments

Comments
 (0)