Issue
Calling mvn clean compile -X
shows the following (few dependencies omitted to stay in question max char size):
[DEBUG] (f) compileSourceRoots = [/Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/src/main/java]
[DEBUG] (f) compilerId = javac
[DEBUG] (f) debug = true
[DEBUG] (f) encoding = UTF-8
[DEBUG] (f) failOnError = true
[DEBUG] (f) failOnWarning = false
[DEBUG] (f) forceJavacCompilerUse = false
[DEBUG] (f) fork = false
[DEBUG] (f) generatedSourcesDirectory = /Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/target/generated-sources/annotations
[DEBUG] (f) mojoExecution = org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile {execution: default-compile}
[DEBUG] (f) optimize = false
[DEBUG] (f) outputDirectory = /Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/target/classes
[DEBUG] (f) parameters = false
[DEBUG] (f) project = MavenProject: it.u1.u2:stockapp:1.2.2-SNAPSHOT @ /Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/pom.xml
[DEBUG] (f) projectArtifact = it.u1.u2:stockapp:jar:1.2.2-SNAPSHOT
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@633a2e99
[DEBUG] (f) showDeprecation = false
[DEBUG] (f) showWarnings = false
[DEBUG] (f) skipMultiThreadWarning = false
[DEBUG] (f) source = 11
[DEBUG] (f) staleMillis = 0
[DEBUG] (s) target = 11
[DEBUG] (f) useIncrementalCompilation = true
[DEBUG] (f) verbose = false
[DEBUG] -- end configuration --
[DEBUG] Using compiler 'javac'.
and also
[DEBUG] Command line options:
[DEBUG] -d /Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/target/classes -classpath /Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/target/classes:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.6.2/spring-boot-starter-web-2.6.2.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter/2.6.2/spring-boot-starter-2.6.2.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot/2.6.2/spring-boot-2.6.2.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.6.2/spring-boot-autoconfigure-2.6.2.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.6.2/spring-boot-starter-logging-2.6.2.jar:/Users/u/.m2/repository/ch/qos/logback/logback-classic/1.2.9/logback-classic-1.2.9.jar:/Users/u/.m2/repository/ch/qos/logback/logback-core/1.2.9/logback-core-1.2.9.jar:/Users/u/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.17.0/log4j-to-slf4j-2.17.0.jar:/Users/u/.m2/repository/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar:/Users/u/.m2/repository/org/slf4j/jul-to-slf4j/1.7.32/jul-to-slf4j-1.7.32.jar:/Users/u/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/Users/u/.m2/repository/org/yaml/snakeyaml/1.29/snakeyaml-1.29.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.6.2/spring-boot-starter-json-2.6.2.jar:/Users/u/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.13.1/jackson-datatype-jdk8-2.13.1.jar:/Users/u/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.13.1/jackson-datatype-jsr310-2.13.1.jar:/Users/u/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.13.1/jackson-module-parameter-names-2.13.1.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.6.2/spring-boot-starter-tomcat-2.6.2.jar:/Users/u/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.56/tomcat-embed-core-9.0.56.jar:/Users/u/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.56/tomcat-embed-websocket-9.0.56.jar:/Users/u/.m2/repository/org/springframework/spring-web/5.3.14/spring-web-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-beans/5.3.14/spring-beans-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-webmvc/5.3.14/spring-webmvc-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-context/5.3.14/spring-context-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-expression/5.3.14/spring-expression-5.3.14.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-security/2.6.2/spring-boot-starter-security-2.6.2.jar:/Users/u/.m2/repository/org/springframework/spring-aop/5.3.14/spring-aop-5.3.14.jar:/Users/u/.m2/repository/org/springframework/security/spring-security-config/5.6.1/spring-security-config-5.6.1.jar:/Users/u/.m2/repository/org/springframework/security/spring-security-core/5.6.1/spring-security-core-5.6.1.jar:/Users/u/.m2/repository/org/springframework/security/spring-security-crypto/5.6.1/spring-security-crypto-5.6.1.jar:/Users/u/.m2/repository/org/springframework/security/spring-security-web/5.6.1/spring-security-web-5.6.1.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-data-jpa/2.6.2/spring-boot-starter-data-jpa-2.6.2.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-aop/2.6.2/spring-boot-starter-aop-2.6.2.jar:/Users/u/.m2/repository/org/aspectj/aspectjweaver/1.9.7/aspectjweaver-1.9.7.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/2.6.2/spring-boot-starter-jdbc-2.6.2.jar:/Users/u/.m2/repository/com/zaxxer/HikariCP/4.0.3/HikariCP-4.0.3.jar:/Users/u/.m2/repository/org/springframework/spring-jdbc/5.3.14/spring-jdbc-5.3.14.jar:/Users/u/.m2/repository/org/springframework/data/spring-data-jpa/2.6.0/spring-data-jpa-2.6.0.jar:/Users/u/.m2/repository/org/springframework/data/spring-data-commons/2.6.0/spring-data-commons-2.6.0.jar:/Users/u/.m2/repository/org/springframework/spring-orm/5.3.14/spring-orm-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-tx/5.3.14/spring-tx-5.3.14.jar:/Users/u/.m2/repository/org/slf4j/slf4j-api/1.7.32/slf4j-api-1.7.32.jar:/Users/u/.m2/repository/org/springframework/spring-aspects/5.3.14/spring-aspects-5.3.14.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-validation/2.6.2/spring-boot-starter-validation-2.6.2.jar:/Users/u/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.56/tomcat-embed-el-9.0.56.jar:/Users/u/.m2/repository/org/hibernate/validator/hibernate-validator/6.2.0.Final/hibernate-validator-6.2.0.Final.jar:/Users/u/.m2/repository/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar:/Users/u/.m2/repository/org/liquibase/liquibase-core/4.5.0/liquibase-core-4.5.0.jar:/Users/u/.m2/repository/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar:/Users/u/.m2/repository/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar:/Users/u/.m2/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.13.1/jackson-module-jaxb-annotations-2.13.1.jar:/Users/u/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.13.1/jackson-annotations-2.13.1.jar:/Users/u/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.13.1/jackson-core-2.13.1.jar:/Users/u/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.13.1/jackson-databind-2.13.1.jar:/Users/u/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar:/Users/u/.m2/repository/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.jar:/Users/u/.m2/repository/org/springframework/spring-core/5.3.14/spring-core-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-jcl/5.3.14/spring-jcl-5.3.14.jar:/Users/u/.m2/repository/org/projectlombok/lombok/1.18.22/lombok-1.18.22.jar:/Users/u/.m2/repository/org/mapstruct/mapstruct-processor/1.3.1.Final/mapstruct-processor-1.3.1.Final.jar:/Users/u/.m2/repository/org/mapstruct/mapstruct/1.3.1.Final/mapstruct-1.3.1.Final.jar: -sourcepath /Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/src/main/java:/Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/target/generated-sources/annotations: -s /Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/target/generated-sources/annotations -g -nowarn -target 11 -source 11 -encoding UTF-8
So I was under the impression that Maven makes this call using javac:
javac -d /Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/target/classes -classpath /Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/target/classes:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.6.2/spring-boot-starter-web-2.6.2.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter/2.6.2/spring-boot-starter-2.6.2.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot/2.6.2/spring-boot-2.6.2.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.6.2/spring-boot-autoconfigure-2.6.2.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.6.2/spring-boot-starter-logging-2.6.2.jar:/Users/u/.m2/repository/ch/qos/logback/logback-classic/1.2.9/logback-classic-1.2.9.jar:/Users/u/.m2/repository/ch/qos/logback/logback-core/1.2.9/logback-core-1.2.9.jar:/Users/u/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.17.0/log4j-to-slf4j-2.17.0.jar:/Users/u/.m2/repository/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar:/Users/u/.m2/repository/org/slf4j/jul-to-slf4j/1.7.32/jul-to-slf4j-1.7.32.jar:/Users/u/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/Users/u/.m2/repository/org/yaml/snakeyaml/1.29/snakeyaml-1.29.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.6.2/spring-boot-starter-json-2.6.2.jar:/Users/u/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.13.1/jackson-datatype-jdk8-2.13.1.jar:/Users/u/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.13.1/jackson-datatype-jsr310-2.13.1.jar:/Users/u/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.13.1/jackson-module-parameter-names-2.13.1.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.6.2/spring-boot-starter-tomcat-2.6.2.jar:/Users/u/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.56/tomcat-embed-core-9.0.56.jar:/Users/u/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.56/tomcat-embed-websocket-9.0.56.jar:/Users/u/.m2/repository/org/springframework/spring-web/5.3.14/spring-web-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-beans/5.3.14/spring-beans-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-webmvc/5.3.14/spring-webmvc-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-context/5.3.14/spring-context-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-expression/5.3.14/spring-expression-5.3.14.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-security/2.6.2/spring-boot-starter-security-2.6.2.jar:/Users/u/.m2/repository/org/springframework/spring-aop/5.3.14/spring-aop-5.3.14.jar:/Users/u/.m2/repository/org/springframework/security/spring-security-config/5.6.1/spring-security-config-5.6.1.jar:/Users/u/.m2/repository/org/springframework/security/spring-security-core/5.6.1/spring-security-core-5.6.1.jar:/Users/u/.m2/repository/org/springframework/security/spring-security-crypto/5.6.1/spring-security-crypto-5.6.1.jar:/Users/u/.m2/repository/org/springframework/security/spring-security-web/5.6.1/spring-security-web-5.6.1.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-data-jpa/2.6.2/spring-boot-starter-data-jpa-2.6.2.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-aop/2.6.2/spring-boot-starter-aop-2.6.2.jar:/Users/u/.m2/repository/org/aspectj/aspectjweaver/1.9.7/aspectjweaver-1.9.7.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/2.6.2/spring-boot-starter-jdbc-2.6.2.jar:/Users/u/.m2/repository/com/zaxxer/HikariCP/4.0.3/HikariCP-4.0.3.jar:/Users/u/.m2/repository/org/springframework/spring-jdbc/5.3.14/spring-jdbc-5.3.14.jar:/Users/u/.m2/repository/jakarta/transaction/jakarta.transaction-api/1.3.3/jakarta.transaction-api-1.3.3.jar:/Users/u/.m2/repository/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3.jar:/Users/u/.m2/repository/org/hibernate/hibernate-core/5.6.3.Final/hibernate-core-5.6.3.Final.jar:/Users/u/.m2/repository/org/jboss/logging/jboss-logging/3.4.2.Final/jboss-logging-3.4.2.Final.jar:/Users/u/.m2/repository/net/bytebuddy/byte-buddy/1.11.22/byte-buddy-1.11.22.jar:/Users/u/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar:/Users/u/.m2/repository/org/jboss/jandex/2.2.3.Final/jandex-2.2.3.Final.jar:/Users/u/.m2/repository/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar:/Users/u/.m2/repository/org/hibernate/common/hibernate-commons-annotations/5.1.2.Final/hibernate-commons-annotations-5.1.2.Final.jar:/Users/u/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.5/jaxb-runtime-2.3.5.jar:/Users/u/.m2/repository/org/glassfish/jaxb/txw2/2.3.5/txw2-2.3.5.jar:/Users/u/.m2/repository/com/sun/istack/istack-commons-runtime/3.0.12/istack-commons-runtime-3.0.12.jar:/Users/u/.m2/repository/org/springframework/data/spring-data-jpa/2.6.0/spring-data-jpa-2.6.0.jar:/Users/u/.m2/repository/org/springframework/data/spring-data-commons/2.6.0/spring-data-commons-2.6.0.jar:/Users/u/.m2/repository/org/springframework/spring-orm/5.3.14/spring-orm-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-tx/5.3.14/spring-tx-5.3.14.jar:/Users/u/.m2/repository/org/slf4j/slf4j-api/1.7.32/slf4j-api-1.7.32.jar:/Users/u/.m2/repository/org/springframework/spring-aspects/5.3.14/spring-aspects-5.3.14.jar:/Users/u/.m2/repository/org/springframework/boot/spring-boot-starter-validation/2.6.2/spring-boot-starter-validation-2.6.2.jar:/Users/u/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.56/tomcat-embed-el-9.0.56.jar:/Users/u/.m2/repository/org/hibernate/validator/hibernate-validator/6.2.0.Final/hibernate-validator-6.2.0.Final.jar:/Users/u/.m2/repository/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar:/Users/u/.m2/repository/org/liquibase/liquibase-core/4.5.0/liquibase-core-4.5.0.jar:/Users/u/.m2/repository/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar:/Users/u/.m2/repository/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar:/Users/u/.m2/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.13.1/jackson-module-jaxb-annotations-2.13.1.jar:/Users/u/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.13.1/jackson-annotations-2.13.1.jar:/Users/u/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.13.1/jackson-core-2.13.1.jar:/Users/u/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.13.1/jackson-databind-2.13.1.jar:/Users/u/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar:/Users/u/.m2/repository/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.jar:/Users/u/.m2/repository/org/springframework/spring-core/5.3.14/spring-core-5.3.14.jar:/Users/u/.m2/repository/org/springframework/spring-jcl/5.3.14/spring-jcl-5.3.14.jar:/Users/u/.m2/repository/org/projectlombok/lombok/1.18.22/lombok-1.18.22.jar:/Users/u/.m2/repository/org/mapstruct/mapstruct-processor/1.3.1.Final/mapstruct-processor-1.3.1.Final.jar:/Users/u/.m2/repository/org/mapstruct/mapstruct/1.3.1.Final/mapstruct-1.3.1.Final.jar: -sourcepath /Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/src/main/java:/Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/target/generated-sources/annotations: -s /Users/u/Desktop/java_dev/projects/stockapp-spring-boot/stockapp/target/generated-sources/annotations -g -nowarn -target 11 -source 11 -encoding UTF-8
But calling it on command line shows:
error: no source files
any help on what it's wrong ?
Solution
I've tried your example:
stockapp-spring-boot (master)$ mvn clean compile
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] stockapp-spring-boot [pom]
[INFO] stockapp [jar]
[INFO]
[INFO] -------------< it.raffaele.esposito:stockapp-spring-boot >--------------
[INFO] Building stockapp-spring-boot 1.2.2-SNAPSHOT [1/2]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ stockapp-spring-boot ---
...
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ stockapp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 14 resources
[INFO] The encoding used to copy filtered properties files have not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:copy-resources (Copy Vue frontend into Spring Boot target static folder) @ stockapp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 8 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ stockapp ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 27 source files to stockapp-spring-boot/stockapp/target/classes
[INFO] stockapp-spring-boot/stockapp/src/main/java/it/raffaele/esposito/app/service/MappingFunctions.java: stockapp-spring-boot/stockapp/src/main/java/it/raffaele/esposito/app/service/MappingFunctions.java uses or overrides a deprecated API.
[INFO] stockapp-spring-boot/stockapp/src/main/java/it/raffaele/esposito/app/service/MappingFunctions.java: Recompile with -Xlint:deprecation for details.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for stockapp-spring-boot 1.2.2-SNAPSHOT:
[INFO]
[INFO] stockapp-spring-boot ............................... SUCCESS [ 0.090 s]
[INFO] stockapp ........................................... SUCCESS [ 21.988 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.339 s
[INFO] Finished at: 2022-01-17T20:12:05+01:00
[INFO] ------------------------------------------------------------------------
and no problems at all...
Answered By - khmarbaise
Answer Checked By - Terry (JavaFixing Volunteer)