Skip to content

Commit e081108

Browse files
authored
Nightly build fix - org.eclipse.persistence.nightly refactor (#1703)
POM org.eclipse.persistence.nightly from bundles/nightly/pom.xml was removed from org.eclipse.persistence.parent/org.eclipse.persistence.bundles and it's used/called as a standalone module/project to prepare EclipseLink bundles and test results for publishing into nightly builds storage/page during Jenkins build only. It prepare/aggregate JPA test report from org.eclipse.persistence.jpa.test, org.eclipse.persistence.jpa.testapps and org.eclipse.persistence.jpa.jse.test modules. Signed-off-by: Radek Felcman <[email protected]>
1 parent 297f3fa commit e081108

File tree

3 files changed

+65
-53
lines changed

3 files changed

+65
-53
lines changed

bundles/nightly/pom.xml

+64-47
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
4+
Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
55
66
This program and the accompanying materials are made available under the
77
terms of the Eclipse Public License v. 2.0 which is available at
@@ -22,6 +22,7 @@
2222
<groupId>org.eclipse.persistence</groupId>
2323
<artifactId>org.eclipse.persistence.nightly</artifactId>
2424
<packaging>pom</packaging>
25+
<description>This project file is used as a standalone module/project to prepare EclipseLink bundles and test results for publishing into nightly builds storage/page.</description>
2526

2627
<parent>
2728
<groupId>org.eclipse.persistence</groupId>
@@ -36,51 +37,6 @@
3637
<nightlyTestReportsDir>${project.build.directory}${nightlyDir}/Eclipse</nightlyTestReportsDir>
3738
</properties>
3839

39-
<dependencies>
40-
<dependency>
41-
<groupId>org.eclipse.persistence</groupId>
42-
<artifactId>org.eclipse.persistence.core.test</artifactId>
43-
<version>${project.version}</version>
44-
</dependency>
45-
<dependency>
46-
<groupId>org.eclipse.persistence</groupId>
47-
<artifactId>org.eclipse.persistence.dbws</artifactId>
48-
</dependency>
49-
<dependency>
50-
<groupId>org.eclipse.persistence</groupId>
51-
<artifactId>org.eclipse.persistence.dbws.builder</artifactId>
52-
</dependency>
53-
<dependency>
54-
<groupId>org.eclipse.persistence</groupId>
55-
<artifactId>org.eclipse.persistence.moxy</artifactId>
56-
</dependency>
57-
<dependency>
58-
<groupId>org.eclipse.persistence</groupId>
59-
<artifactId>org.eclipse.persistence.jpa.test</artifactId>
60-
<version>${project.version}</version>
61-
</dependency>
62-
<dependency>
63-
<groupId>org.eclipse.persistence</groupId>
64-
<artifactId>org.eclipse.persistence.jpa.wdf.test</artifactId>
65-
<version>${project.version}</version>
66-
</dependency>
67-
<dependency>
68-
<groupId>org.eclipse.persistence</groupId>
69-
<artifactId>org.eclipse.persistence.sdo</artifactId>
70-
</dependency>
71-
<dependency>
72-
<groupId>org.eclipse.persistence</groupId>
73-
<artifactId>eclipselink</artifactId>
74-
<type>zip</type>
75-
<version>${project.version}</version>
76-
</dependency>
77-
<dependency>
78-
<groupId>org.eclipse.persistence</groupId>
79-
<artifactId>org.eclipse.persistence.bundles.other</artifactId>
80-
<version>${project.version}</version>
81-
</dependency>
82-
</dependencies>
83-
8440
<build>
8541
<plugins>
8642
<!--Initialize build.date and build.time buildNumber properties. -->
@@ -111,6 +67,67 @@
11167
</execution>
11268
</executions>
11369
</plugin>
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-antrun-plugin</artifactId>
73+
<executions>
74+
<execution>
75+
<phase>process-resources</phase>
76+
<goals>
77+
<goal>run</goal>
78+
</goals>
79+
<configuration>
80+
<target>
81+
<copy todir="${project.build.directory}/jpa-test-reports">
82+
<fileset dir="${project.build.directory}/../../../jpa/eclipselink.jpa.test">
83+
<include name="**/target/surefire-reports/TEST*.xml"/>
84+
<include name="**/target/failsafe-reports/TEST*.xml"/>
85+
</fileset>
86+
<flattenmapper/>
87+
</copy>
88+
<copy todir="${project.build.directory}/jpa-test-reports">
89+
<fileset dir="${project.build.directory}/../../../jpa/eclipselink.jpa.testapps">
90+
<include name="**/target/surefire-reports/TEST*.xml"/>
91+
<include name="**/target/failsafe-reports/TEST*.xml"/>
92+
</fileset>
93+
<flattenmapper/>
94+
</copy>
95+
<copy todir="${project.build.directory}/jpa-test-reports">
96+
<fileset dir="${project.build.directory}/../../../jpa/eclipselink.jpa.test.jse">
97+
<include name="**/target/surefire-reports/TEST*.xml"/>
98+
<include name="**/target/failsafe-reports/TEST*.xml"/>
99+
</fileset>
100+
<flattenmapper/>
101+
</copy>
102+
</target>
103+
</configuration>
104+
</execution>
105+
</executions>
106+
</plugin>
107+
<plugin>
108+
<groupId>org.apache.maven.plugins</groupId>
109+
<artifactId>maven-surefire-report-plugin</artifactId>
110+
<configuration>
111+
<linkXRef>false</linkXRef>
112+
</configuration>
113+
<executions>
114+
<execution>
115+
<id>generate-test-summary-html-report</id>
116+
<phase>package</phase>
117+
<goals>
118+
<goal>failsafe-report-only</goal>
119+
</goals>
120+
<configuration>
121+
<reportsDirectories>
122+
<reportsDirectory>${project.build.directory}/jpa-test-reports</reportsDirectory>
123+
</reportsDirectories>
124+
<outputDirectory>${project.build.directory}/jpa-test-reports/${project.build.testReports.subdirectory}</outputDirectory>
125+
<outputName>${project.build.testReports.summaryFile}</outputName>
126+
<title>EclipseLink JPA Test - Test Summary (more details on ${env.BUILD_URL} )</title>
127+
</configuration>
128+
</execution>
129+
</executions>
130+
</plugin>
114131
<plugin>
115132
<groupId>com.coderplus.maven.plugins</groupId>
116133
<artifactId>copy-rename-maven-plugin</artifactId>
@@ -157,7 +174,7 @@
157174
</fileSet>
158175
<fileSet>
159176
<sourceFile>
160-
../../jpa/eclipselink.jpa.test/target/${project.build.testReports.subdirectory}/${project.build.testReports.summaryFile}.html
177+
${project.build.directory}/jpa-test-reports/${project.build.testReports.subdirectory}/${project.build.testReports.summaryFile}.html
161178
</sourceFile>
162179
<destinationFile>
163180
${project.build.directory}${nightlyDir}/Eclipse/eclipselink-jpa-lrg${nightlyVersion}.html

bundles/pom.xml

-6
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@
5151
<module>tests</module>
5252
</modules>
5353
</profile>
54-
<profile>
55-
<id>test-lrg</id>
56-
<modules>
57-
<module>nightly</module>
58-
</modules>
59-
</profile>
6054
<profile>
6155
<id>no-deploy</id>
6256
<activation>

etc/jenkins/publish_nightly.sh

+1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ if [ ${CONTINUOUS_BUILD} = "true" ]; then
1616
echo '-[ EclipseLink Continuous Build -> No publishing any artifacts]-------------------------------'
1717
else
1818
echo '-[ EclipseLink Publish to Nightly ]-----------------------------------------------------------'
19+
mvn -V -B clean package -f bundles/nightly/pom.xml
1920
scp -r $WORKSPACE/bundles/nightly/target/nightlybuild/* [email protected]:$BUILD_RESULTS_TARGET_DIR
2021
fi

0 commit comments

Comments
 (0)