How to solve dependency problem in Integration Project when building with maven?

Viewed 197

I have an integration project, created with wso2 IntegrationStudio. It consists of two modules:

  • file-integration-01-configs for ESB configs
  • file-integration-01-exporter for the composite exporter

Here's the content of the project:

├── file-integration-01-configs
│   ├── artifact.xml
│   ├── pom.xml
│   ├── src
│   │   └── main
│   │       └── synapse-config
│   │           ├── api
│   │           ├── endpoints
│   │           ├── inbound-endpoints
│   │           ├── local-entries
│   │           ├── message-processors
│   │           ├── message-stores
│   │           ├── proxy-services
│   │           │   └── file-proxy.xml
│   │           ├── sequences
│   │           │   └── file-write-sequence.xml
│   │           ├── tasks
│   │           └── templates
│   └── test
│       └── resources
│           └── mock-services
├── file-integration-01-exporter
│   └── pom.xml
├── pom.xml

I try to build and package the project on the command line

# in the root of the project
$ mvn clean 
$ mvn package

The configs compile just fine. But the composite exporter modules fails with the following error:

[INFO] --------------< com.example:file-integration-01-exporter >--------------
[INFO] Building file-integration-01-exporter 1.0.0                        [2/3]
[INFO] -------------------------[ carbon/application ]-------------------------
[WARNING] The POM for com.example.sequence:file-write-sequence:xml:1.0.0 is missing, no dependency information available
[WARNING] The POM for com.example.proxy-service:file-proxy:xml:1.0.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for file-integration-01 1.0.0:
[INFO] 
[INFO] file-integration-01-configs ........................ SUCCESS [  7.335 s]
[INFO] file-integration-01-exporter ....................... FAILURE [  0.209 s]
[INFO] file-integration-01 ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.815 s
[INFO] Finished at: 2021-03-23T09:52:14+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project file-integration-01-exporter: 
Could not resolve dependencies for project com.example:file-integration-01-exporter:carbon/application:1.0.0: T
he following artifacts could not be resolved: 
com.example.sequence:file-write-sequence:xml:1.0.0, 
com.example.proxy-service:file-proxy:xml:1.0.0: 
Failure to find com.example.sequence:file-write-sequence:xml:1.0.0 in http://maven.wso2.org/nexus/content/groups/wso2-public/ was cached in 
the local repository, resolution will not be reattempted until the update 
interval of wso2-nexus has elapsed or updates are forced ->

The file file-integration-01-configs/artifact.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?><artifacts>
<artifact name="file-proxy" groupId="com.example.proxy-service" version="1.0.0" type="synapse/proxy-service" serverRole="Enterp
riseServiceBus">
        <file>src/main/synapse-config/proxy-services/file-proxy.xml</file>
    </artifact>
    <artifact name="file-write-sequence" groupId="com.example.sequence" version="1.0.0" type="synapse/sequence" serverRole="Enterpr
iseServiceBus">
        <file>src/main/synapse-config/sequences/file-write-sequence.xml</file>
    </artifact>
</artifacts>

Beginning of the file-integration-01-exporte/pom.xml, including dependency information:

?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.
0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>file-integration-01-exporter</artifactId>
  <version>1.0.0</version>
  <packaging>carbon/application</packaging>
  <name>file-integration-01-exporter</name>
  <description>file-integration-01-exporter</description>
  <properties>
    <com.example.proxy-service_._file-proxy>capp/EnterpriseServiceBus</com.example.proxy-service_._file-proxy>
    <com.example.sequence_._file-write-sequence>capp/EnterpriseServiceBus</com.example.sequence_._file-write-sequence>
    <artifact.types>jaggery/app=zip,synapse/priority-executor=xml,synapse/inbound-endpoint=xml,service/rule=aar,synapse/message-store=xml,event/stre
am=json,service/meta=xml,datasource/datasource=xml,synapse/proxy-service=xml,bpel/workflow=zip,synapse/sequence=xml,synapse/endpointTemplate=xml,car
bon/application=car,wso2/gadget=dar,synapse/api=xml,synapse/event-source=xml,synapse/message-processors=xml,event/receiver=xml,lib/dataservice/valid
ator=jar,synapse/template=xml,synapse/endpoint=xml,lib/carbon/ui=jar,lib/synapse/mediator=jar,event/publisher=xml,synapse/local-entry=xml,synapse/ta
sk=xml,webapp/jaxws=war,registry/resource=zip,synapse/configuration=xml,service/axis2=aar,synapse/lib=zip,synapse/sequenceTemplate=xml,event/executi
on-plan=siddhiql,service/dataservice=dbs,web/application=war,lib/library/bundle=jar</artifact.types>
  </properties>
  <dependencies>
    <dependency>
      <groupId>com.example.sequence</groupId>
      <artifactId>file-write-sequence</artifactId>
      <version>1.0.0</version>
      <type>xml</type>
    </dependency>
    <dependency>
      <groupId>com.example.proxy-service</groupId>
      <artifactId>file-proxy</artifactId>
      <version>1.0.0</version>
      <type>xml</type>
    </dependency>
  </dependencies>

What kind of fix do I have to apply to which of the maven POMs in the project workspace in order to resolve this missing dependency?

0 Answers
Related