Reputation: 1401
Can build & deploy Omnifaces 'showcase-master' from 'https://showcase.omnifaces.org/'
Using:
mvn clean package -Pnon-ee,mojarra-4.0.0.SP01
Deployed 'showcase-4.1.war' on WildFly 27.0.1 using 'jdk-20.jdk/Contents/Home/bin/java':
12:06:00,545 INFO [org.jboss.as.repository] (External Management Request Threads -- 1) WFLYDR0001: Content added at location /usr/local/Cellar/wildfly-as/wildfly-preview-27.0.1.Final/standalone/data/content/2a/616ac15dad5483fcb190a5fd5bee2bda074bf8/content
12:06:00,568 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "showcase-4.1.war" (runtime-name: "showcase-4.1.war")
12:06:02,305 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0003: Processing weld deployment showcase-4.1.war
12:06:02,441 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-6) HV000001: Hibernate Validator 8.0.0.Final
12:06:02,784 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-6) WFLYEJB0473: JNDI bindings for session bean named 'SomeEJB' in deployment unit 'deployment "showcase-4.1.war"' are as follows:
java:global/showcase-4.1/SomeEJB!org.omnifaces.showcase.cdi.SomeEJB
java:app/showcase-4.1/SomeEJB!org.omnifaces.showcase.cdi.SomeEJB
java:module/SomeEJB!org.omnifaces.showcase.cdi.SomeEJB
java:global/showcase-4.1/SomeEJB
java:app/showcase-4.1/SomeEJB
java:module/SomeEJB
12:06:02,947 INFO [org.wildfly.extension.micrometer] (MSC service thread 1-6) WFLYMMTREXT0002: Micrometer Subsystem is processing deployment
12:06:02,968 WARN [org.wildfly.extension.microprofile.opentracing] (MSC service thread 1-6) WFLYTRACEXT0012: No Jaeger endpoint or sender-binding configured. Installing a no-op sender
12:06:02,981 INFO [io.jaegertracing.internal.JaegerTracer] (MSC service thread 1-6) No shutdown hook registered: Please call close() manually on application shutdown.
12:06:02,982 INFO [org.wildfly.microprofile.opentracing.smallrye] (MSC service thread 1-6) WFLYTRAC0001: Tracer initialized: JaegerTracer(version=Java-1.6.0, serviceName=showcase-4.1.war, reporter=RemoteReporter(sender=NoopSender(), closeEnqueueTimeout=1000), sampler=ConstSampler(decision=true, tags={sampler.type=const, sampler.param=true}), tags={hostname=MacBook-Pro-2.local, jaeger.version=Java-1.6.0, ip=127.0.0.1}, zipkinSharedRpcSpan=false, expandExceptionLogs=false, useTraceId128Bit=false)
12:06:03,313 INFO [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900: 5.1.0 (Final)
12:06:04,696 INFO [org.omnifaces.ApplicationInitializer] (ServerService Thread Pool -- 93) Using OmniFaces version 4.1
12:06:04,947 INFO [io.undertow.websockets.jsr] (ServerService Thread Pool -- 93) UT026005: Adding programmatic server endpoint class org.omnifaces.cdi.push.SocketEndpoint for path /omnifaces.push/{channel}
12:06:04,987 INFO [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 93) Initializing Mojarra 4.0.0.SP01 for context ''
12:06:05,922 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 93) Running on PrimeFaces 12.0.0
12:06:06,013 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 93) WFLYUT0021: Registered web context: '/' for server 'default-server'
12:06:06,081 INFO [org.jboss.as.server] (External Management Request Threads -- 1) WFLYSRV0010: Deployed "showcase-4.1.war" (runtime-name : "showcase-4.1.war")
Displays:
https://localhost:8443/components/graphicImage
The 'pom.xml' is:
<?xml version="1.0" encoding="UTF-8"?>
<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"
>
<modelVersion>4.0.0</modelVersion>
<groupId>org.omnifaces</groupId>
<artifactId>showcase</artifactId>
<version>4.1</version>
<packaging>war</packaging>
<name>Omnifaces Showcase</name>
<description>Showcase for Faces 4.x utility library</description>
<url>https://showcase.omnifaces.org</url>
<organization>
<name>OmniFaces</name>
<url>https://omnifaces.org</url>
</organization>
<inceptionYear>2012</inceptionYear>
<developers>
<developer>
<id>balusc</id>
<name>Bauke Scholtz</name>
<email>[email protected]</email>
</developer>
<developer>
<id>arjan.tijms</id>
<name>Arjan Tijms</name>
<email>[email protected]</email>
</developer>
</developers>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/omnifaces/showcase</url>
<connection>scm:git:git://github.com/omnifaces/showcase.git</connection>
<developerConnection>scm:git:[email protected]:omnifaces/showcase.git</developerConnection>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<repositories>
<repository>
<id>jboss-repository</id>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-web-api</artifactId>
<version>10.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
<version>4.1</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>12.0.0</version>
<classifier>jakarta</classifier>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.15.4</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
</plugin>
</plugins>
</build>
</project>
However trying to build & deploy with 'Gradle' migrating from Maven using 'init' I get:
plugins {
`java-library`
`maven-publish`
}
repositories {
mavenLocal()
maven {
url = uri("https://repository.jboss.org/nexus/content/groups/public/")
}
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
}
dependencies {
api("org.omnifaces:omnifaces:4.1")
api("org.primefaces:primefaces:12.0.0")
api("org.jsoup:jsoup:1.15.4")
//providedCompile("jakarta.platform:jakarta.jakartaee-web-api:10.0.0")
compileOnly("jakarta.platform:jakarta.jakartaee-web-api:10.0.0")
}
group = "org.omnifaces"
version = "4.1"
description = "Omnifaces Showcase"
java.sourceCompatibility = JavaVersion.VERSION_1_8
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
}
gradle build --info
Initialized native services in: /Users/NOTiFY/.gradle/native
Initialized jansi services in: /Users/NOTiFY/.gradle/native
Received JVM installation metadata from '/Library/Java/JavaVirtualMachines/jdk-19.0.2.jdk/Contents/Home': {JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-19.0.2.jdk/Contents/Home, JAVA_VERSION=19.0.2, JAVA_VENDOR=Oracle Corporation, RUNTIME_NAME=OpenJDK Runtime Environment, RUNTIME_VERSION=19.0.2+7-44, VM_NAME=OpenJDK 64-Bit Server VM, VM_VERSION=19.0.2+7-44, VM_VENDOR=Oracle Corporation, OS_ARCH=x86_64}
The client will now receive all logging from the daemon (pid: 2558). The daemon log file: /Users/NOTiFY/.gradle/daemon/8.0.2/daemon-2558.out.log
Starting 54th build in daemon [uptime: 6 hrs 9 mins 38.159 secs, performance: 100%, GC rate: 0.00/s, heap usage: 0% of 512 MiB, non-heap usage: 45% of 384 MiB]
Using 16 worker leases.
Now considering [/Users/NOTiFY/IdeaProjects/showcase-master-Gradle] as hierarchies to watch
Watching the file system is configured to be enabled if available
File system watching is active
Starting Build
Settings evaluated using settings file '/Users/NOTiFY/IdeaProjects/showcase-master-Gradle/settings.gradle.kts'.
Projects loaded. Root project using build file '/Users/NOTiFY/IdeaProjects/showcase-master-Gradle/build.gradle.kts'.
Included projects: [root project 'showcase-master-Gradle']
> Configure project :
Evaluating root project 'showcase-master-Gradle' using build file '/Users/NOTiFY/IdeaProjects/showcase-master-Gradle/build.gradle.kts'.
The configuration :classpath is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.
The configuration :classpath is both consumable and declarable. This combination is incorrect, only one of these flags should be set.
The configuration :classpath is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.
The configuration :classpath is both consumable and declarable. This combination is incorrect, only one of these flags should be set.
Caching disabled for Kotlin DSL accessors for root project 'showcase-master-Gradle' because:
Build cache is disabled
Skipping Kotlin DSL accessors for root project 'showcase-master-Gradle' as it is up-to-date.
All projects evaluated.
Task name matched 'build'
Selected primary task 'build' from project :
The configuration :mainSourceElements is both consumable and declarable. This combination is incorrect, only one of these flags should be set.
The configuration :testResultsElementsForTest is both consumable and declarable. This combination is incorrect, only one of these flags should be set.
Tasks to be executed: [task ':compileJava', task ':processResources', task ':classes', task ':jar', task ':assemble', task ':compileTestJava', task ':processTestResources', task ':testClasses', task ':test', task ':check', task ':build']
Tasks that were excluded: []
Resolve mutations for :compileJava (Thread[#2704,Execution worker,5,main]) started.
:compileJava (Thread[#2704,Execution worker,5,main]) started.
> Task :compileJava FAILED
Caching disabled for task ':compileJava' because:
Build cache is disabled
Task ':compileJava' is not up-to-date because:
Task has failed previously.
The input changes require a full rebuild for incremental task ':compileJava'.
Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
Compiling with toolchain '/Library/Java/JavaVirtualMachines/jdk-19.0.2.jdk/Contents/Home'.
Compiling with JDK Java compiler API.
/Users/NOTiFY/IdeaProjects/showcase-master-Gradle/src/main/java/org/omnifaces/showcase/App.java:78: error: cannot access FacesContext
primeFacesVersion = new PrimeEnvironment(getContext()).getBuildVersion();
^
class file for javax.faces.context.FacesContext not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 665ms
1 actionable task: 1 executed
(2) Changed:
providedCompile("jakarta.platform:jakarta.jakartaee-web-api:10.0.0")"
to:
compileOnly("jakarta.platform:jakarta.jakartaee-web-api:10.0.0")
How error with:
> Task :compileJava FAILED
/Users/NOTiFY/IdeaProjects/showcase-master-Gradle/src/main/java/org/omnifaces/showcase/App.java:78: error: cannot access FacesContext
primeFacesVersion = new PrimeEnvironment(getContext()).getBuildVersion();
^
class file for javax.faces.context.FacesContext not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
FAILURE: Build failed with an exception.
Upvotes: 0
Views: 980