I am using maven-antrun-plugin
to download jre. I can download if my configuration is
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>artifactory-jre</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- download file -->
<get src="${download.url}/${download.file}${download.filePostfix}"
dest="${project.build.directory}/${download.file}${download.filePostfix}"
verbose="true"
usetimestamp="true"
username="user"
password="password123"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
but I do not wants to provide the username
and password
in pom
file, I tried adding server entry in the settings.xml
like
<server>
<username>user</username>
<password>password123</password>
<id>artifactory-jre</id>
</server>
but I am getting following exception.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (artifactory-jre) on project name.abuchen.zulu.jre.win32.x86_64: An Ant BuildException has occured: HTTP Authorization failure [ERROR] around Ant part ...... @ 4:315 in C:\Users\Downloads\bundled-jre-master\bundled-jre-master\bundles\name.abuchen.zulu.jre.win32.x86_64\ta rget\antrun\build-main.xml
How can I supply username and password in Ant without being provided in pom file.