Hello,

I had sent an email to this list a week ago (see below).

I finally found out where the problem is (by running maven in debug mode: mvn 
-X).

I think I'm going to file an issue against dependency:unpack-dependencies, 
because it treats a file URL badly.

Expanding a dependency fails when I specify the local repository in 
settings.xml like this:

<localRepository>file:///C:/Documents and 
Settings/myuser/.m2/repository</localRepository>

The file URL is honored when artifacts are downloaded, but not when a 
dependency is expanded. This is a bug, or at least inconsistent.

So artifacts go to C:/Documents and Settings/myuser/.m2/repository, which is as 
expected.

But an artifact is expanded to the directory where mvn was executed, instead of 
.unpacked-modules in the repository.

All goes well if I specify the local repository without the file:/// prefix:

<localRepository>C:/Documents and 
Settings/myuser/.m2/repository</localRepository>

Heiko


PS: Here is a bit of the debug output which shows what went wrong with 
outputDirectory:

[DEBUG] Configuring mojo 
'org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-4:unpack-dependencies'
 -->
[DEBUG]   (f) excludeTransitive = false
[DEBUG]   (s) failOnMissingClassifierArtifact = true
[DEBUG]   (f) includeTypes = zip
[DEBUG]   (s) local = [local] -> file:///C:/Documents and 
Settings/myuser/.m2/repository
[DEBUG]   (s) markersDirectory = 
C:\src\myproject\trunk\core-cpp\subproject\target\dependency-maven-plugin-markers
[DEBUG]   (f) outputAbsoluteArtifactFilename = false
[DEBUG]   (s) outputDirectory = 
C:\src\myproject\trunk\core-cpp\subproject\file:\C:\Documents and 
Settings\myuser\.m2\repository\.unpacked-modules
[DEBUG]   (f) overWriteIfNewer = true
[DEBUG]   (f) overWriteReleases = false
[DEBUG]   (f) overWriteSnapshots = false
[DEBUG]   (f) project = MavenProject: 
com.company.project.core-cpp:ams-activemq:4.0.0-0-SNAPSHOT @ 
C:\src\myproject\trunk\core-cpp\subproject\pom.xml
[DEBUG]   (f) reactorProjects = [MavenProject: 
com.company.project.core-cpp:ams-activemq:4.0.0-0-SNAPSHOT @ 
C:\src\myproject\trunk\core-cpp\subproject\pom.xml]
[DEBUG]   (s) remoteRepos = [[central-snapshot] -> 
http://localrepo.intra.net/maven-proxy/repository/snapshot, [central] -> 
http://localrepo.intra.net/maven-proxy/repository/release]
[DEBUG]   (f) silent = false
[DEBUG]   (s) stripVersion = false
[DEBUG]   (f) type = java-source
[DEBUG]   (s) useRepositoryLayout = false
[DEBUG]   (s) useSubDirectoryPerArtifact = true
[DEBUG]   (s) useSubDirectoryPerType = false
[DEBUG] -- end configuration --
[INFO] [dependency:unpack-dependencies {execution: unpack-dependencies}]
[DEBUG] Including Transitive Dependencies.
[DEBUG] Including only Types: zip
[INFO] Expanding: C:\Documents and 
Settings\myuser\.m2\repository\com\company\project\activemq-cpp\2.1.3_02\activemq-cpp-2.1.3_02-win32.zip
 into null


> -----Ursprüngliche Nachricht-----
> Von: Selber, Heiko (NSN - DE/Berlin) 
> Gesendet: Mittwoch, 9. April 2008 15:17
> An: '[email protected]'
> Betreff: Expanding ... into null
> 
> Hello,
> 
> I have a problem with an artifact that is downloaded from a 
> local repository server, but is not expanded. So when its 
> contents are accessed, they are not found.
> 
> Apparently, there is a problem with a null pointer. The 
> console says this:
> 
> [INFO] Expanding: 
> c:\.m2\repository\com\company\project\activemq-cpp\2.1.3_02\ac
> tivemq-cpp-2.1.3_02-win32.zip into null
> 
> I would have expected something like expanding ... into 
> c:\.m2\repository\.unpacked-modules\activemq-cpp-2.1.3_02-win32
> 
> There is more of the console output at the end.
> 
> I am entirely unsure about the reason. What disturbs me is 
> that the expansion works sporadically. I'd have preferred a 
> reproducible error.
> 
> I googled a similar problem reported on this list a while 
> ago, which was solved by cleaning first. But it happens for 
> me also when I execute 'mvn clean install'.
> 
> Could the problem be related to the fact that the target in 
> question is a Visual C++ compilation? But I'd assume that 
> expanding a dependency is independent of the type of the 
> target, right?
> 
> Can anybody enlighten me?
> 
> Thanks in advance,
> 
> Heiko
> 
> PS: I use Maven 2.0.8 on Windows XP.
> 
> ---- pom.xml extract ----
>       
>               <dependency>
>                       <groupId>com.company.project</groupId>
>                       <artifactId>activemq-cpp</artifactId>
>                       <classifier>${operating-system}</classifier>
>                       <version>${activemq-version}</version>
>                       <type>zip</type>
>                       <scope>compile</scope>
>               </dependency> 
> 
> 
> 
> ---- extract of console output ----
> 
> [INFO] 
> --------------------------------------------------------------
> ----------
> [INFO] Building [...]
> [INFO]    task-segment: [clean, install]
> [INFO] 
> --------------------------------------------------------------
> ----------
> [INFO] [clean:clean]
> [INFO] Deleting directory 
> C:\src\myproject\trunk\core-cpp\subproject\target
> Downloading: 
> http://localrepo.intra.net/maven-proxy/repository/release/com/
company/project/activemq-cpp/2.1.3_02/activemq-cpp-2.1.3_02.pom
> 3K downloaded
> Downloading: 
> http://localrepo.intra.net/maven-proxy/repository/release/com/
company/project/activemq-cpp/2.1.3_02/activemq-cpp-2.1.3_02-win32.zip
> 1636K downloaded
> [INFO] [antrun:run {execution: clean}]
> [INFO] Executing tasks
>      [echo] Build script state: clean
> 
> clean:
> 
>      [exec] Microsoft (R) Development Environment,  Version 7.10.6030.
>      [exec] Copyright (C) Microsoft Corp 1984-2001. Alle 
> Rechte vorbehalten.
>      [exec] ------ Bereinigen gestartet: Projekt: subproject, 
> Konfiguration: Release Win32 ------
> 
>      [exec] Die Zwischen- und Ausgabedateien f?r das Projekt 
> "subproject" mit der Konfiguration "Release|Win32" werden gelöscht.
>      [exec]
> 
> 
>      [exec] ---------------------- Fertig ----------------------
> 
>      [exec]     Bereinigigung: 1 erfolgreich, 0 
> fehlgeschlagen, 0 ?bersprungen
>      [exec]
> 
> [INFO] Executed tasks
> [INFO] [dependency:unpack-dependencies {execution: 
> unpack-dependencies}]
> [INFO] Expanding: 
> c:\.m2\repository\com\company\project\activemq-cpp\2.1.3_02\ac
> tivemq-cpp-2.1.3_02-win32.zip into null
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] No sources to compile
> [INFO] [antrun:run {execution: nones}]
> [INFO] Executing tasks
> 
> compile.sequential:
> 
>      [exec] Microsoft (R) Development Environment,  Version 7.10.6030.
>      [exec] Copyright (C) Microsoft Corp 1984-2001. Alle 
> Rechte vorbehalten.
>      [exec] ------ Erstellen gestartet: Projekt: subproject, 
> Konfiguration: Release Win32 ------
> 
>      [exec] Kompilieren...
>      [exec] build.cpp
>      [exec] 
> src\main\cpp\com\company\project\core\ams\activemq\jms\Message
> .h(20) : fatal error C1083: Include-Datei kann nicht geöffnet 
> werden: 'cms/Message.h': No such file or directory
>      [exec]
>      [exec] Das Build-Protokoll wurde unter 
> "file://C:\src\myproject\trunk\core-cpp\subproject\target\obj\
> Release\vs2003\BuildLog.htm" gespeichert.
>      [exec] subproject - 1 Fehler, 0 Warnung(en)
> 
> 
>      [exec] ---------------------- Fertig ----------------------
> 
>      [exec]     Erstellen: 0 erfolgreich, 1 fehlgeschlagen, 0 
> ?bersprungen
>      [exec]
> 
> [INFO] 
> --------------------------------------------------------------
> ----------
> [ERROR] BUILD ERROR
> [INFO] 
> --------------------------------------------------------------
> ----------
> [INFO] Error executing ant tasks
> 
> Embedded error: The following error occurred while executing 
> this line:
> C:\src\myproject\trunk\build\build.xml:97: exec returned: 1
> [INFO] 
> --------------------------------------------------------------
> ----------
> [INFO] For more information, run Maven with the -e switch
> [INFO] 
> --------------------------------------------------------------
> ----------
> [INFO] Total time: 4 minutes 26 seconds
> [INFO] Finished at: Fri Apr 04 12:24:31 CEST 2008
> [INFO] Final Memory: 67M/124M
> [INFO] 
> --------------------------------------------------------------
> ----------
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to