Giriş
artifact
help
wget
wget Goal
Belirtilen dosyası indirir. Sadece <outputDirectory> ve <uri> bilgileri zorunlu. Çalıştırmak için şöyle yaparız
Eğer birden fazla wget varsa veya şöyle yaparız
Eğer logları görmek istersek şöyle yaparız
İndirilen dosya <cacheDirectory> ile belirtilen yerde ön bellekte saklanır. Bu dizinin varsayılan yolu ${local-repo}/.cache/maven-download-plugin olarak. Ben kullanırken D:\Users\user\.m2\.cache\download-maven-plugin dizini altında önbellekte saklanan dosyaları gördüm
<retries> Tag
Varsayılan değer 2. Yani 2 defa indirme işlemini deniyor.
Örnek - Ortak ConfigurationŞöyle yaparız. 1.7.2
bozuk<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.8</version>
<executions>
<execution>
<id>download-zip-file</id>
<phase>process-resources</phase>
<goals>
<goal>wget</goal>
</goals>
</execution>
</executions>
<configuration>
<url>https://.../confluentinc-kafka-connect-datagen-0.6.0.zip</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</plugin>
</plugins>
process-resources aramasında wget ile dosya ${project.build.directory}/classes dizinine indirilir. Bu dizin aslında target/classes dizinine denk gelir.
Örnek - Birden Fazla Dosya İndirme
Şöyle yaparız
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.8</version>
<executions>
<execution>
<id>download-zip-file1</id>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://.../couchbase-kafka-connect-couchbase-4.1.11.zip</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
<execution>
<id>download-zip-file2</id>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://.../neo4j-kafka-connect-neo4j-2.0.1.zip</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
wget process-resources Safhasında Çalışır
mvn test ile çalıştırılan safhalar
şöyle. Yani
wget aslında
test sahasından önce çalışıyor. Eğer bu uygun değilse başka bir safhayı yazmak gerekir.
validate validate the project is correct and all necessary information is available.
initialize initialize build state, e.g. set properties or create directories.
generate-sources generate any source code for inclusion in compilation.
process-sources process the source code, for example to filter any values.
generate-resources generate resources for inclusion in the package.
process-resources copy and process the resources into the destination directory, ready for packaging.
compile compile the source code of the project.
process-classes post-process the generated files from compilation, for example to do bytecode enhancement on Java classes.
generate-test-sources generate any test source code for inclusion in compilation.
process-test-sources process the test source code, for example to filter any values.
generate-test-resources create resources for testing.
process-test-resources copy and process the resources into the test destination directory.
test-compile compile the test source code into the test destination directory
process-test-classes post-process the generated files from test compilation, for example to do bytecode enhancement on Java classes.
test