maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Entner Harald" <Entner.Har...@afb.de>
Subject AW: what copy-dependecies add -jar to artifact subDirectory
Date Thu, 21 Jan 2010 09:42:13 GMT
what do you want to do? even this is not possible with the dependency-copy plugin it could
be possible with another plugin (maybe the assembly plugin but this is just a guess, i have
no idea if it could work with that). 

IMHO the odds are bad, because they already added the feature to put the jars in seperate
directories, so i'm wondering why you need them in a directory that is not followed by -${packaging}.
(that's why i asked what you want to do with them) 

But if you really need that feature, and there is no other way to solve your problem (you
could always write your own mojo and pass the dependencies to it) AND (the most important
part) you have some reasonable matters you could make a feature request [1]

[1] http://jira.codehaus.org/browse/MDEP

-----Ursprüngliche Nachricht-----
Von: eyal edri [mailto:eyal.edri@gmail.com] 
Gesendet: Donnerstag, 21. Januar 2010 10:35
An: Maven Users List
Betreff: Re: what copy-dependecies add -jar to artifact subDirectory

How can i propose a fix/feature to have a new tag:
<includeFileTypeInSubDir> ?

and what are the odds it will be accepted :) ?

On Thu, Jan 21, 2010 at 11:31 AM, Entner Harald <Entner.Harald@afb.de>wrote:

> ok, i just realised, that my last answer was not useful (i was too fast and
> i realized that it was your intention to place that line, that i  suggested
> to remove). So here another one with some more sense. Afaics, you can't
> change this behaviour, except changing the source.
>
> From the plugin site:
>
> useSubDirectoryPerArtifact      boolean
>
> Place each file in a separate subdirectory. (example
> /outputDirectory/junit-3.8.1-jar)
> So there it is mentioned that the directory is prefixed with a "-jar".
>
>
> I checked the source code and in the class DependencyUtils
>
>            if ( useSubdirsPerType )
> .           {
> .               sb.append( artifact.getType() ).append( "s" ).append(
> File.separatorChar );
>            }
>            if ( useSubdirPerArtifact )
>            {
>                String artifactString = getDependencyId( artifact,
> removeVersion );
>                sb.append( artifactString ).append( File.separatorChar );
>            }
>
> So i don't think it is possible.
>
>
> -----Ursprüngliche Nachricht-----
> Von: Entner Harald [mailto:Entner.Harald@afb.de]
> Gesendet: Donnerstag, 21. Januar 2010 10:18
> An: Maven Users List
> Betreff: AW: what copy-dependecies add -jar to artifact subDirectory
>
> remove this line
> <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact> ;)
>
> -----Ursprüngliche Nachricht-----
> Von: eyal edri [mailto:eyal.edri@gmail.com]
> Gesendet: Donnerstag, 21. Januar 2010 09:08
> An: Maven Users List
> Betreff: what copy-dependecies add -jar to artifact subDirectory
>
> i'm using the following configuration in my pom:
>
> <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-dependency-plugin</artifactId>
>        <executions>
>          <execution>
>            <id>copy-dependencies</id>
>            <phase>install</phase>
>            <goals>
>              <goal>copy-dependencies</goal>
>            </goals>
>            <configuration>
>              <!-- TBD - CHANGE WITH ENV VAR FROM .BASHRC -->
>              <outputDirectory>/usr/lib/ctch/java</outputDirectory>
>              <overWriteReleases>true</overWriteReleases>
>              <overWriteSnapshots>true</overWriteSnapshots>
>              <overWriteIfNewer>true</overWriteIfNewer>
>              <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
>              <stripVersion>true</stripVersion>
>              <copyPom>true</copyPom>
>            </configuration>
>          </execution>
>        </executions>
>      </plugin>
>
> but maven added a '-jar' suffix to the subdirectories:
>
> [INFO] Copying junit-4.7.jar to /usr/lib/ctch/java/*junit-jar*/junit.jar
> [INFO] Copying junit-4.7.pom to /usr/lib/ctch/java/junit-jar/junit.pom
> [INFO] Copying log4j-1.2.14.jar to /usr/lib/ctch/java/*log4j-jar*/log4j.jar
>
> anyone knows how to remove it?
>
> --
> Eyal Edri
>



-- 
Eyal Edri
Mime
View raw message