Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't find class from maven dependency project
    primarykey
    data
    text
    <p>[CLOSED - I had to move classes from test/java to main/java and update the maven repository via the IDE "maven options"]</p> <p>I'm new to maven and inexperienced with java development. I'm using IntelliJ Idea as IDE. I'm using Maven 3.0.4.</p> <p>I created a "project A" and a "project B", each with some classes. Now when I try to create a dependency in <em>project A</em> to a class in <em>project B</em> I can't seem to find any classes that are part of <em>project B</em>. When I check the maven repository I can see that a .jar file is created based on <em>project B</em>.</p> <p>To clarify: when adding a dependency to <em>project B</em> I <strong>do</strong> find an artifact called "project B" but I <strong>cannot</strong> find any classes that are part of <em>project B</em>.</p> <p>It doesn't seem like I can access and use any of the classes that are part of <em>project B</em> inside <em>project A</em> which would make this installation worthless.</p> <p>--</p> <p>Please tell me what information I should include for you to help me solve this problem.</p> <p>[EDIT] Here is the <em>project A</em>'s pom with a dependency on <em>project B</em>. However I either don't understand how to use it in my project or it doesn't work. While I can use IntelliJ's functionality to find and add the artifact, intelliJ can't seem to find any classes that are part of <em>project B</em> (while it does find classes that are part of other pre-defined packages in the maven repository):</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;planet&lt;/groupId&gt; &lt;artifactId&gt;planet&lt;/artifactId&gt; &lt;version&gt;1.0&lt;/version&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;toolbox&lt;/groupId&gt; &lt;artifactId&gt;toolbox&lt;/artifactId&gt; &lt;version&gt;1.0&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/project&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload