Problem resolving NPanday.Model.Pom

Feb 24, 2010 at 2:27 PM

Hi,

I've been using Maven with java for quite a while now. I've just started evaluating NPanday as a solution for our .NET projects. I've downloaded the 1.1 distro into my maven 2.0.10 installation. I keep getting  the following error when I attempt to run the compile goal:

Downloading: http://repo1.maven.org/maven2/npanday/model/NPanday.Model.Pom/1.1/NPanday.Model.Pom-1.1-4b435f4d76e2f0e6.dll
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] NPANDAY-180-020: Problem in resolving artifact: Assembly Artifact Id = NPanday.Model.Pom, Type = library, Local Path Check = C:\path\.m2\uac\gac_msil\NPanday.Model.Pom\1.1__npanday.model\NPanday.Model.Pom.dll, Message = Unable to download the artifact from any repository

Sure enough the library NPanday.Model.Pom-1.1-4b435f4d76e2f0e6.dll does not exist in the npanday distro, but NPanday.Model.Pom-1.1.dll does exist.

Any idea what may be going wrong?
Thanks

Coordinator
Feb 24, 2010 at 2:35 PM

This was a bug in the release, you can copy the NPanday.Model.Pom-1.1.dll file in the repository to the NPanday.Model.Pom-1.1-4b435f4d76e2f0e6.dll file, that are identical.

Feb 24, 2010 at 3:32 PM
Edited Feb 24, 2010 at 3:34 PM

Thanks for the quick reply. That seems to have got me past that problem.

I;m now getting this failure message:
[INFO] NPANDAY-180-017: Model parameters do not match project dependencies parameters: Model: npanday.plugin:NPanday.Plugin.Msbuild:1.1, Project: npanday.plugin:NPanday.Plugin.Runner:1.1

FYI, I've specified the following plugin:
<plugin>
   <groupId>npanday.plugin</groupId>
   <artifactId>maven-compile-plugin</artifactId>
   <extensions>true</extensions>
</plugin>

Again, any help greatly appreciated.

Thanks

Developer
Feb 24, 2010 at 6:28 PM

Can you provide an example project that demonstrates the problem?  There are some integration tests but maybe you have a use case we've missed.

Also, I'm not sure what you mean by downloading the NPanday distro into your Maven installation.  The repository distro is in remote repository format.   What did you do with it?

-- 
Wendy 

Feb 25, 2010 at 6:50 AM

Ok. I originally thought I could just extract the repository distro into my local repository but that didn't work so I extracted it to the remote repo (managed by archiva). This at least allowed maven to find the artifacts.

Here's the pom.xml, followed my the output from my attempt to run the compile goal on it (content has been anonymised):

<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>MyGroup</groupId>
  <artifactId>My.Project.ArtifactID</artifactId>
  <name>My Project Name</name>
  <version>0.0.2-SNAPSHOT</version>
  <packaging>library</packaging>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>npanday.plugin</groupId>
          <artifactId>maven-compile-plugin</artifactId>
          <version>1.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
 
    <plugins>
  <plugin>
   <groupId>npanday.plugin</groupId>
   <artifactId>maven-compile-plugin</artifactId>
   <version>1.1</version>
   <extensions>true</extensions>
   <!--configuration>
    <frameworkVersion>3.5</frameworkVersion>
   </configuration -->
  </plugin> 
    </plugins>
  </build>
  <distributionManagement>
     <snapshotRepository>
      <id>archiva.snapshots</id>
      <name>Internal Snapshot Repository</name>
      <url>dav:http://myhost/archiva/repository/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>archiva.internal</id>
      <name>Internal Snapshot Repository</name>
      <url>dav:http://myhost/archiva/repository/internal/</url>
    </repository>    
  </distributionManagement> 
  <dependencies>
    <dependency>
  <groupId>NUnit</groupId>
  <artifactId>NUnit.Framework</artifactId>
  <version>2.5.2.9222</version> 
  <type>library</type>  
    </dependency>
  </dependencies> 
</project>

 

 

C:\Workspaces\MyWorkspace>mvn compile
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building My Project Name
[INFO]    task-segment: [compile]
[INFO] ------------------------------------------------------------------------
[INFO] [compile:initialize]
24-Feb-2010 16:41:18 npanday.registry.ConnectionsRepository lazyLoad
INFO: NPANDAY-080-001: Adding data access object: Class Name = npanday.dao.impl.ProjectDaoImpl
24-Feb-2010 16:41:18 npanday.registry.ConnectionsRepository lazyLoad
INFO: NPANDAY-080-004: Connection Start Up: Time = 63
24-Feb-2010 16:41:18 info.aduna.lang.service.ServiceRegistry <init>
INFO: Registered service class org.openrdf.query.parser.serql.SeRQLParserFactory

24-Feb-2010 16:41:18 info.aduna.lang.service.ServiceRegistry <init>
INFO: Registered service class org.openrdf.query.parser.sparql.SPARQLParserFactory
24-Feb-2010 16:41:18 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NUnit.Framework
Downloading: http://myhost/archiva/repository/internal//NUnit/NUnit.Framework/2.5.2.9222/NUnit.Framework-2.5.2.9222.pom
Downloading: http://repo1.maven.org/maven2/NUnit/NUnit.Framework/2.5.2.9222/NUnit.Framework-2.5.2.9222.pom
24-Feb-2010 16:41:19 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-014: Problem in resolving artifact: Assembly Artifact Id = NUnit.Framework, Type = library, Message = Unable to download the artifact from any repository
[INFO] Mojo Execution Time = 563
[INFO] [resolver:resolve]
24-Feb-2010 16:41:20 npanday.registry.ConnectionsRepository lazyLoad
INFO: NPANDAY-080-001: Adding data access object: Class Name = npanday.dao.impl.ProjectDaoImpl
24-Feb-2010 16:41:20 npanday.registry.ConnectionsRepository lazyLoad
INFO: NPANDAY-080-004: Connection Start Up: Time = 47
24-Feb-2010 16:41:20 info.aduna.lang.service.ServiceRegistry <init>
INFO: Registered service class org.openrdf.query.parser.serql.SeRQLParserFactory

24-Feb-2010 16:41:20 info.aduna.lang.service.ServiceRegistry <init>
INFO: Registered service class org.openrdf.query.parser.sparql.SPARQLParserFactory
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NPanday.Model.Pom
Downloading: http://myhost/archiva/repository/internal//npanday/model/NPanday.Model.Pom/1.1/NPanday.Model.Pom-1.1.pom
2K downloaded
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NPanday.Plugin.Msbuild
Downloading: http://myhost/archiva/repository/internal//npanday/plugin/NPanday.Plugin.Msbuild/1.1/NPanday.Plugin.Msbuild-1.1.pom
2K downloaded
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NPanday.Plugin.Runner
Downloading: http://myhost/archiva/repository/internal//npanday/plugin/NPanday.Plugin.Runner/1.1/NPanday.Plugin.Runner-1.1.pom
1K downloaded
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NPanday.Plugin.MojoGenerator
Downloading: http://myhost/archiva/repository/internal//npanday/plugin/NPanday.Plugin.MojoGenerator/1.1/NPanday.Plugin.MojoGenerator-1.1.pom
1K downloaded
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NPanday.Plugin.Loader

Downloading: http://myhost/archiva/repository/internal//npanday/plugin/NPanday.Plugin.Loader/1.1/NPanday.Plugin.Loader-1.1.pom
1K downloaded
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NPanday.Plugin.Settings
Downloading: http://myhost/archiva/repository/internal//npanday/plugin/NPanday.Plugin.Settings/1.1/NPanday.Plugin.Settings-1.1.pom
1K downloaded
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NPanday.Plugin.ResxDownloading: http://myhost/archiva/repository/internal//npanday/plugin/NPanday.Plugin.Resx/1.1/NPanday.Plugin.Resx-1.1.pom
1K downloaded
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NPanday.Plugin.Addin
Downloading: http://myhost/archiva/repository/internal//npanday/plugin/NPanday.Plugin.Addin/1.1/NPanday.Plugin.Addin-1.1.pom
1K downloaded
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NPanday.Plugin.SysRef

