Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 220 characters in body
Source Link
Maryo
  • 503
  • 2
  • 15
  • 25

UPDATE 2

I found the problem, I removed :

 <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> 

UPDATE 2

I found the problem, I removed :

 <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> 
added 1153 characters in body
Source Link
Maryo
  • 503
  • 2
  • 15
  • 25
 vishnoummsb |----pom.xml (packaging : pom) -> declare modules API and Utils |----Apiapi | |----pom.xml (packaging : pom) -> declare module Apiapi-slack / parent project | |----Apiapi-slack | |----pom.xml (packaging : pom) -> declare module Apiapi-slack-core / parent Apiapi | |----Apiapi-slack-core | |----pom.xml (packaging : jar) -> java code / parent Apiapi-slack |----Utilsutils | |----pom.xml (packaging : jar) -> java code / parent project / has dependency from api-slack-core | |----Security | |----pom.xml (packaging : jar) -> java code / parent project  

Utils project have dependency to Api-slack-core

 [INFO] vishnou ............................................ SUCCESS [ 0.376 s] [INFO] Api ................................................ SUCCESS [ 0.004 s] [INFO] Api-slack .......................................... SUCCESS [ 0.003 s] [INFO] Api-slack-core ..................................... SUCCESS [ 2.178 s] [INFO] Utils .............................................. FAILURE [ 0.062 s] [INFO] Other .............................................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12.891 s [INFO] Finished at: 2016-12-14T15:16:56+01:00 [INFO] Final Memory: 85M/1207M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Utils: Compilation failure: Compilation failure: [ERROR] /home/user/app/Utils/src/main/java/fr/app/utils/handler/ExceptionHandler.java:[3,39] package fr.app.api.slack.core does not exist [ERROR] /home/user/app/Utils/src/main/java/fr/app/utils/handler/ExceptionHandler.java:[23,13] cannot find symbol [ERROR] symbol: class SlackService [ERROR] location: class fr.app.utils.handler.ExceptionHandler 

How to declare dependency of Api-slack-core in Utils ?

EDIT

My poms

project :

<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"> <modelVersion>4.0.0</modelVersion> <groupId>fr.app</groupId> <artifactId>vishnou</artifactId> <version>1.0-SNAPSHOT</version> <name>vishnou</name> <packaging>pom</packaging> <properties> <encoding>UTF-8</encoding> <java.version>1.8</java.version> <maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.source>${java.version}</maven.compiler.source> <project.build.time>${maven.build.timestamp}</project.build.time> <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format> </properties> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.2.RELEASE</version> </parent> <profiles> <profile> <id>all</id> <activation> <activeByDefault>true</activeByDefault> </activation> <modules> <module>api</module> <module>utils</module> </modules> </profile> </profiles> <dependencyManagement> <dependencies> ...... <dependencies> </dependencyManagement> <repositories> <!--swagger--> <repository> <id>jcenter-snapshots</id> <name>jcenter</name> <url>https://jcenter.bintray.com/</url> </repository> </repositories> </project> 

Api

<?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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>fr.app</groupId> <artifactId>api</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <parent> <groupId>fr.app</groupId> <artifactId>vishnou</artifactId> <version>1.0-SNAPSHOT</version> </parent> <modules> <module>api-slack</module> </modules> </project> 

Api-slack

<?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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>fr.app</groupId> <artifactId>api-slack</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <parent> <groupId>fr.app</groupId> <artifactId>api</artifactId> <version>1.0-SNAPSHOT</version> </parent> <modules> <module>api-slack-core</module> </modules> </project> 

Api-slack-core

<?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~/xsddev/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>fr.app</groupId> <artifactId>api-slack-core</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <parent> <groupId>fr.app</groupId> <artifactId>apimulti-slack</artifactId> <version>1.0sub-SNAPSHOT</version> </parent> <dependencies> ..................... </dependencies> <build> <plugins> <plugin> projets  <groupId>org.springframework.boot</groupId>11:03:48   $ mvn clean install <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build>DskipTests </project>  Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] mmsb [INFO] api [INFO] api-slack [INFO] api-slack-core [INFO] utils [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building mmsb 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ mmsb --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ mmsb --- [INFO] Installing /home/mario/dev/maven-multi-sub-projets/pom.xml to /opt/maven/m2repo/fr/app/mmsb/1.0-SNAPSHOT/mmsb-1.0-SNAPSHOT.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building api 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ api --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ api --- [INFO] Installing /home/mario/dev/maven-multi-sub-projets/api/pom.xml to /opt/maven/m2repo/fr/app/api/1.0-SNAPSHOT/api-1.0-SNAPSHOT.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building api-slack 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ api-slack --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ api-slack --- [INFO] Installing /home/mario/dev/maven-multi-sub-projets/api/api-slack/pom.xml to /opt/maven/m2repo/fr/app/api-slack/1.0-SNAPSHOT/api-slack-1.0-SNAPSHOT.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building api-slack-core 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ api-slack-core --- [INFO] Deleting /home/mario/dev/maven-multi-sub-projets/api/api-slack/api-slack-core/target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ api-slack-core --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ api-slack-core --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to /home/mario/dev/maven-multi-sub-projets/api/api-slack/api-slack-core/target/classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ api-slack-core --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ api-slack-core --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ api-slack-core --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ api-slack-core --- [INFO] Building jar: /home/mario/dev/maven-multi-sub-projets/api/api-slack/api-slack-core/target/api-slack-core-1.0-SNAPSHOT.jar [INFO] [INFO] --- spring-boot-maven-plugin:1.4.2.RELEASE:repackage (default) @ api-slack-core --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ api-slack-core --- [INFO] Installing /home/mario/dev/maven-multi-sub-projets/api/api-slack/api-slack-core/target/api-slack-core-1.0-SNAPSHOT.jar to /opt/maven/m2repo/fr/app/api-slack-core/1.0-SNAPSHOT/api-slack-core-1.0-SNAPSHOT.jar [INFO] Installing /home/mario/dev/maven-multi-sub-projets/api/api-slack/api-slack-core/pom.xml to /opt/maven/m2repo/fr/app/api-slack-core/1.0-SNAPSHOT/api-slack-core-1.0-SNAPSHOT.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building utils 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ utils --- [INFO] Deleting /home/mario/dev/maven-multi-sub-projets/utils/target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ utils --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ utils --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /home/mario/dev/maven-multi-sub-projets/utils/target/classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /home/mario/dev/maven-multi-sub-projets/utils/src/main/java/fr/app/utils/Application.java:[3,29] package fr.app.api.slack.core does not exist [ERROR] /home/mario/dev/maven-multi-sub-projets/utils/src/main/java/fr/app/utils/Application.java:[11,13] cannot find symbol symbol: class SlackService location: class fr.app.utils.Application [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] mmsb ............................................... SUCCESS [ 0.213 s] [INFO] api ................................................ SUCCESS [ 0.005 s] [INFO] api-slack .......................................... SUCCESS [ 0.004 s] [INFO] api-slack-core ..................................... SUCCESS [ 1.558 s] [INFO] utils .............................................. FAILURE [ 0.113 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.197 s [INFO] Finished at: 2016-12-15T11:03:52+01:00 [INFO] Final Memory: 32M/317M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project utils: Compilation failure: Compilation failure: [ERROR] /home/mario/dev/maven-multi-sub-projets/utils/src/main/java/fr/app/utils/Application.java:[3,29] package fr.app.api.slack.core does not exist [ERROR] /home/mario/dev/maven-multi-sub-projets/utils/src/main/java/fr/app/utils/Application.java:[11,13] cannot find symbol [ERROR] symbol: class SlackService [ERROR] location: class fr.app.utils.Application [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :utils 

UtilsHow to declare dependency of api-slack-core in utils ?

<?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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>fr.app</groupId> <artifactId>utils</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <parent> <groupId>fr.app</groupId> <artifactId>vishnou</artifactId> <version>1.0-SNAPSHOT</version> </parent> <dependencies> <dependency> <groupId>fr.app</groupId> <artifactId>api-slack-core</artifactId> <version>1.0-SNAPSHOT</version> </dependency> ..................... </dependencies> </project> 

UPDATE

EDIT 2I upload code in this repository : https://github.com/mmaryo/mmsb

For exemple,The problem is when I add 'Security' module that can importe and compile dependency from Utils, but not from Api-import fr.app.api.slack-.core.SlackService inside fr.app.utils.Application

 vishnou |----pom.xml (packaging : pom) -> declare modules API and Utils |----Api | |----pom.xml (packaging : pom) -> declare module Api-slack / parent project | |----Api-slack | |----pom.xml (packaging : pom) -> declare module Api-slack-core / parent Api | |----Api-slack-core | |----pom.xml (packaging : jar) -> java code / parent Api-slack |----Utils | |----pom.xml (packaging : jar) -> java code / parent project / has dependency from api-slack-core | |----Security | |----pom.xml (packaging : jar) -> java code / parent project  

Utils project have dependency to Api-slack-core

 [INFO] vishnou ............................................ SUCCESS [ 0.376 s] [INFO] Api ................................................ SUCCESS [ 0.004 s] [INFO] Api-slack .......................................... SUCCESS [ 0.003 s] [INFO] Api-slack-core ..................................... SUCCESS [ 2.178 s] [INFO] Utils .............................................. FAILURE [ 0.062 s] [INFO] Other .............................................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12.891 s [INFO] Finished at: 2016-12-14T15:16:56+01:00 [INFO] Final Memory: 85M/1207M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Utils: Compilation failure: Compilation failure: [ERROR] /home/user/app/Utils/src/main/java/fr/app/utils/handler/ExceptionHandler.java:[3,39] package fr.app.api.slack.core does not exist [ERROR] /home/user/app/Utils/src/main/java/fr/app/utils/handler/ExceptionHandler.java:[23,13] cannot find symbol [ERROR] symbol: class SlackService [ERROR] location: class fr.app.utils.handler.ExceptionHandler 

How to declare dependency of Api-slack-core in Utils ?

EDIT

My poms

project :

<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"> <modelVersion>4.0.0</modelVersion> <groupId>fr.app</groupId> <artifactId>vishnou</artifactId> <version>1.0-SNAPSHOT</version> <name>vishnou</name> <packaging>pom</packaging> <properties> <encoding>UTF-8</encoding> <java.version>1.8</java.version> <maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.source>${java.version}</maven.compiler.source> <project.build.time>${maven.build.timestamp}</project.build.time> <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format> </properties> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.2.RELEASE</version> </parent> <profiles> <profile> <id>all</id> <activation> <activeByDefault>true</activeByDefault> </activation> <modules> <module>api</module> <module>utils</module> </modules> </profile> </profiles> <dependencyManagement> <dependencies> ...... <dependencies> </dependencyManagement> <repositories> <!--swagger--> <repository> <id>jcenter-snapshots</id> <name>jcenter</name> <url>https://jcenter.bintray.com/</url> </repository> </repositories> </project> 

Api

<?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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>fr.app</groupId> <artifactId>api</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <parent> <groupId>fr.app</groupId> <artifactId>vishnou</artifactId> <version>1.0-SNAPSHOT</version> </parent> <modules> <module>api-slack</module> </modules> </project> 

Api-slack

<?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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>fr.app</groupId> <artifactId>api-slack</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <parent> <groupId>fr.app</groupId> <artifactId>api</artifactId> <version>1.0-SNAPSHOT</version> </parent> <modules> <module>api-slack-core</module> </modules> </project> 

Api-slack-core

<?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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>fr.app</groupId> <artifactId>api-slack-core</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <parent> <groupId>fr.app</groupId> <artifactId>api-slack</artifactId> <version>1.0-SNAPSHOT</version> </parent> <dependencies> ..................... </dependencies> <build> <plugins> <plugin>  <groupId>org.springframework.boot</groupId>   <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> 

Utils

<?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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>fr.app</groupId> <artifactId>utils</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <parent> <groupId>fr.app</groupId> <artifactId>vishnou</artifactId> <version>1.0-SNAPSHOT</version> </parent> <dependencies> <dependency> <groupId>fr.app</groupId> <artifactId>api-slack-core</artifactId> <version>1.0-SNAPSHOT</version> </dependency> ..................... </dependencies> </project> 

EDIT 2 :

For exemple, I add 'Security' module that can importe and compile dependency from Utils, but not from Api-slack-core

 mmsb |----pom.xml (packaging : pom) -> declare modules API and Utils |----api | |----pom.xml (packaging : pom) -> declare module api-slack / parent project | |----api-slack | |----pom.xml (packaging : pom) -> declare module api-slack-core / parent api | |----api-slack-core | |----pom.xml (packaging : jar) -> java code / parent api-slack |----utils | |----pom.xml (packaging : jar) -> java code / parent project / has dependency from api-slack-core | 
 ~/dev/maven-multi-sub-projets  11:03:48 $ mvn clean install -DskipTests  Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] mmsb [INFO] api [INFO] api-slack [INFO] api-slack-core [INFO] utils [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building mmsb 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ mmsb --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ mmsb --- [INFO] Installing /home/mario/dev/maven-multi-sub-projets/pom.xml to /opt/maven/m2repo/fr/app/mmsb/1.0-SNAPSHOT/mmsb-1.0-SNAPSHOT.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building api 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ api --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ api --- [INFO] Installing /home/mario/dev/maven-multi-sub-projets/api/pom.xml to /opt/maven/m2repo/fr/app/api/1.0-SNAPSHOT/api-1.0-SNAPSHOT.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building api-slack 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ api-slack --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ api-slack --- [INFO] Installing /home/mario/dev/maven-multi-sub-projets/api/api-slack/pom.xml to /opt/maven/m2repo/fr/app/api-slack/1.0-SNAPSHOT/api-slack-1.0-SNAPSHOT.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building api-slack-core 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ api-slack-core --- [INFO] Deleting /home/mario/dev/maven-multi-sub-projets/api/api-slack/api-slack-core/target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ api-slack-core --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ api-slack-core --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to /home/mario/dev/maven-multi-sub-projets/api/api-slack/api-slack-core/target/classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ api-slack-core --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ api-slack-core --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ api-slack-core --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ api-slack-core --- [INFO] Building jar: /home/mario/dev/maven-multi-sub-projets/api/api-slack/api-slack-core/target/api-slack-core-1.0-SNAPSHOT.jar [INFO] [INFO] --- spring-boot-maven-plugin:1.4.2.RELEASE:repackage (default) @ api-slack-core --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ api-slack-core --- [INFO] Installing /home/mario/dev/maven-multi-sub-projets/api/api-slack/api-slack-core/target/api-slack-core-1.0-SNAPSHOT.jar to /opt/maven/m2repo/fr/app/api-slack-core/1.0-SNAPSHOT/api-slack-core-1.0-SNAPSHOT.jar [INFO] Installing /home/mario/dev/maven-multi-sub-projets/api/api-slack/api-slack-core/pom.xml to /opt/maven/m2repo/fr/app/api-slack-core/1.0-SNAPSHOT/api-slack-core-1.0-SNAPSHOT.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building utils 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ utils --- [INFO] Deleting /home/mario/dev/maven-multi-sub-projets/utils/target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ utils --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ utils --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /home/mario/dev/maven-multi-sub-projets/utils/target/classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /home/mario/dev/maven-multi-sub-projets/utils/src/main/java/fr/app/utils/Application.java:[3,29] package fr.app.api.slack.core does not exist [ERROR] /home/mario/dev/maven-multi-sub-projets/utils/src/main/java/fr/app/utils/Application.java:[11,13] cannot find symbol symbol: class SlackService location: class fr.app.utils.Application [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] mmsb ............................................... SUCCESS [ 0.213 s] [INFO] api ................................................ SUCCESS [ 0.005 s] [INFO] api-slack .......................................... SUCCESS [ 0.004 s] [INFO] api-slack-core ..................................... SUCCESS [ 1.558 s] [INFO] utils .............................................. FAILURE [ 0.113 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.197 s [INFO] Finished at: 2016-12-15T11:03:52+01:00 [INFO] Final Memory: 32M/317M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project utils: Compilation failure: Compilation failure: [ERROR] /home/mario/dev/maven-multi-sub-projets/utils/src/main/java/fr/app/utils/Application.java:[3,29] package fr.app.api.slack.core does not exist [ERROR] /home/mario/dev/maven-multi-sub-projets/utils/src/main/java/fr/app/utils/Application.java:[11,13] cannot find symbol [ERROR] symbol: class SlackService [ERROR] location: class fr.app.utils.Application [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :utils 

How to declare dependency of api-slack-core in utils ?

UPDATE

I upload code in this repository : https://github.com/mmaryo/mmsb

The problem is when I import fr.app.api.slack.core.SlackService inside fr.app.utils.Application

deleted 1 character in body
Source Link
Maryo
  • 503
  • 2
  • 15
  • 25

For exemple, I add 'Security' module that can importe dansand compile dependency from Utils, but not from Api-slack-core

For exemple, I add 'Security' module that can importe dans compile dependency from Utils, but not from Api-slack-core

For exemple, I add 'Security' module that can importe and compile dependency from Utils, but not from Api-slack-core

added 64 characters in body
Source Link
Maryo
  • 503
  • 2
  • 15
  • 25
Loading
edited body
Source Link
Maryo
  • 503
  • 2
  • 15
  • 25
Loading
added 986 characters in body
Source Link
Maryo
  • 503
  • 2
  • 15
  • 25
Loading
added 986 characters in body
Source Link
Maryo
  • 503
  • 2
  • 15
  • 25
Loading
added 986 characters in body
Source Link
Maryo
  • 503
  • 2
  • 15
  • 25
Loading
Source Link
Maryo
  • 503
  • 2
  • 15
  • 25
Loading