Maven prevents denpendency compilation

I have a regular jar that includes java sources; Maven tries to compile when it is created. How to skip compiling source code in jar file? I tried such as exclude with some pattern in the compiler file and in the source directory, but I had no luck. Thank!

C05

+3
source share
2 answers

This is normal behavior that looks all the way to classes to compile the source files, if only an option is provided (and this will be the solution here). javac-sourcepath

, Jira -sourcepath javac Maven Compiler (. MCOMPILER-98). :

<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <configuration>
    <compilerArguments>
      <sourcepath>${project.basedir}/src/main/java</sourcepath>
    </compilerArguments>
  </configuration>
</plugin>
+3

? maven ? ? , , ?

0

Source: https://habr.com/ru/post/1735629/


All Articles