I have two maven modules, AppManager and myApp. They are located in the same directory locally and are not available in the company's online repo, as they are intended for testing. In IntelliJ, I have no problem using the fields and methods of the AppManager and there are no error messages. I am exporting com.mycompany.appManager to my pom file for myApp. However, when I create outside the IDE, i.e. mvn clean install, there is an error for the package com.mycompany.appManagerdoes not exist, and then related errors for unresolved characters for using public fields defined in appManager. How can I solve this problem? I tried to export and add the dependency, but these two solutions do not work.
pom.xml:
<moduleVersion>4.0.0</moduleVersion>
<parent>
<groupId>com.myCompany</groupId>
<artifactId>myApp</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.myCompany.myApp</groupId>
<artifactId>com.myCompany.myApp.impl</artifactId>
<packaging>bundle</packaging>
<name>My App Implementation</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>
com.myCompany.appmanager
</Export-Package>
<Bundle-Activator>com.mycompany.myapp.impl.component</Bundle-Activator>
</instructions>
</configuration>
</plugin>
</plugin>
</build>
Compilation Error:
[ERROR] /root/Desktop/apps/myapp/impl/src/main/java/com/mycompany/myApp/impl/component.java:[11,49] package com.mycompany.appmanager does not exist
[ERROR] /root/Desktop/apps/myapp/impl/src/main/java/com/mycompany/myApp/impl/component.java:[64,49] cannot find symbol
symbol: variable AppManagerModule
location: class com/mycompany/myApp/impl/component