NL没有看到使用NetBeans构建的扩展

时间:2017-08-21 14:26:17

标签: netlogo

我已经使用NetBeans编译了我的扩展,并且编译工作正常,我已经包含了一个清单文件,该文件存在于最终的jar中:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Class-Manager: it.unibo.ai.Manager
Extension-Name: DialogueSimulatorExt
Created-By: Apache Maven 3.0.5
Build-Jdk: 1.8.0_65
NetLogo-Extension-API-Version: 6.0

我的jar名为DialogueSimulatorExt.jar,位于DialogueSimulatorExt文件夹中,后者与我的NL模型位于同一文件夹中。

到目前为止一切顺利,但是当我尝试在我的模型中加载扩展时,系统会提示您输入“转到NetLogo扩展的下载站点”

我不明白问题可能是什么,因为除了通用的“我没有找到它”之外没有任何暗示 - 即使它存在......这种行为的常见原因是什么?

这是我的DefaultClassManager:

package it.unibo.ai;

import asp4j.solver.object.Filter;
import asp4j.solver.object.ObjectSolver;
import org.nlogo.api.*;

public class Manager extends DefaultClassManager {

    public static String rulefile_clingo = null;
    public static Filter filter = null;
    public static ObjectSolver solver = null;
    public static ProblemSentences ps = null;

    @Override
    public void load(PrimitiveManager primitiveManager) {

        primitiveManager.addPrimitive("setup-solver", new SetupSolver());
        primitiveManager.addPrimitive("setup-beliefs", new SetupInitialBeliefs());
        primitiveManager.addPrimitive("dialogue", new AgentDialogue());

    }

}

这是我的POM:

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>it.unibo.ai</groupId>
<artifactId>DialogueSimulatorExt</artifactId>
<version>0.1</version>
<packaging>jar</packaging>

<dependencies>
    <dependency>
        <groupId>org.nlogo</groupId>
        <artifactId>netlogo</artifactId>
        <version>6.0.1</version>
        <exclusions>
            <exclusion>
                <groupId>org.nlogo</groupId>
                <artifactId>parser</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.picocontainer</groupId>
        <artifactId>picocontainer</artifactId>
        <version>2.13.6</version>
    </dependency>
    <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm-all</artifactId>
        <version>5.0.3</version>
    </dependency>
    <dependency>
        <groupId>org.scala-lang.modules</groupId>
        <artifactId>scala-parser-combinators_2.12</artifactId>
        <version>1.0.6</version>
    </dependency>
    <dependency>
        <groupId>org.parboiled</groupId>
        <artifactId>parboiled_2.12</artifactId>
        <version>2.1.4</version>
    </dependency>
    <dependency>
        <groupId>agentdialogues</groupId>
        <artifactId>agentdialogues</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </dependency>
    <dependency>
        <groupId>asp4j</groupId>
        <artifactId>asp4j</artifactId>
        <version>0.0.5</version>
    </dependency>
</dependencies>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>

<repositories>
    <repository>
        <id>typesafereleases</id>
        <name>typesafe-releases</name>
        <url>http://repo.typesafe.com/typesafe/releases/</url>
        <layout>default</layout>
    </repository>
    <repository>
        <id>bintraynetlogoNetLogoJVM</id>
        <name>bintray-netlogo-NetLogo-JVM</name>
        <url>https://dl.bintray.com/netlogo/NetLogo-JVM/</url>
        <layout>default</layout>
    </repository>
</repositories>

<name>DialogueSimulatorExt</name>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.4</version>
            <configuration>
                <archive>
                    <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
                </archive>
            </configuration>            
        </plugin>
    </plugins>
</build>

1 个答案:

答案 0 :(得分:2)

尝试将DialogueSimulatorExt目录放入Netlogo的扩展程序文件夹中:/Applications/NetLogo X.X/extensions/