CDI error when attempting to create scaffold with JBoss Forge
Asked Answered
W

1

7

I recently discovered this amazing tool Forge. Thanks to everybody involved in making it.I downloaded the latest version 3.7.2 and added the forge executable to my path.

All works very well apart from when I:

  1. Want to setup JSF to use version 2.2, pressing tab after entering faces-setup yields no options at all. I would have hoped that it had an option like --version which could be set to 2.2 or 2.0 depending on the current code base requirement.
  2. When I run scaffold-setup --provider Faces I get the following message:

    [edsnext]$ scaffold-setup --provider Faces

    ***ERROR*** Could not install CDI.

    ***SUCCESS*** Scaffold was setup successfully.

  3. Running cdi-setup gives exactly the same error.

What do I need to do to remedy this please?

EDIT: Below is the output from addon-list ran inside forge

Currently installed addons:
org.jboss.forge.addon:addon-manager,3.7.2.Final
org.jboss.forge.addon:addon-manager-spi,3.7.2.Final
org.jboss.forge.addon:addons,3.7.2.Final
org.jboss.forge.addon:angularjs,2.1.7.Final
org.jboss.forge.addon:bean-validation,3.7.2.Final
org.jboss.forge.addon:configuration,3.7.2.Final
org.jboss.forge.addon:convert,3.7.2.Final
org.jboss.forge.addon:core,3.7.2.Final
org.jboss.forge.addon:database-tools,3.7.2.Final
org.jboss.forge.addon:dependencies,3.7.2.Final
org.jboss.forge.addon:dev-tools-java,3.7.2.Final
org.jboss.forge.addon:environment,3.7.2.Final
org.jboss.forge.addon:facets,3.7.2.Final
org.jboss.forge.addon:git,3.7.2.Final
org.jboss.forge.addon:javaee,3.7.2.Final
org.jboss.forge.addon:javaee-spi,3.7.2.Final
org.jboss.forge.addon:maven,3.7.2.Final
org.jboss.forge.addon:parser-java,3.7.2.Final
org.jboss.forge.addon:parser-json,3.7.2.Final
org.jboss.forge.addon:parser-xml,3.7.2.Final
org.jboss.forge.addon:parser-yaml,3.7.2.Final
org.jboss.forge.addon:projects,3.7.2.Final
org.jboss.forge.addon:projects-generic,3.7.2.Final
org.jboss.forge.addon:resources,3.7.2.Final
org.jboss.forge.addon:rest-client,3.7.2.Final
org.jboss.forge.addon:scaffold,3.7.2.Final
org.jboss.forge.addon:scaffold-faces,3.7.2.Final
org.jboss.forge.addon:scaffold-spi,3.7.2.Final
org.jboss.forge.addon:script,3.7.2.Final
org.jboss.forge.addon:shell,3.7.2.Final
org.jboss.forge.addon:shell-spi,3.7.2.Final
org.jboss.forge.addon:slf4j,1.7.13
org.jboss.forge.addon:templates,3.7.2.Final
org.jboss.forge.addon:templates-spi,3.7.2.Final
org.jboss.forge.addon:testing,3.7.2.Final
org.jboss.forge.addon:text,3.7.2.Final
org.jboss.forge.addon:ui,3.7.2.Final
org.jboss.forge.addon:ui-spi,3.7.2.Final
org.jboss.forge.furnace.container:cdi,2.26.2.Final
org.jboss.forge.furnace.container:simple,2.26.2.Final
org.primefaces.forge:primefaces-forge-addon,1.0.0-SNAPSHOT

EDIT 2: POM file added.

<?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>com.megchemsa</groupId>
    <artifactId>edsnext</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>${project.artifactId}</name>
    <description>EDSNext</description>
    <url>http://jsf-spec.java.net/</url>
    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <properties>
        <spec.snapshot.version>2.2</spec.snapshot.version>
    </properties>
    <dependencies>
        <!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>5.2.10.Final</version>
            <scope>provided</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.primefaces/primefaces -->
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>6.1</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.primefaces.themes/all-themes -->
        <dependency>
            <groupId>org.primefaces.themes</groupId>
            <artifactId>all-themes</artifactId>
            <version>1.0.10</version>
        </dependency>
          <!-- https://mvnrepository.com/artifact/com.sun.faces/jsf-api -->
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>2.2.14</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.sun.faces/jsf-impl -->
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>2.2.14</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax/javaee-api -->
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.enterprise/cdi-api -->
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
            <version>2.0.7</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.el/javax.el-api -->
        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>javax.el-api</artifactId>
            <version>3.0.1-b04</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl-api -->
        <dependency>
            <groupId>javax.servlet.jsp.jstl</groupId>
            <artifactId>jstl-api</artifactId>
            <version>1.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.omnifaces/omnifaces -->
        <dependency>
            <groupId>org.omnifaces</groupId>
            <artifactId>omnifaces</artifactId>
            <version>2.6.3</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.jboss.weld/weld-api -->
        <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-api</artifactId>
            <version>3.0.Final</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.jboss.weld/weld-core-impl -->
        <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-core-impl</artifactId>
            <version>3.0.0.Final</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/junit/junit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.42</version>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>java.net-maven2-SNAPSHOT-repository</id>
            <name>Java.net SNAPSHOT-Repository for Maven</name>
            <url>https://maven.java.net/content/repositories/snapshots/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>java.net-maven2-repository</id>
            <name>Java.net Repository for Maven</name>
            <url>https://maven.java.net/content/repositories/releases/</url>
            <layout>default</layout>
        </repository>
    </repositories>
