java src path in pom.xml while there are multiple modules

Multi tool use
Multi tool use





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have a two modules project with following pom.xml files but intellij idea does not detect java files and treat them as general file, where did I make mistake?



project structure



and the pom file for module-a is






<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>myproj</groupId>
<artifactId>parent</artifactId>
<version>0.4.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>module-a</artifactId>
<name>module-a</name>
<packaging>jar</packaging>
<description>module-a</description>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>





and the pom file for the module-b is






<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>myproj</groupId>
<artifactId>parent</artifactId>
<version>0.4.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>module-b</artifactId>
<name>module-b</name>
<packaging>jar</packaging>
<description>module-b</description>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>





and the parent pom file is






<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>myproj</groupId>
<artifactId>parent</artifactId>
<name>myproj.parent</name>
<packaging>pom</packaging>
<version>0.4.0-SNAPSHOT</version>

<scm>
<connection>scm:svn:http://localhost:7070/svn/myproj/branches/test</connection>
<developerConnection>scm:svn:http://localhost:7070/svn/myproj/branches/test</developerConnection>
</scm>

<modules>
<module>module-a</module>
<module>module-b</module>
</modules>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>utf-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>utf-8</encoding>
<showWarnings>true</showWarnings>
<fork>true</fork>
<optimize>true</optimize>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.2.2</version>
<configuration>
<useReleaseProfile>true</useReleaseProfile>
<releaseProfiles>complete</releaseProfiles>
<username>${username}</username>
<password>${password}</password>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<properties>
<!-- Dependency(s) Versions -->
<org.slf4j>1.7.21</org.slf4j>
<kotlin.version>1.2.21</kotlin.version>
<!-- Dependency(s) Versions -->
<!-- Configurations -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<proguard.skip>true</proguard.skip>
<debug.skip>false</debug.skip>
<product.name>myproj</product.name>
</properties>

</project>












