Stephen,
Your comment about the classifier defaulting to "" (none) explains it. The
properties files are now getting copied into the dependent project. Thank you!
The only thing that isn't working is the creation of the
"properties.dependency.fileset" using the type filtering:
<echo>Copying properties dependencies</echo>
<artifact:dependencies filesetId="properties.dependency.fileset"
type="properties">
<pom refid="pom" />
</artifact:dependencies>
<copy todir="${dist.project.properties}/secureconfig">
<fileset refid="properties.dependency.fileset" />
</copy>
The type="jar" dependency filtering works fine. If I supply the type="jar",
only jar files end up in that fileset. If I eliminate the type="jar" attribute,
then both the jars and the properties are found in the fileset.
Any ideas on this aspect? As it is, since I can get all of the files, get what
I need done, but I'm just curious why this isn't working.
Thanks again,
Dave Wolf
Java Architect
Gorilla Logic
-----Original Message-----
From: Stephen Connolly [mailto:[email protected]]
Sent: Fri 4/22/2011 12:27 AM
To: Maven Users List
Subject: Re: Retrieving "attached" files.
in a dependencies section in a pom, type defaults to jar and classifier
defaults to "" (ie none)
you would need to add deps for each of the secondary artifacts.
you could probably handle it with the xslt task
- Stephen
---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 22 Apr 2011 00:03, "Dave Wolf" <[email protected]> wrote:
> Hi,
>
> I've attached a couple of property files to my installed jar artifact,
using the artifact:install task (we're using maven-ant-tasks v2.1.2):
>
> <artifact:install file="${distdir.main}/${projectName}.jar">
>
> <pom refid="pom" />
>
> <attach file="${securityConfig.dir}/ESAPI.properties" type="properties"
classifier="global-configuration" />
>
> <attach file="${securityConfig.dir}/validation.properties"
type="properties" classifier="global-validation" />
>
> </artifact:install>
>
>
> The files end up as expected in the local repository. So far, so good.
>
> The problem comes when I attempt to pull them into a dependent component.
I have a target that uses the following tasks:
>
> <echo>Copying securityservices jar dependencies</echo>
> <artifact:dependencies filesetId="jar.dependency.fileset" type="jar">
> <pom file="pom.xml" />
> </artifact:dependencies>
> <echo>Copying securityservices jar dependencies</echo>
> <copy todir="${dir.lib}/securityservices">
> <fileset refid="jar.dependency.fileset" />
> <mapper type="flatten" />
> </copy>
>
> <echo>Copying securityservices properties dependencies</echo>
> <artifact:dependencies filesetId="properties.dependency.fileset"
type="properties">
> <pom refid="pom" />
> </artifact:dependencies>
> <copy todir="${dist.project.properties}/secureconfig">
> <fileset refid="properties.dependency.fileset" />
> </copy>
>
> The "jar.dependency.fileset" works as expected. The
"properties.dependency.fileset" doesn't -- here is the output from the
build:
>
> [echo] Copying securityservices jar dependencies
> [artifact:dependencies] Maven Ant Tasks version: 2.1.2
> [artifact:dependencies] Loading Maven settings file:
/home/dwolf/.m2/settings.xml
> [artifact:dependencies] Loading Maven settings file:
/home/dwolf/devtools/maven/apache-maven-3.0.1/conf/settings.xml
> [artifact:dependencies] Using local repository: /home/dwolf/.m2/repository
> [pom] Loading Maven settings file: /home/dwolf/.m2/settings.xml
> [pom] Loading Maven settings file:
/home/dwolf/devtools/maven/apache-maven-3.0.1/conf/settings.xml
> [artifact:dependencies] Resolving dependencies...
> [artifact:dependencies] Using remote repositories:
> - id=nexus, url=
http://dgwsnxslgmt01.digitalglobe.com:8082/nexus/content/groups/development,
releases=enabled, snapshots=enabled
> com.digitalglobe:FM-PPE-GUI:jar:4.13-SNAPSHOT (selected)
> com.digitalglobe:securityservices:jar:4.13-SNAPSHOT:compile (selected)
> org.owasp.esapi:esapi:jar:2.0_rc10:compile (selected)
> org.beanshell:bsh-core:jar:2.0b4:compile (selected)
> log4j:log4j:jar:1.2.16:compile (selected)
> Setting project property: com.digitalglobe:securityservices:jar ->
/home/dwolf/.m2/repository/com/digitalglobe/securityservices/4.13-SNAPSHOT/securityservices
> -4.13-SNAPSHOT.jar
> Adding reference: com.digitalglobe:securityservices:jar
> Setting project property: org.owasp.esapi:esapi:jar ->
/home/dwolf/.m2/repository/org/owasp/esapi/esapi/2.0_rc10/esapi-2.0_rc10.jar
> Adding reference: org.owasp.esapi:esapi:jar
> Setting project property: org.beanshell:bsh-core:jar ->
/home/dwolf/.m2/repository/org/beanshell/bsh-core/2.0b4/bsh-core-2.0b4.jar
> Adding reference: org.beanshell:bsh-core:jar
> Setting project property: log4j:log4j:jar ->
/home/dwolf/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar
> Adding reference: log4j:log4j:jar
> Adding reference: jar.dependency.fileset
> [echo] Copying securityservices jar dependencies
> fileset: Setup scanner in dir /home/dwolf/.m2/repository with patternSet{
includes:
[com/digitalglobe/securityservices/4.13-SNAPSHOT/securityservices-4.13-201
> 10421.185640-5.jar, org/owasp/esapi/esapi/2.0_rc10/esapi-2.0_rc10.jar,
org/beanshell/bsh-core/2.0b4/bsh-core-2.0b4.jar,
log4j/log4j/1.2.16/log4j-1.2.16.jar] e
> xcludes: [] }
> [copy]
com/digitalglobe/securityservices/4.13-SNAPSHOT/securityservices-4.13-20110421.185640-5.jar
added as securityservices-4.13-20110421.185640-5.jar d
> oesn't exist.
> [copy] log4j/log4j/1.2.16/log4j-1.2.16.jar added as log4j-1.2.16.jar
doesn't exist.
> [copy] org/beanshell/bsh-core/2.0b4/bsh-core-2.0b4.jar added as
bsh-core-2.0b4.jar doesn't exist.
> [copy] org/owasp/esapi/esapi/2.0_rc10/esapi-2.0_rc10.jar added as
esapi-2.0_rc10.jar doesn't exist.
> [copy] No sources found.
> [copy] Copying 4 files to
/home/dwolf/projects/FM-PPE-GUI/lib/securityservices
> [copy] Copying
/home/dwolf/.m2/repository/org/beanshell/bsh-core/2.0b4/bsh-core-2.0b4.jar
to /home/dwolf/projects/FM-PPE-GUI/lib/securityservices/bsh-cor
> e-2.0b4.jar
> [copy] Copying
/home/dwolf/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar to
/home/dwolf/projects/FM-PPE-GUI/lib/securityservices/log4j-1.2.16.jar
> [copy] Copying
/home/dwolf/.m2/repository/com/digitalglobe/securityservices/4.13-SNAPSHOT/securityservices-4.13-20110421.185640-5.jar
to /home/dwolf/proj
>
ects/FM-PPE-GUI/lib/securityservices/securityservices-4.13-20110421.185640-5.jar
> [copy] Copying
/home/dwolf/.m2/repository/org/owasp/esapi/esapi/2.0_rc10/esapi-2.0_rc10.jar
to /home/dwolf/projects/FM-PPE-GUI/lib/securityservices/esapi
> -2.0_rc10.jar
> [echo] Copying securityservices properties dependencies
> [artifact:dependencies] Maven Ant Tasks version: 2.1.2
> [artifact:dependencies] Loading Maven settings file:
/home/dwolf/.m2/settings.xml
> [artifact:dependencies] Loading Maven settings file:
/home/dwolf/devtools/maven/apache-maven-3.0.1/conf/settings.xml
> [artifact:dependencies] Using local repository: /home/dwolf/.m2/repository
> [artifact:dependencies] Resolving dependencies...
> [artifact:dependencies] Using remote repositories:
> - id=nexus, url=
http://dgwsnxslgmt01.digitalglobe.com:8082/nexus/content/groups/development,
releases=enabled, snapshots=enabled
> com.digitalglobe:FM-PPE-GUI:jar:4.13-SNAPSHOT (selected)
> com.digitalglobe:securityservices:jar:4.13-SNAPSHOT:compile (selected)
> org.owasp.esapi:esapi:jar:2.0_rc10:compile (selected)
> org.beanshell:bsh-core:jar:2.0b4:compile (selected)
> log4j:log4j:jar:1.2.16:compile (selected)
> Adding reference: properties.dependency.fileset
> fileset: Setup scanner in dir /home/dwolf/.m2/repository with patternSet{
includes: [] excludes: [**/**] }
> [copy] No sources found.
> [copy] No sources found.
>
> Any ideas? I've checked the documentation and the mail archives. I've
found a few things that were close, but not a solution yet.
>
> Thanks,
> Dave Wolf
> Java Architect
> Gorilla Logic
>
>
> This electronic communication and any attachments may contain confidential
and proprietary
> information of DigitalGlobe, Inc. If you are not the intended recipient,
or an agent or employee
> responsible for delivering this communication to the intended recipient,
or if you have received
> this communication in error, please do not print, copy, retransmit,
disseminate or
> otherwise use the information. Please indicate to the sender that you have
received this
> communication in error, and delete the copy you received. DigitalGlobe
reserves the
> right to monitor any electronic communication sent or received by its
employees, agents
> or representatives.
>
This electronic communication and any attachments may contain confidential and
proprietary
information of DigitalGlobe, Inc. If you are not the intended recipient, or an
agent or employee
responsible for delivering this communication to the intended recipient, or if
you have received
this communication in error, please do not print, copy, retransmit, disseminate
or
otherwise use the information. Please indicate to the sender that you have
received this
communication in error, and delete the copy you received. DigitalGlobe reserves
the
right to monitor any electronic communication sent or received by its
employees, agents
or representatives.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]