emrapi-api dependency breaks Maven artifact generated module

Hi all, @raff,

I would like to report that the simple addition of

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>emrapi-api</artifactId>
  <scope>provided</scope>
</dependency>

in the api/pom.xml of a new module generated with the Maven artifact will break its build. It is breaking the OpenMRS service unit test that it automatically generated.

Any suggestions?



Looking closer shows that, somehow **emrapi-api-1.11.1.jar** is missing: ```` Failed to read candidate component class: URL [jar:file:.m2/repository/org/openmrs/module/emrapi-api/1.11.1/emrapi-api-1.11.1.jar! ``` If I try to depend on the distro 2.4-SNAPSHOT (instead of 2.3, and which I don't want to do anyway) in my main POM in order to bring in **emrapi-api-1.11.1.jar**, it pushes me a notch further as then it is **emrapi-api-1.13.1.jar** that becomes missing... For now I will just `@Ignore` that test, but that is merely a workaround...

@mksd, could you please share complete logs from your build? Does adding

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>emrapi-api-1.11</artifactId>
  <scope>provided</scope>
</dependency>

fix the problem?

Hi @raff,

Yes thanks. And also quite a lot of other additions in the api/pom.xml as well… See below: ###pom.xml

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>emrapi-api-1.11</artifactId>
  <version>1.11.1</version>
  <scope>provided</scope>
</dependency>

That is because distro 2.3 does not have it yet. ###api/pom.xml

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>emrapi-api</artifactId>
  <scope>provided</scope>
</dependency>

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>emrapi-api-1.11</artifactId>
  <scope>provided</scope>
</dependency>

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>reporting-api</artifactId>
</dependency>

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>calculation-api</artifactId>
</dependency>

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>serialization.xstream-api</artifactId>
</dependency>

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>providermanagement-api</artifactId>
</dependency>

###omod/pom.xml

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>emrapi-api</artifactId>
  <scope>provided</scope>
</dependency>

The last addition in omod/pom.xml was necessary because I am injecting my ModuleProperties (or rather my class that extends it) in a controller.