You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2008/06/05 06:38:55 UTC
[jira] Updated: (NMAVEN-85) Install plugin fails when parent
project is not in parent directory
[ http://jira.codehaus.org/browse/NMAVEN-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated NMAVEN-85:
-------------------------------
Fix Version/s: 0.14 (Unreleased)
> Install plugin fails when parent project is not in parent directory
> --------------------------------------------------------------------
>
> Key: NMAVEN-85
> URL: http://jira.codehaus.org/browse/NMAVEN-85
> Project: NMaven
> Issue Type: Bug
> Affects Versions: 0.14 (Unreleased)
> Environment: NMaven head (revision 570776).
> Maven 2.0.6
> Windows Vista.
> Microsoft Visual Studio 2005 version 8.0.50727.867
> Reporter: Peter Nilsson
> Fix For: 0.14 (Unreleased)
>
>
> I have a fairly big project built with Maven and the parent of a Maven project is not always located in the parent directory. However this seems to cause problems when installing libraries with NMaven.
> To try it out created two small projects, foo and bar, in sibling directories.
> The parent project is foo with the following pom:
> <?xml version="1.0"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>nmaventest</groupId>
> <artifactId>foo</artifactId>
> <packaging>pom</packaging>
> <version>1.0.0.0</version>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.dotnet.plugins</groupId>
> <artifactId>maven-compile-plugin</artifactId>
> <extensions>true</extensions>
> </plugin>
> </plugins>
> </build>
> </project>
> I install it into local repo with "mvn install".
> The child project, bar, has this pom:
> <?xml version="1.0"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <groupId>nmaventest</groupId>
> <artifactId>foo</artifactId>
> <version>1.0.0.0</version>
> </parent>
> <artifactId>bar</artifactId>
> <packaging>library</packaging>
> <version>1.0.0.0</version>
> </project>
> The bar project contains a single C# file in src/main/csharp.
> Building project bar with "mvn package" works fine and creates bar.dll.
> However, installing the dll with "mvn install" cause the following error:
> [INFO] NMAVEN-1001-000: Failed to install artifacts
> Embedded error: NMAVEN-001-014: Unable to store model: Message = C:\temp\nmaventest\bar\..\pom.xml (The system cannot find the file specified)
> It seems like the install plugin tries to install the parent pom as well which of course fails as it is not always available (except in local repo).
> The end of "mvn install -X":
> [DEBUG] Configuring mojo 'org.apache.maven.dotnet.plugins:maven-install-plugin:0.14-SNAPSHOT:install' -->
> [DEBUG] (f) isGacInstall = false
> [DEBUG] (f) localRepository = C:\Users\peterni\.m2\repository
> [DEBUG] (f) pomFile = C:\temp\nmaventest\bar\pom.xml
> [DEBUG] (f) profile = GACUTIL
> [DEBUG] (f) project = org.apache.maven.project.MavenProject@ee9a3606
> [DEBUG] -- end configuration --
> [INFO] [install:install]
> 2007-aug-29 19:39:53 org.apache.maven.dotnet.registry.ConnectionsRepository lazyLoad
> INFO: NMAVEN-080-001: Adding data access object: Class Name = org.apache.maven.dotnet.dao.impl.ProjectDaoImpl
> 2007-aug-29 19:39:53 org.apache.maven.dotnet.registry.ConnectionsRepository lazyLoad
> INFO: NMAVEN-080-004: Connection Start Up: Time = 67
> [INFO] NMAVEN-001-007: Installing file into repository: File = C:\temp\nmaventest\bar\target\bar.dll
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] NMAVEN-1001-000: Failed to install artifacts
> Embedded error: NMAVEN-001-014: Unable to store model: Message = C:\temp\nmaventest\bar\..\pom.xml (The system cannot find the file specified)
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: NMAVEN-1001-000: Failed to install artifacts
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: NMAVEN-1001-000: Failed to install artifacts
> at org.apache.maven.dotnet.plugin.install.InstallerMojo.execute(InstallerMojo.java:177)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
> ... 16 more
> Caused by: org.apache.maven.artifact.installer.ArtifactInstallationException: NMAVEN-001-014: Unable to store model: Message = C:\temp\nmaventest\bar\..\pom.xml
> (The system cannot find the file specified)
> at org.apache.maven.dotnet.artifact.impl.ArtifactInstallerImpl.installArtifactWithPom(ArtifactInstallerImpl.java:394)
> at org.apache.maven.dotnet.plugin.install.InstallerMojo.execute(InstallerMojo.java:173)
> ... 18 more
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 18 seconds
> [INFO] Finished at: Wed Aug 29 19:39:53 CEST 2007
> [INFO] Final Memory: 10M/21M
> [INFO] ------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira