Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-27279

eap-maven-plugin takes precedence when configured with wildfly-jar-maven-plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • None
    • None
    • HelmChart, OpenShift
    • None
    • False
    • None
    • False
    • Workaround Exists
    • Hide

      Remove profile with eap-maven-plugin

      Show
      Remove profile with eap-maven-plugin

      Both plugins are configured in their own profiles and profile with wildfly-jar-maven-plugin is set to be active by default https://gitlab.cee.redhat.com/jkasik/jboss-eap-quickstarts/-/blob/reproducer/helloworld/pom.xml?ref_type=heads

      helm install xp5-bootable-jar \
                                    --replace --dependency-update \
                                    --set build.pullSecret=def-pull-secret \
                                    /home/jkasik/projects/rhat/eap-charts/charts/eap-xp5/ \
                                    --set "build.env[0].name=MAVEN_ARGS_APPEND,build.env[0].value=-Dinsecure.repositories=WARN" \
                                    --set "build.env[1].name=MAVEN_MIRROR_URL,build.env[1].value=http://repository.eapqe.psi.redhat.com:8081/artifactory/all/" \
                                    --set "build.uri=https://gitlab.cee.redhat.com/jkasik/jboss-eap-quickstarts.git" \
                                    --set "build.ref=reproducer" \
                                    --set "build.contextDir=helloworld" \
                                    --set "build.mode=bootable-jar"
      

      Build goes well, but application pod fails

      Starting the Java application using /opt/jboss/container/java/run/run-java.sh ...
      ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected)
      INFO exec -a "java" java -XX:MaxRAMPercentage=80.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -cp "." -jar
      INFO running in /deployments
      Error: -jar requires jar file specification
      Usage: java [options] <mainclass> [args...]
      (to execute a class)
      or java [options] -jar <jarfile> [args...]
      (to execute a jar file)
      or java [options] -m <module>[/<mainclass>] [args...]
      java [options] --module <module>[/<mainclass>] [args...]
      (to execute the main class in a module)
      or java [options] <sourcefile> [args]
      (to execute a single source-file program)
      Arguments following the main class, source file, -jar <jarfile>,
      -m or --module <module>/<mainclass> are passed as the arguments to
      main class.
      where options include:
      -cp <class search path of directories and zip/jar files>
      -classpath <class search path of directories and zip/jar files>
      --class-path <class search path of directories and zip/jar files>
      

            jmesnil1@redhat.com Jeff Mesnil
            jkasik@redhat.com Jan Kašík
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: