0

I am trying to create and build a new project in a containerized setup of the JBPM (Business Central & Kie Server). Specifically I have used the following command to run the container:

docker run -p 3333:8080 -p 3334:8001 -d --dns 8.8.8.8 --env HTTP_PROXY=http://HOST1:PORT1 --env HTTPS_PROXY=http://HOST2:PORT2 --name jbpm jboss/jbpm-server-full:7.36.0.Final

When I create a new project and try to build it I am getting an exception. The exception is the following:

maven pom.xml found, but unable to read
org.apache.maven.project.ProjectBuildingException: 1 problem was
encountered while building the effective model [FATAL] Non-readable
POM : input contained no data @ for project

Some things to point out:

  1. I have not touched the pom.xml.
  2. I am behind a corporate proxy.
  3. If I checkout the project to my workstation from the containerized business central git and built it everything works fine.
  4. Doing the same thing at home (no Proxy environment variables there) everything works great.

Any suggestions are welcome.

Thank you all in advance.

PS: Some snippets from the exceptions thrown are below

2020-06-16 09:55:04,512 ERROR [org.appformer.maven.integration.embedder.MavenProjectLoader] (default task-5) Unable to create MavenProject from InputStream: org.apache.maven.project.ProjectBuildingException: 1 problem was encountered while building the effective model
[FATAL] Non-readable POM : input contained no data @
 for project
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:168)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:126)

Caused by: org.apache.maven.model.building.ModelBuildingException: 1 problem was encountered while building the effective model
[FATAL] Non-readable POM : input contained no data @
        at org.apache.maven.model.building.DefaultModelProblemCollector.newModelBuildingException(DefaultModelProblemCollector.java:197)
        at org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:598)
        at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:273)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:161)
        ... 102 more
Bashir
  • 2,057
  • 5
  • 19
  • 44
vbledar
  • 51
  • 2

2 Answers2

0

You need to configure the Maven settings file yourself with the proxy, for example:

<settings>
    <proxies>
        <proxy>
            <id>example-proxy</id>
            <active>true</active>
            <protocol>http</protocol>
            <host>proxyHost</host>
            <port>3128</port>
            <username>username</username>
            <password>password</password>
        </proxy>
    </proxies>
    ...
</settings>

Then, you can extend the jbpm image by providing the custom maven settings:

FROM jboss/jbpm-server-full:7.36.0.Final
COPY custom_settings.xml /opt/jboss/.m2/settings.xml

Depending on the image, you might need also to configure the "$JBOSS_HOME/standalone/configuration/standalone.xml" by adding:

<property name="kie.maven.settings.custom" value="/opt/jboss/.m2/settings.xml"/>

Or just run the docker image with the property:

docker run --env kie.maven.settings.custom=/opt/jboss/.m2/settings.xml ...
0

Your pom is trying to download dependencies from internet. As the proxy is not configured in the pom itself or in the maven settings, it fails.

You have two options:

  1. to download the needed dependent libraries/jars in maven before and make it available in the enviroment, so when it builds it does not need to go online to get it
  2. configure the proxy either in the maven settings or in the pom
zhrist
  • 1,169
  • 11
  • 28