I am attempting to copy the Jar files and source Jar files into a
non-maven project using the copy-dependencies control.
I have tried several different approaches, and none of them seem to
work.
I have a <configuration> section that looks like this.
<configuration>
<outputDirectory>${libDir}</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
<stripVersion>true</stripVersion>
<includeGroupIds>org.oclc.abstractions,org.oclc.validation</includeGroup
Ids>
<!--<includeClassifies>sources</includeClassifies>-->
<!--<failOnMissingClassifierArtifact>false</failOnMissingClassifierArtif
act>-->
</configuration>
As specified, I get my regular jar files.
If I uncomment the lines, I get the source jar files, and none of the
regular jars.
I then tried to put the 2 configuration sections into <execution>
sections, as follows:
<executions>
<execution>
<id>jars</id>
<phase>package</phase>
<goals><goal>copy-dependencies</goal></goals>
< -- configuration without sources >
</execution>
<execution>
<id>sources</id>
<phase>package</phase>
<goals><goal>copy-dependencies</goal></goals>
< -- configuration with sources >
</execution>
</executions>
The result is that my regular jar files, including that ones not
specified in the includeGroupIds item, are copied into
target/dependency.
In short, as if the configuration section was not specified at all.
What am I missing?