vs97
vs97

Reputation: 5859

Maven Compilation Error - Package does not exist

I have a multi-module project in IntelliJ with the following structure:

**simulator**
    pom.xml
**protocol** -> has dependency on simulator
    pom.xml 

Everything is resolved fine in the code editor, in my protocol project I can import package from simulator and build the protocol project without problems.

The problem starts when I try to use Maven - if I run the "package" command, I get a lot of errors regarding packages not existing. Please see screenshot.

Screenshot

My protocol project pom.xml has a dependency on the simulator project, like so:

<dependency>
            <groupId>uk.co.pervasive_intelligence.simulator</groupId>
            <artifactId>simulator</artifactId>
            <version>1.2.2</version>
</dependency>

The scope is set to "Compile". What am I doing wrong?

Upvotes: 2

Views: 604

Answers (1)

vs97
vs97

Reputation: 5859

Creating a single parent pom.xml file solved the problem.

Upvotes: 1

Related Questions