我想要包含工件中的所有以下依赖项,但它仅下载itext-xtra-5.1.1.jar
。
<!-- https://mvnrepository.com/artifact/com.itextpdf/itext-xtra -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-xtra</artifactId>
<version>5.1.2</version>
</dependency>
答案 0 :(得分:0)
打开# make a var for files in current folder
arr=(./*)
CSVRETURN=""
# simple loop to iterate files
for ((i=0; i<${#arr[@]}; i++)); do
#do something to each element of array
CSVRETURN="$CSVRETURN","${arr[$i]}"
done
echo $CSVRETURN
。如果不存在则创建
<user_profile>/.m2/settings.xml
从命令行
执行此操作<settings>
<profiles>
<profile>
<id>downloadJavadoc_source_profile</id>
<properties>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>downloadJavadoc_source_profile</activeProfile>
</activeProfiles>
</settings>
答案 1 :(得分:0)
使用<classifier>
添加相关的source
和javadoc
依赖项,即:
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-xtra</artifactId>
<version>5.1.1</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-xtra</artifactId>
<version>5.1.1</version>
<classifier>javadoc</classifier>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-xtra</artifactId>
<version>5.1.1</version>
<classifier>sources</classifier>
</dependency>
将所有3个jar 作为依赖项下载:
我还建议使用属性设置版本以避免重复,例如:
<version>${itext-xtra.version}</version>