Is there a way I can configure maven to always download sources and javadocs?
Answer Posted / Omendra Yadav
Yes, you can configure Maven to download sources and Javadocs by default using the `~/.m2/settings.xml` file:n```xmln<profiles>n <profile>n <id>download-source</id>n <activation>n <activeByDefault>true</activeByDefault>n </activation>n <build>n <plugins>n <plugin>n <groupId>org.apache.maven.plugins</groupId>n <artifactId>maven-dependency-plugin</artifactId>n <version>3.1.2</version>n <executions>n <execution>n <id>get-sources</id>n <goals>n <goal> sources </goal>n </goals>n </execution>n <execution>n <id>get-javadoc</id>n <goals>n <goal> jar </goal>n </goals>n </execution>n </executions>n </plugin>n </plugins>n </build>n </profile>n</profiles>```
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers