CentEAP / eap-build

Build scripts for EAP 6 or 7
122 stars 62 forks source link

7.4.0 #157

Closed fcorneli closed 2 years ago

fcorneli commented 2 years ago

Started working on the build process for EAP version 7.4.0, but it fails on maven_build dist for the moment.

[ERROR] Failed to execute goal on project wildfly-dist-legacy:
Could not resolve dependencies for project org.jboss.eap:wildfly-dist-legacy:jar:7.4.0.GA-redhat-00005:
Could not find artifact org.jboss.eap:wildfly-testsuite-shared:jar:7.4.0.GA-redhat-00005 in 
jboss-eap (https://maven.repository.redhat.com/ga/) -> [Help 1]

Below my patch so far:

diff --git a/readme.md b/readme.md
index fa80ee8..507d3c2 100644
--- a/readme.md
+++ b/readme.md
@@ -43,7 +43,7 @@ If you don't want to use git, download the archive, unzip it and run the main sc

 Versions
 --------
-The build-eap7.sh script supports 7.0.0->7.0.9, 7.1.0->7.1.4, 7.2.0->7.2.7, 7.3.0->7.3.8.
+The build-eap7.sh script supports 7.0.0->7.0.9, 7.1.0->7.1.4, 7.2.0->7.2.7, 7.3.0->7.3.8, 7.4.0.

 The build-eap6.sh script supports 6.1.1, 6.2.0->6.2.4, 6.3.0->6.3.3, 6.4.0->6.4.23.

diff --git a/src/functions-7.sh b/src/functions-7.sh
index 9aa504e..31182b0 100755
--- a/src/functions-7.sh
+++ b/src/functions-7.sh
@@ -46,7 +46,8 @@ function prepare_core_source {
     if [ -z "$CORE_FULL_SOURCE_VERSION" ]
     then
         download_and_unzip http://ftp.redhat.com/redhat/jboss/eap/$EAP_VERSION/en/source/jboss-eap-$EAP_VERSION-core-src.zip
-        mv $BUILD_HOME/work/jboss-eap-7.3-core-src $BUILD_HOME/work/wildfly-core-$CORE_VERSION
+        EAP_SHORT_VERSION=${EAP_VERSION%.*}
+        mv $BUILD_HOME/work/jboss-eap-$EAP_SHORT_VERSION-core-src $BUILD_HOME/work/wildfly-core-$CORE_VERSION

         cd $BUILD_HOME/work/wildfly-core-$CORE_VERSION/core-feature-pack
     else
@@ -83,11 +84,27 @@ function build_core {
 function build_eap {
     cd $BUILD_HOME/work/jboss-eap-$EAP_SHORT_VERSION-src
     maven_build servlet-feature-pack
-    maven_build feature-pack
     # EAP 7.3
+    if [ -d feature-pack ]
+    then
+        maven_build feature-pack
+    fi
+    # EAP 7.4
+    if [ -d ee-feature-pack ]
+    then
+        maven_build ee-feature-pack
+    fi
+    # EAP 7.3/7.4
     if [ -d dist-legacy ]
     then
-        mv dist dist-new
+        if [ -d ee-dist ]
+        then
+            # EAP 7.4
+            mv ee-dist dist-new
+        else
+            # EAP 7.3
+            mv dist dist-new
+        fi
         mv dist-legacy dist
     fi
     maven_build dist
diff --git a/src/jboss-eap-7.properties b/src/jboss-eap-7.properties
index abf0d77..ead1257 100644
--- a/src/jboss-eap-7.properties
+++ b/src/jboss-eap-7.properties
@@ -1,4 +1,4 @@
-versions=7.0.0,7.0.1,7.0.2,7.0.3,7.0.4,7.0.5,7.0.6,7.0.7,7.0.8,7.0.9,7.1.0,7.1.1,7.1.2,7.1.3,7.1.4,7.2.0,7.2.1,7.2.2,7.2.3,7.2.4,7.2.5,7.2.6,7.2.7,7.3.0,7.3.1,7.3.2,7.3.3,7.3.4,7.3.5,7.3.6,7.3.7,7.3.8
+versions=7.0.0,7.0.1,7.0.2,7.0.3,7.0.4,7.0.5,7.0.6,7.0.7,7.0.8,7.0.9,7.1.0,7.1.1,7.1.2,7.1.3,7.1.4,7.2.0,7.2.1,7.2.2,7.2.3,7.2.4,7.2.5,7.2.6,7.2.7,7.3.0,7.3.1,7.3.2,7.3.3,7.3.4,7.3.5,7.3.6,7.3.7,7.3.8,7.4.0

 # core version and corresponding version with full source code
 # EAP 7.0.0
@@ -67,6 +67,7 @@ versions=7.0.0,7.0.1,7.0.2,7.0.3,7.0.4,7.0.5,7.0.6,7.0.7,7.0.8,7.0.9,7.1.0,7.1.1
 10.1.20.Final-redhat-00001=10.0.3.Final
 # EAP 7.3.8
 10.1.21.Final-redhat-00001=10.0.3.Final
+# EAP 7.4.0 : direct download of the core source file

 # Add modules
 7.0.6.modules=org.apache.commons.logging
LPETERS006 commented 2 years ago

Hello. Maybe it will work with "7.3.2.GA-redhat-00002" as "7.4.0.GA-redhat-00005". I have tried to compile&install the testsuite but there where a lot more dependencies missing in repositories. I also tried to remove this dependency (+ some other testings), but as a result this package is missing at some tests at the end of compilation. Somwehere where i cant remove / where i dont find it. I think removing isn't a good option. But a replace maybe work. (As long as nothing significant has changed.)

LPETERS006 commented 2 years ago

(Interesting) Update: I have renamed the package in .m2 repo. I got the same result as removing it from the xml's. ... Another package is missing: "org.wildfly.test.distribution.validation"

But the testsuit in 7.3.2 seems to work (apart from the fact that no information is available due to the lack pom).

[INFO] -----------------< org.jboss.eap:wildfly-dist-legacy >------------------ [INFO] Building WildFly: Legacy Feature-pack-based Distribution 7.4.0.GA-redhat-00005 [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The POM for org.jboss.eap:wildfly-testsuite-shared:jar:7.4.0.GA-redhat-00005 is missing, no dependency information available

.... (I get this error in any case, regardless of whether I replace the package or delete it from all poms):

[ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /root/dockerbuild/eap-build/work/jboss-eap-7.4-src/dist/src/test/java/org/wildfly/dist/legacy/subsystem/xml/XSDValidationUnitTestCase.java:[26,48] package org.wildfly.test.distribution.validation does not exist [ERROR] /root/dockerbuild/eap-build/work/jboss-eap-7.4-src/dist/src/test/java/org/wildfly/dist/legacy/subsystem/xml/XSDValidationUnitTestCase.java:[34,48] cannot find symbol

LPETERS006 commented 2 years ago

Build done for EAP 7.4.0 😁 fixed it! You have to add "-Dmaven.test.skip=true" at all mvn lines in function maven_build to skip the xsd validation.

Here we go. Building EAP version 7.4.0. File jboss-eap-7.4.0-src.zip already here. No need to download it again. download/jboss-eap-7.4.0-src.zip: OK Checksum verified for jboss-eap-7.4.0-src.zip Unzipping jboss-eap-7.4.0-src.zip jboss-eap-7.4.0-src.zip unzipped Core version: 15.0.2.Final-redhat-00001 File jboss-eap-7.4.0-core-src.zip already here. No need to download it again. download/jboss-eap-7.4.0-core-src.zip: OK Checksum verified for jboss-eap-7.4.0-core-src.zip Unzipping jboss-eap-7.4.0-core-src.zip jboss-eap-7.4.0-core-src.zip unzipped Build done for Core 15.0.2.Final-redhat-00001 Build done for EAP 7.4.0 Build done. Check your dist directory for the new eap zip file (jboss-eap-7.4.0.zip).

When i have time i try again with deleting the dependencies from the xml's. Because that would be the easiest way to skip the missing dependency.

cher1705 commented 2 years ago

Current status? -> Because I added fcorneli's changes and it worked like a charm UPDATE: I had to slightly modify your IF ELSE statements because, YES you can build 7.4.0 BUT you cannot build eg 7.3.9. Just because both versions have an ee-dist folder. That's why your last ELSE part with "mv dist dist-new" will never happen

   # EAP 7.3/7.4
    if [ -d dist-legacy ]
    then
      if [ -d dist ]
      then
        # EAP 7.3
        mv dist dist-new
      else
        # EAP 7.4
        mv ee-dist dist-new
      fi
      mv dist-legacy dist
    fi

Can you tell me the difference between ee-dist and dist-legacy? Do we have also EE Full & Web, if we use dist-legacy?

hasalex commented 2 years ago

@cher1705, I've tested your PR and seems to be fine for me. I've merged it.

@LPETERS006 I don't encounter your problems. Could you test the updated master, and tell me if it works ?

cher1705 commented 2 years ago

Hi folks, was someone able to build 7.4.1? There we have the same problem @LPETERS006 already mentioned with 7.4.0 [WARNING] The POM for org.jboss.eap:wildfly-testsuite-shared:jar:7.4.1.GA-redhat-00003 is missing, no dependency information available [ERROR] Failed to execute goal on project wildfly-dist-legacy: Could not resolve dependencies for project org.jboss.eap:wildfly-dist-legacy:jar:7.4.1.GA-redhat-00003: Could not find artifact org.jboss.eap:wildfly-testsuite-shared:jar:7.4.1.GA-redhat-00003 in jboss-eap (https://maven.repository.redhat.com/ga/) -> [Help 1]

Also, which Java Version do you use to build the JBEAP? I can only use JDK8 If I use JDK 11, I get the following error [WARNING] The POM for com.h2database:h2:jar:1.4.197.redhat-00001 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] Unable to obtain POM for artifact : com.h2database:h2:jar:1.4.197.redhat-00001:provided [ERROR] 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${tools.jar} @ line 154, column 19 [WARNING] Unable to obtain POM for artifact : com.h2database:h2:jar:1.4.197.redhat-00001:compile [ERROR] 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${tools.jar} @ line 154, column 19 [WARNING] The POM for com.h2database:h2:jar:1.4.197.redhat-00001 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.jboss.eap:wildfly-testsuite-shared:jar:7.4.1.GA-redhat-00003 is missing, no dependency information available [ERROR] Failed to execute goal on project wildfly-dist-legacy: Could not resolve dependencies for project org.jboss.eap:wildfly-dist-legacy:jar:7.4.1.GA-redhat-00003: Failure to find org.jboss.eap:wildfly-testsuite-shared:jar:7.4.1.GA-redhat-00003 in https://maven.repository.redhat.com/ga/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-eap has elapsed or updates are forced -> [Help 1]

It's basically the same problem "wildfly-testsuite-shared:jar:7.4.1.GA-redhat-00003 is missing" + that tools.jar can't be found. tools.jar was removed in JDK11, I know...but do you ignore this error or how do you build JBEAP with JDK11?

Last question: Why do we use legacy and not ee-dist to build our eap?

hasalex commented 2 years ago

Hi @cher1705,

org.jboss.eap:wildfly-testsuite-shared:jar:7.4.1.GA-redhat-00003 is missing

Sadly, it is not in the maven repository, so we should probably remove the dependency.

[ERROR] 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${tools.jar}

I think that we can ignore this error.

Why do we use legacy and not ee-dist to build our eap?

Good question! ee-dist is using galleon, and I don't know how it works and how to customize it. I'll probably have to learn it... one day. (see #148) If you know that, your knowledge would be helpful.

BTW, I've opened a new issue for version 7.4.1. I'll create a PR soon, that you could test.