'THe main project can't find internal folders from uploaded custom jar library

  1. I have the main project: project with Automation tests.

  2. I added as a dependency a framework (library with main classes for working with tests/browsers/etc - added via File-Project Structure-Modules-add jar or dependency -> and added my custom JAR file)

  3. After that I run my tests from my project and receive errors like this (in all imports where I import classes from my custom JAR file)

For Example test looks like this:

package tests;

import io.qameta.allure.Story;
import io.qameta.allure.TmsLink;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import uiFramework.base.BaseTest;
import uiFramework.browser.Browser;

import static org.jsoup.helper.Validate.fail;

public class TestUaePass5 extends BaseTest {

    @Test()
    @Tag("stg")
    @TmsLink("TQA-4")
    @Story("TQA-XXX.")
    @DisplayName("Test testUaePass5.")
    public void testUaePass5() {
        Browser.setUrl("https://www.jetbrains.com/pycharm/");
        Browser.setUrl("https://www.jetbrains.com/pycharm/features/");
        fail("User is not logged");
    }
}

And errors looks like this:

package uiFramework.base does not exist
package uiFramework.browser does not exist
cannot find symbol

Attachment of structure: enter image description here

Any thoughts how to solve it? or is it issue with my jar file?

NOTE:

  1. I did invalidate cache and restart of my IDEA
  2. I did mvn clean before running tests
  3. How i created a JAR file: in another project just did: mvn clean install and copied generated JAR file

UPDATE

I installed dependency in another way: added to POM file this:

<dependency>
    <groupId>com.java.framework</groupId>
    <artifactId>javaFramework</artifactId>
    <version>1.0.2</version>
    <scope>system</scope>
    <systemPath>/Users/Downloads/java_auto_framework-1.0.2.jar</systemPath>
</dependency>

But now test can't find internal file: enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source