Downloading: http://myhost/archiva/repository/internal//npanday/plugin/NPanday.Plugin.SysRef/1.1/NPanday.Plugin.SysRef-1.1.pom
1K downloaded
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NPanday.Plugin.Devenv

Downloading: http://myhost/archiva/repository/internal//npanday/plugin/NPanday.Plugin.Devenv/1.1/NPanday.Plugin.Devenv-1.1.pom
1K downloaded
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-012: Retrieving artifact: Artifact ID  = NPanday.Plugin
Downloading: http://myhost/archiva/repository/internal//npanday/plugin/NPanday.Plugin/1.1/NPanday.Plugin-1.1.pom
2K downloaded
24-Feb-2010 16:41:20 npanday.dao.impl.ProjectDaoImpl storeProjectAndResolveDependencies
INFO: NPANDAY-180-018: Retrieving artifact: Artifact ID  = NPanday.Plugin
Downloading: http://myhost/archiva/repository/internal//npanday/plugin/NPanday.Plugin/1.1/NPanday.Plugin-1.1-4b435f4d76e2f0e6.dll
Downloading: http://repo1.maven.org/maven2/npanday/plugin/NPanday.Plugin/1.1/NPanday.Plugin-1.1-4b435f4d76e2f0e6.dll
java.io.IOException: NPANDAY-180-020: Problem in resolving artifact: Assembly Artifact Id = NPanday.Plugin, Type = library, Local Path Check = C:\MyHome\.m2\uac\gac_msil\NPanday.Plugin\1.1__npanday.plugin\NPanday.Plugin.dll, Message = Unable to download the artifact from any repository
        at npanday.dao.impl.ProjectDaoImpl.storeProjectAndResolveDependencies(ProjectDaoImpl.java:755)
        at npanday.artifact.impl.AssemblyResolverImpl.resolveTransitivelyFor(AssemblyResolverImpl.java:136)
        at npanday.artifact.impl.ArtifactInstallerImpl.resolveAndInstallNetDependenciesForProfile(ArtifactInstallerImpl.java:165)
        at npanday.plugin.resolver.NetDependencyResolverMojo.execute(NetDependencyResolverMojo.java:163)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
        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:597)
        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)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] NPANDAY-180-020: Problem in resolving artifact: Assembly Artifact Id = NPanday.Plugin, Type = library, Local Path Check = C:\MyHome\.m2\uac\gac_msil\NPanday.Plugin\1.1__npanday.plugin\NPanday.Plugin.dll,
Message = Unable to download the artifact from any repository
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Wed Feb 24 16:41:21 GMT 2010
[INFO] Final Memory: 10M/21M
[INFO] ------------------------------------------------------------------------
C:\Workspaces\MyWorkspace>

Coordinator
Feb 25, 2010 at 7:03 AM

this is the same problem you encountered originally. I neglected to mention that there were two artifacts omitted (NPanday.Plugin and NPanday.Model.Pom) - so you'll also need to copy the NPanday.Plugin-1.1.dll to NPanday.Plugin-1.1-4b435f4d76e2f0e6.dll in the repository. Sorry for the inconvenience - I'll update the download page.

Feb 25, 2010 at 10:05 AM

That's fixed the problem :)   I also needed to load the csharp environment by running vsvars32.bat. Now it appears to be behaving.

Thanks for your help
Paul

Coordinator
Feb 25, 2010 at 10:44 AM

Yes, that's right. Much more information on the PATH settings is available in the revised documentation: http://www.npanday.org/docs/1.2-SNAPSHOT/guide/installation/index.html