</project>

Here is the last portion of the log file:

22:23:49,032 WARNING [org.jboss.forge.addon.facets.FacetFactoryImpl] (AeshProcess: 1) Could not install Facet of type [class org.jboss.forge.addon.facets.AbstractFacet_$$_javassist_504eb0fa-7ec8-42a0-a843-69b4bf92ecc0], due to exception: : java.lang.NullPointerException
    at org.jboss.forge.addon.javaee.cdi.CDIFacetImpl_1_1.isInstalled(CDIFacetImpl_1_1.java:78)
    at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source) [:1.8.0_141]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141]
    at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141]
    at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
    at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42) [furnace-api-2.26.2.Final.jar:2.26.2.Final]
    at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
    at org.jboss.forge.addon.facets.AbstractFacet_$$_javassist_504eb0fa-7ec8-42a0-a843-69b4bf92ecc0.isInstalled(AbstractFacet_$$_javassist_504eb0fa-7ec8-42a0-a843-69b4bf92ecc0.java)
    at org.jboss.forge.addon.facets.AbstractFaceted.install(AbstractFaceted.java:88) [facets-api-3.7.2.Final.jar:3.7.2.Final]
    at org.jboss.forge.addon.facets.FacetFactoryImpl.install(FacetFactoryImpl.java:218) [facets-impl-3.7.2.Final.jar:3.7.2.Final]
    at org.jboss.forge.addon.facets.FacetFactoryImpl.install(FacetFactoryImpl.java:145) [facets-impl-3.7.2.Final.jar:3.7.2.Final]
    at org.jboss.forge.addon.facets.FacetFactoryImpl.install(FacetFactoryImpl.java:134) [facets-impl-3.7.2.Final.jar:3.7.2.Final]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_141]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_141]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141]
    at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141]
    at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
    at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42) [furnace-api-2.26.2.Final.jar:2.26.2.Final]
    at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
    at org.jboss.forge.addon.facets.FacetFactoryImpl_$$_javassist_10c1990e-8260-440c-a497-def4fea52b20.install(FacetFactoryImpl_$$_javassist_10c1990e-8260-440c-a497-def4fea52b20.java) [facets-impl-3.7.2.Final.jar:3.7.2.Final]
    at org.jboss.forge.addon.javaee.cdi.ui.CDISetupCommandImpl.execute(CDISetupCommandImpl.java:65)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_141]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_141]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141]
    at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141]
    at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
    at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42) [furnace-api-2.26.2.Final.jar:2.26.2.Final]
    at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
    at org.jboss.forge.addon.javaee.cdi.ui.CDISetupCommandImpl_$$_javassist_b78a036f-215f-4b81-ba53-6f3412fc1a6d.execute(CDISetupCommandImpl_$$_javassist_b78a036f-215f-4b81-ba53-6f3412fc1a6d.java)
    at org.jboss.forge.addon.ui.impl.controller.SingleCommandControllerImpl.execute(SingleCommandControllerImpl.java:94)
    at org.jboss.forge.addon.shell.aesh.CommandAdapter.execute(CommandAdapter.java:97)
    at org.jboss.forge.addon.shell.aesh.ForgeCommandContainer.executeCommand(ForgeCommandContainer.java:88)
    at org.jboss.aesh.console.AeshConsoleImpl$AeshConsoleCallbackImpl.execute(AeshConsoleImpl.java:311)
    at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:53)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_141]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_141]
    at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_141]

22:23:49,035 SEVERE [org.jboss.forge.addon.shell.aesh.CommandAdapter] (AeshProcess: 1) Could not install CDI.
Westney answered 12/8, 2017 at 21:13 Comment(4)
Can you supply your output from running addon-list from forge?Jago
@JonSampson thanks for replying. I edited my main post with the output.Westney
My addons from a fresh install do indeed look the same as yours. You might as well add your pom.xml to your main post next.Jago
@JonSampson Thanks, I added the POMWestney
J
2

Well, I set up a bare project via project-new using your group/artifact ids then copied in your pom.xml. After running cdi-setup successfully, I've got a new version of the pom.

4 new dependencies are added:

        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>jsr250-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.spec.javax.interceptor</groupId>
            <artifactId>jboss-interceptors-api_1.1_spec</artifactId>
            <scope>provided</scope>
        </dependency>

And a dependencyManagement section as well:

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jboss.spec</groupId>
                <artifactId>jboss-javaee-6.0</artifactId>
                <version>3.0.3.Final</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>jsr250-api</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

Full, new pom.xml, post cdi-setup:

<?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>com.megchemsa</groupId>
    <artifactId>edsnext</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>${project.artifactId}</name>
    <description>EDSNext</description>
    <url>http://jsf-spec.java.net/</url>
    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <properties>
        <spec.snapshot.version>2.2</spec.snapshot.version>
    </properties>
    <dependencies>
        <!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>5.2.10.Final</version>
            <scope>provided</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.primefaces/primefaces -->
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>6.1</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.primefaces.themes/all-themes -->
        <dependency>
            <groupId>org.primefaces.themes</groupId>
            <artifactId>all-themes</artifactId>
            <version>1.0.10</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.sun.faces/jsf-api -->
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>2.2.14</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.sun.faces/jsf-impl -->
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>2.2.14</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax/javaee-api -->
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.enterprise/cdi-api -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
            <version>2.0.7</version>
        </dependency>
        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>javax.el-api</artifactId>
            <version>3.0.1-b04</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.el/javax.el-api -->
        <dependency>
            <groupId>javax.servlet.jsp.jstl</groupId>
            <artifactId>jstl-api</artifactId>
            <version>1.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl-api -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
        <dependency>
            <groupId>org.omnifaces</groupId>
            <artifactId>omnifaces</artifactId>
            <version>2.6.3</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.omnifaces/omnifaces -->
        <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-api</artifactId>
            <version>3.0.Final</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.jboss.weld/weld-api -->
        <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-core-impl</artifactId>
            <version>3.0.0.Final</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.jboss.weld/weld-core-impl -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/junit/junit -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.42</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>jsr250-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.spec.javax.interceptor</groupId>
            <artifactId>jboss-interceptors-api_1.1_spec</artifactId>
            <scope>provided</scope>
        </dependency>   
    </dependencies>
    <repositories>
        <repository>
            <id>java.net-maven2-SNAPSHOT-repository</id>
            <name>Java.net SNAPSHOT-Repository for Maven</name>
            <url>https://maven.java.net/content/repositories/snapshots/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>java.net-maven2-repository</id>
            <name>Java.net Repository for Maven</name>
            <url>https://maven.java.net/content/repositories/releases/</url>
            <layout>default</layout>
        </repository>
    </repositories>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jboss.spec</groupId>
                <artifactId>jboss-javaee-6.0</artifactId>
                <version>3.0.3.Final</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>jsr250-api</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>

I suppose I'm unlikely to reproduce the issue as it would seem to be related to a previous operation forge has performed on your project. My bare project simply has the advantage of starting from scratch (and without code at that).

As mentioned in the comments above, we both have the same addons installed. I did a second run through project setup with my network interface down to ensure that cdi-setup wasn't reaching out over the network to fetch something that was blocked from your location - that said, it may have done so previously and cached it in my maven repository.

Hopefully this gets your across the hump or at least a little closer to figuring out the source of the problem. I haven't been able to dig up any similar issues to yours.

EDIT #1:

Well, org.jboss.forge.addon.javaee.cdi.CDIFacetImpl_1_1 hasn't changed since 2016, so I assume this code it to blame:

@Override
public boolean isInstalled()
{
  boolean installed = super.isInstalled();
  if (installed)
  {
     try
     {
          XMLResource xmlResource = (XMLResource) getConfigFile();
line 78-> installed = "1.1".equals(xmlResource.getXmlSource().getAttribute("version"));
     }
     catch (FileNotFoundException e)
     {
          installed = false;
     }
  }
  return installed;
}

I don't know which config file is being fed down here, but it seems like your installation must be damaged somehow, or your Maven repository has a corrupt file. I haven't been able to remove any addons, so I can't suggest you try to reinstall the javaee plugin.

Maybe try to download the distribution again, unzip it in another directory and try running forge from there? I would also rename your ~/.forge to ~/.forge.bak. Also rm -r ~/.m2/repository/* for completeness.

Beyond that I'm out of ideas. Your next step would be to head over to the Forge Issues site, register, and repost there.

Jago answered 16/8, 2017 at 18:58 Comment(4)
Thanks for the detailed reply, it is most appreciated. I replaced my pom file with yours and did a mvn clean followed by mvn package, then started forge but I still get the ERROR Could not install CDI. when trying to run cdi-setup or scaffold-setup --provider FacesWestney
@georgelappies Have you checked ~/.forge/log/forge.log to look for any stack traces?Jago
I added the last portion of the log file.Westney
Thanks for the feedback and effort @Jon-Sampson, it is much appreciated. I will follow your work flow. I am accepting you reply as an answer.Westney

© 2022 - 2024 — McMap. All rights reserved.