ikvmnet / ikvm-maven

Support for adding dependencies on Maven artifacts to .NET projects, using IKVM.
MIT License
52 stars 5 forks source link

Does ikvm Maven support LocalRepository? #67

Closed bxjg1987 closed 2 months ago

bxjg1987 commented 3 months ago

I have installed Maven locally, I have set it in Maven's configuration file 'settings. xml' <localRepository>D:\apache-maven-3.9.8\mvn_repo</localRepository> and mvn install xxx.jar successed .

Then use <MavenAdditionalRepositories>$(MavenAdditionalRepositories);aliyunmave1n=D:\\apache-maven-3.9.8\\mvn_repo</MavenAdditionalRepositories> or remove this config

the file: xbrl-json-2.0-SNAPSHOT.zip rename .zip to .jar

Does it not support local warehouses? build error is :

严重性 代码  说明  项目  文件  行   禁止显示状态
错误(活动)      DependencyResolutionException: Failed to collect dependencies at com.pansoft.xbrl:xbrl-json:jar:2.0-SNAPSHOT
   在 org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(RepositorySystemSession session, DependencyRequest request) 位置 DefaultRepositorySystem.java:行号 364
   在 IKVM.Maven.Sdk.Tasks.MavenReferenceItemResolve.ResolveCompileDependencyGraph(IkvmMavenEnvironment maven, RepositorySystemSession session, IList`1 repositories, IList`1 items) 位置 /_/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemResolve.cs:行号 270
   在 IKVM.Maven.Sdk.Tasks.MavenReferenceItemResolve.ResolveReferences(IList`1 repositories, IList`1 items) 位置 /_/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemResolve.cs:行号 206
   在 IKVM.Maven.Sdk.Tasks.MavenReferenceItemResolve.Execute() 位置 /_/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemResolve.cs:行号 164
DependencyCollectionException: Failed to collect dependencies at com.pansoft.xbrl:xbrl-json:jar:2.0-SNAPSHOT
   在 org.eclipse.aether.internal.impl.collect.DependencyCollectorDelegate.collectDependencies(RepositorySystemSession session, CollectRequest request) 位置 DependencyCollectorDelegate.java:行号 262
   在 org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.collectDependencies(RepositorySystemSession session, CollectRequest request) 位置 DefaultDependencyCollector.java:行号 87
   在 org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(RepositorySystemSession session, DependencyRequest request) 位置 DefaultRepositorySystem.java:行号 328
ArtifactDescriptorException: Failed to read artifact descriptor for com.pansoft.xbrl:xbrl-json:jar:2.0-SNAPSHOT
   在 org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(RepositorySystemSession session, ArtifactDescriptorRequest request, ArtifactDescriptorResult result) 位置 DefaultArtifactDescriptorReader.java:行号 258
   在 org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(RepositorySystemSession session, ArtifactDescriptorRequest request) 位置 DefaultArtifactDescriptorReader.java:行号 182
   在 org.eclipse.aether.internal.impl.collect.df.DfDependencyCollector.resolveCachedArtifactDescriptor(DataPool pool, ArtifactDescriptorRequest descriptorRequest, RepositorySystemSession session, Dependency d, Results results, Args args) 位置 DfDependencyCollector.java:行号 382
ArtifactResolutionException: The following artifacts could not be resolved: com.pansoft.xbrl:xbrl-json:pom:2.0-SNAPSHOT (absent): Could not transfer artifact com.pansoft.xbrl:xbrl-json:pom:2.0-SNAPSHOT from/to aliyunmave1n (D:\\apache-maven-3.9.8\\mvn_repo): Cannot access D:\\apache-maven-3.9.8\\mvn_repo with type default using the available connector factories: BasicRepositoryConnectorFactory
   在 org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(RepositorySystemSession session, Collection requests) 位置 DefaultArtifactResolver.java:行号 251
   在 org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(RepositorySystemSession session, ArtifactRequest request) 位置 DefaultArtifactResolver.java:行号 243
   在 org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(RepositorySystemSession session, ArtifactDescriptorRequest request, ArtifactDescriptorResult result) 位置 DefaultArtifactDescriptorReader.java:行号 241
ArtifactTransferException: Could not transfer artifact com.pansoft.xbrl:xbrl-json:pom:2.0-SNAPSHOT from/to aliyunmave1n (D:\\apache-maven-3.9.8\\mvn_repo): Cannot access D:\\apache-maven-3.9.8\\mvn_repo with type default using the available connector factories: BasicRepositoryConnectorFactory

NoRepositoryConnectorException: Cannot access D:\\apache-maven-3.9.8\\mvn_repo with type default using the available connector factories: BasicRepositoryConnectorFactory
   在 org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(RepositorySystemSession session, RemoteRepository repository) 位置 DefaultRepositoryConnectorProvider.java:行号 180
   在 org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(RepositorySystemSession session, ResolutionGroup group) 位置 DefaultArtifactResolver.java:行号 536
NoRepositoryConnectorException: Cannot access D:\\apache-maven-3.9.8\\mvn_repo using the registered transporter factories: HttpTransporterFactory, FileTransporterFactory
   在 org.eclipse.aether.connector.basic.BasicRepositoryConnector..ctor(RepositorySystemSession session, RemoteRepository repository, TransporterProvider transporterProvider, RepositoryLayoutProvider layoutProvider, ChecksumPolicyProvider checksumPolicyProvider, FileProcessor fileProcessor, Map providedChecksumsSources) 位置 BasicRepositoryConnector.java:行号 132
   在 org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory.newInstance(RepositorySystemSession session, RemoteRepository repository) 位置 BasicRepositoryConnectorFactory.java:行号 172
   在 org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(RepositorySystemSession session, RemoteRepository repository) 位置 DefaultRepositoryConnectorProvider.java:行号 122
NoTransporterException: Cannot access D:\\apache-maven-3.9.8\\mvn_repo using the registered transporter factories: HttpTransporterFactory, FileTransporterFactory
   在 org.eclipse.aether.internal.impl.DefaultTransporterProvider.newTransporter(RepositorySystemSession session, RemoteRepository repository) 位置 DefaultTransporterProvider.java:行号 127
   在 org.eclipse.aether.connector.basic.BasicRepositoryConnector..ctor(RepositorySystemSession session, RemoteRepository repository, TransporterProvider transporterProvider, RepositoryLayoutProvider layoutProvider, ChecksumPolicyProvider checksumPolicyProvider, FileProcessor fileProcessor, Map providedChecksumsSources) 位置 BasicRepositoryConnector.java:行号 128
    ConsoleApp3 C:\Users\coocaa\.nuget\packages\ikvm.maven.sdk\1.7.1\buildTransitive\IKVM.Maven.Sdk.targets 96  
wasabii commented 2 months ago

You can add a repository to your settings.xml file, as normal for Maven. Or you can use MavenAdditionalRepositories. The format of which is id=url;id=url