share|improve this question





























    0















    I have a two modules project with following pom.xml files but intellij idea does not detect java files and treat them as general file, where did I make mistake?



    project structure



    and the pom file for module-a is






    <?xml version="1.0" encoding="UTF-8"?>
    <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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
    <groupId>myproj</groupId>
    <artifactId>parent</artifactId>
    <version>0.4.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>module-a</artifactId>
    <name>module-a</name>
    <packaging>jar</packaging>
    <description>module-a</description>

    <dependencies>
    <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.21</version>
    <scope>compile</scope>
    </dependency>
    <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.11</version>
    <scope>test</scope>
    </dependency>
    </dependencies>

    <build>
    <pluginManagement>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
    <testFailureIgnore>true</testFailureIgnore>
    </configuration>
    </plugin>
    </plugins>
    </pluginManagement>
    </build>

    </project>





    and the pom file for the module-b is






    <?xml version="1.0" encoding="UTF-8"?>
    <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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
    <groupId>myproj</groupId>
    <artifactId>parent</artifactId>
    <version>0.4.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>module-b</artifactId>
    <name>module-b</name>
    <packaging>jar</packaging>
    <description>module-b</description>

    <dependencies>
    <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.21</version>
    <scope>compile</scope>
    </dependency>
    <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.11</version>
    <scope>test</scope>
    </dependency>
    </dependencies>

    <build>
    <pluginManagement>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
    <testFailureIgnore>true</testFailureIgnore>
    </configuration>
    </plugin>
    </plugins>
    </pluginManagement>
    </build>

    </project>





    and the parent pom file is






    <?xml version="1.0" encoding="UTF-8"?>
    <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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>myproj</groupId>
    <artifactId>parent</artifactId>
    <name>myproj.parent</name>
    <packaging>pom</packaging>
    <version>0.4.0-SNAPSHOT</version>

    <scm>
    <connection>scm:svn:http://localhost:7070/svn/myproj/branches/test</connection>
    <developerConnection>scm:svn:http://localhost:7070/svn/myproj/branches/test</developerConnection>
    </scm>

    <modules>
    <module>module-a</module>
    <module>module-b</module>
    </modules>

    <build>
    <pluginManagement>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
    <source>1.5</source>
    <target>1.5</target>
    </configuration>
    </plugin>
    </plugins>
    </pluginManagement>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-resources-plugin</artifactId>
    <version>2.6</version>
    <configuration>
    <encoding>utf-8</encoding>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
    <source>1.6</source>
    <target>1.6</target>
    <encoding>utf-8</encoding>
    <showWarnings>true</showWarnings>
    <fork>true</fork>
    <optimize>true</optimize>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <version>2.2.2</version>
    <configuration>
    <useReleaseProfile>true</useReleaseProfile>
    <releaseProfiles>complete</releaseProfiles>
    <username>${username}</username>
    <password>${password}</password>
    </configuration>
    </plugin>
    </plugins>
    </build>

    <dependencies>
    <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>3.8.1</version>
    <scope>test</scope>
    </dependency>
    </dependencies>

    <properties>
    <!-- Dependency(s) Versions -->
    <org.slf4j>1.7.21</org.slf4j>
    <kotlin.version>1.2.21</kotlin.version>
    <!-- Dependency(s) Versions -->
    <!-- Configurations -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <proguard.skip>true</proguard.skip>
    <debug.skip>false</debug.skip>
    <product.name>myproj</product.name>
    </properties>

    </project>












    share|improve this question

























      0












      0








      0








      I have a two modules project with following pom.xml files but intellij idea does not detect java files and treat them as general file, where did I make mistake?



      project structure



      and the pom file for module-a is






      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <parent>
      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <version>0.4.0-SNAPSHOT</version>
      <relativePath>../pom.xml</relativePath>
      </parent>

      <artifactId>module-a</artifactId>
      <name>module-a</name>
      <packaging>jar</packaging>
      <description>module-a</description>

      <dependencies>
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.21</version>
      <scope>compile</scope>
      </dependency>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <testFailureIgnore>true</testFailureIgnore>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>

      </project>





      and the pom file for the module-b is






      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <parent>
      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <version>0.4.0-SNAPSHOT</version>
      <relativePath>../pom.xml</relativePath>
      </parent>

      <artifactId>module-b</artifactId>
      <name>module-b</name>
      <packaging>jar</packaging>
      <description>module-b</description>

      <dependencies>
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.21</version>
      <scope>compile</scope>
      </dependency>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <testFailureIgnore>true</testFailureIgnore>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>

      </project>





      and the parent pom file is






      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <name>myproj.parent</name>
      <packaging>pom</packaging>
      <version>0.4.0-SNAPSHOT</version>

      <scm>
      <connection>scm:svn:http://localhost:7070/svn/myproj/branches/test</connection>
      <developerConnection>scm:svn:http://localhost:7070/svn/myproj/branches/test</developerConnection>
      </scm>

      <modules>
      <module>module-a</module>
      <module>module-b</module>
      </modules>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
      <source>1.5</source>
      <target>1.5</target>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-resources-plugin</artifactId>
      <version>2.6</version>
      <configuration>
      <encoding>utf-8</encoding>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>2.3.2</version>
      <configuration>
      <source>1.6</source>
      <target>1.6</target>
      <encoding>utf-8</encoding>
      <showWarnings>true</showWarnings>
      <fork>true</fork>
      <optimize>true</optimize>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-release-plugin</artifactId>
      <version>2.2.2</version>
      <configuration>
      <useReleaseProfile>true</useReleaseProfile>
      <releaseProfiles>complete</releaseProfiles>
      <username>${username}</username>
      <password>${password}</password>
      </configuration>
      </plugin>
      </plugins>
      </build>

      <dependencies>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <properties>
      <!-- Dependency(s) Versions -->
      <org.slf4j>1.7.21</org.slf4j>
      <kotlin.version>1.2.21</kotlin.version>
      <!-- Dependency(s) Versions -->
      <!-- Configurations -->
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <proguard.skip>true</proguard.skip>
      <debug.skip>false</debug.skip>
      <product.name>myproj</product.name>
      </properties>

      </project>












      share|improve this question














      I have a two modules project with following pom.xml files but intellij idea does not detect java files and treat them as general file, where did I make mistake?



      project structure



      and the pom file for module-a is






      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <parent>
      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <version>0.4.0-SNAPSHOT</version>
      <relativePath>../pom.xml</relativePath>
      </parent>

      <artifactId>module-a</artifactId>
      <name>module-a</name>
      <packaging>jar</packaging>
      <description>module-a</description>

      <dependencies>
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.21</version>
      <scope>compile</scope>
      </dependency>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <testFailureIgnore>true</testFailureIgnore>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>

      </project>





      and the pom file for the module-b is






      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <parent>
      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <version>0.4.0-SNAPSHOT</version>
      <relativePath>../pom.xml</relativePath>
      </parent>

      <artifactId>module-b</artifactId>
      <name>module-b</name>
      <packaging>jar</packaging>
      <description>module-b</description>

      <dependencies>
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.21</version>
      <scope>compile</scope>
      </dependency>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <testFailureIgnore>true</testFailureIgnore>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>

      </project>





      and the parent pom file is






      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <name>myproj.parent</name>
      <packaging>pom</packaging>
      <version>0.4.0-SNAPSHOT</version>

      <scm>
      <connection>scm:svn:http://localhost:7070/svn/myproj/branches/test</connection>
      <developerConnection>scm:svn:http://localhost:7070/svn/myproj/branches/test</developerConnection>
      </scm>

      <modules>
      <module>module-a</module>
      <module>module-b</module>
      </modules>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
      <source>1.5</source>
      <target>1.5</target>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-resources-plugin</artifactId>
      <version>2.6</version>
      <configuration>
      <encoding>utf-8</encoding>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>2.3.2</version>
      <configuration>
      <source>1.6</source>
      <target>1.6</target>
      <encoding>utf-8</encoding>
      <showWarnings>true</showWarnings>
      <fork>true</fork>
      <optimize>true</optimize>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-release-plugin</artifactId>
      <version>2.2.2</version>
      <configuration>
      <useReleaseProfile>true</useReleaseProfile>
      <releaseProfiles>complete</releaseProfiles>
      <username>${username}</username>
      <password>${password}</password>
      </configuration>
      </plugin>
      </plugins>
      </build>

      <dependencies>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <properties>
      <!-- Dependency(s) Versions -->
      <org.slf4j>1.7.21</org.slf4j>
      <kotlin.version>1.2.21</kotlin.version>
      <!-- Dependency(s) Versions -->
      <!-- Configurations -->
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <proguard.skip>true</proguard.skip>
      <debug.skip>false</debug.skip>
      <product.name>myproj</product.name>
      </properties>

      </project>








      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <parent>
      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <version>0.4.0-SNAPSHOT</version>
      <relativePath>../pom.xml</relativePath>
      </parent>

      <artifactId>module-a</artifactId>
      <name>module-a</name>
      <packaging>jar</packaging>
      <description>module-a</description>

      <dependencies>
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.21</version>
      <scope>compile</scope>
      </dependency>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <testFailureIgnore>true</testFailureIgnore>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>

      </project>





      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <parent>
      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <version>0.4.0-SNAPSHOT</version>
      <relativePath>../pom.xml</relativePath>
      </parent>

      <artifactId>module-a</artifactId>
      <name>module-a</name>
      <packaging>jar</packaging>
      <description>module-a</description>

      <dependencies>
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.21</version>
      <scope>compile</scope>
      </dependency>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <testFailureIgnore>true</testFailureIgnore>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>

      </project>





      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <parent>
      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <version>0.4.0-SNAPSHOT</version>
      <relativePath>../pom.xml</relativePath>
      </parent>

      <artifactId>module-b</artifactId>
      <name>module-b</name>
      <packaging>jar</packaging>
      <description>module-b</description>

      <dependencies>
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.21</version>
      <scope>compile</scope>
      </dependency>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <testFailureIgnore>true</testFailureIgnore>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>

      </project>





      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <parent>
      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <version>0.4.0-SNAPSHOT</version>
      <relativePath>../pom.xml</relativePath>
      </parent>

      <artifactId>module-b</artifactId>
      <name>module-b</name>
      <packaging>jar</packaging>
      <description>module-b</description>

      <dependencies>
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.21</version>
      <scope>compile</scope>
      </dependency>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <testFailureIgnore>true</testFailureIgnore>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>

      </project>





      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <name>myproj.parent</name>
      <packaging>pom</packaging>
      <version>0.4.0-SNAPSHOT</version>

      <scm>
      <connection>scm:svn:http://localhost:7070/svn/myproj/branches/test</connection>
      <developerConnection>scm:svn:http://localhost:7070/svn/myproj/branches/test</developerConnection>
      </scm>

      <modules>
      <module>module-a</module>
      <module>module-b</module>
      </modules>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
      <source>1.5</source>
      <target>1.5</target>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-resources-plugin</artifactId>
      <version>2.6</version>
      <configuration>
      <encoding>utf-8</encoding>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>2.3.2</version>
      <configuration>
      <source>1.6</source>
      <target>1.6</target>
      <encoding>utf-8</encoding>
      <showWarnings>true</showWarnings>
      <fork>true</fork>
      <optimize>true</optimize>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-release-plugin</artifactId>
      <version>2.2.2</version>
      <configuration>
      <useReleaseProfile>true</useReleaseProfile>
      <releaseProfiles>complete</releaseProfiles>
      <username>${username}</username>
      <password>${password}</password>
      </configuration>
      </plugin>
      </plugins>
      </build>

      <dependencies>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <properties>
      <!-- Dependency(s) Versions -->
      <org.slf4j>1.7.21</org.slf4j>
      <kotlin.version>1.2.21</kotlin.version>
      <!-- Dependency(s) Versions -->
      <!-- Configurations -->
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <proguard.skip>true</proguard.skip>
      <debug.skip>false</debug.skip>
      <product.name>myproj</product.name>
      </properties>

      </project>





      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <groupId>myproj</groupId>
      <artifactId>parent</artifactId>
      <name>myproj.parent</name>
      <packaging>pom</packaging>
      <version>0.4.0-SNAPSHOT</version>

      <scm>
      <connection>scm:svn:http://localhost:7070/svn/myproj/branches/test</connection>
      <developerConnection>scm:svn:http://localhost:7070/svn/myproj/branches/test</developerConnection>
      </scm>

      <modules>
      <module>module-a</module>
      <module>module-b</module>
      </modules>

      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
      <source>1.5</source>
      <target>1.5</target>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-resources-plugin</artifactId>
      <version>2.6</version>
      <configuration>
      <encoding>utf-8</encoding>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>2.3.2</version>
      <configuration>
      <source>1.6</source>
      <target>1.6</target>
      <encoding>utf-8</encoding>
      <showWarnings>true</showWarnings>
      <fork>true</fork>
      <optimize>true</optimize>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-release-plugin</artifactId>
      <version>2.2.2</version>
      <configuration>
      <useReleaseProfile>true</useReleaseProfile>
      <releaseProfiles>complete</releaseProfiles>
      <username>${username}</username>
      <password>${password}</password>
      </configuration>
      </plugin>
      </plugins>
      </build>

      <dependencies>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
      </dependency>
      </dependencies>

      <properties>
      <!-- Dependency(s) Versions -->
      <org.slf4j>1.7.21</org.slf4j>
      <kotlin.version>1.2.21</kotlin.version>
      <!-- Dependency(s) Versions -->
      <!-- Configurations -->
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <proguard.skip>true</proguard.skip>
      <debug.skip>false</debug.skip>
      <product.name>myproj</product.name>
      </properties>

      </project>






      maven intellij-idea pom.xml






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 29 '18 at 5:43









      anonimanonim

      1,21342037




      1,21342037
























          1 Answer
          1






          active

          oldest

          votes


















          0














          The default sources directory would be src/main/java. In your case, it is just src in each module.



          You can include following line in each module's pom file.



          <sourceDirectory>${project.build.directory}/src</sourceDirectory>


          Or you can try marking each src directory as Sources Root.



          enter image description here






          share|improve this answer


























          • thanks for the answer, it helped me but the correct path is <sourceDirectory>src</sourceDirectory>

            – anonim
            Nov 29 '18 at 7:08











          • Do not do this. Move the java sources into src/main/java instead...and follow the convention...

            – khmarbaise
            Nov 29 '18 at 7:34














          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53532577%2fjava-src-path-in-pom-xml-while-there-are-multiple-modules%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          The default sources directory would be src/main/java. In your case, it is just src in each module.



          You can include following line in each module's pom file.



          <sourceDirectory>${project.build.directory}/src</sourceDirectory>


          Or you can try marking each src directory as Sources Root.



          enter image description here






          share|improve this answer


























          • thanks for the answer, it helped me but the correct path is <sourceDirectory>src</sourceDirectory>

            – anonim
            Nov 29 '18 at 7:08











          • Do not do this. Move the java sources into src/main/java instead...and follow the convention...

            – khmarbaise
            Nov 29 '18 at 7:34


















          0














          The default sources directory would be src/main/java. In your case, it is just src in each module.



          You can include following line in each module's pom file.



          <sourceDirectory>${project.build.directory}/src</sourceDirectory>


          Or you can try marking each src directory as Sources Root.



          enter image description here






          share|improve this answer


























          • thanks for the answer, it helped me but the correct path is <sourceDirectory>src</sourceDirectory>

            – anonim
            Nov 29 '18 at 7:08











          • Do not do this. Move the java sources into src/main/java instead...and follow the convention...

            – khmarbaise
            Nov 29 '18 at 7:34
















          0












          0








          0







          The default sources directory would be src/main/java. In your case, it is just src in each module.



          You can include following line in each module's pom file.



          <sourceDirectory>${project.build.directory}/src</sourceDirectory>


          Or you can try marking each src directory as Sources Root.



          enter image description here






          share|improve this answer















          The default sources directory would be src/main/java. In your case, it is just src in each module.



          You can include following line in each module's pom file.



          <sourceDirectory>${project.build.directory}/src</sourceDirectory>


          Or you can try marking each src directory as Sources Root.



          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 29 '18 at 6:30

























          answered Nov 29 '18 at 6:17









          pkgajulapallipkgajulapalli

          470620




          470620













          • thanks for the answer, it helped me but the correct path is <sourceDirectory>src</sourceDirectory>

            – anonim
            Nov 29 '18 at 7:08











          • Do not do this. Move the java sources into src/main/java instead...and follow the convention...

            – khmarbaise
            Nov 29 '18 at 7:34





















          • thanks for the answer, it helped me but the correct path is <sourceDirectory>src</sourceDirectory>

            – anonim
            Nov 29 '18 at 7:08











          • Do not do this. Move the java sources into src/main/java instead...and follow the convention...

            – khmarbaise
            Nov 29 '18 at 7:34



















          thanks for the answer, it helped me but the correct path is <sourceDirectory>src</sourceDirectory>

          – anonim
          Nov 29 '18 at 7:08





          thanks for the answer, it helped me but the correct path is <sourceDirectory>src</sourceDirectory>

          – anonim
          Nov 29 '18 at 7:08













          Do not do this. Move the java sources into src/main/java instead...and follow the convention...

          – khmarbaise
          Nov 29 '18 at 7:34







          Do not do this. Move the java sources into src/main/java instead...and follow the convention...

          – khmarbaise
          Nov 29 '18 at 7:34






















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53532577%2fjava-src-path-in-pom-xml-while-there-are-multiple-modules%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          CCFudrHtTQ,41lHtW1oR13rchgPF4WH0HYvR917iERl9fYHMK6xGgV
          HpJfkeFERBLXie,XKVEXEAf0JxukZkNw 6bp4my0Js 3AX1 fmMoewZRwg,zExNIbjW,fq

          Popular posts from this blog

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Command to identify the expired API token and generates the new token in shell