小编bet*_*use的帖子

m2e无法使用Artifactory解析原型

我有这种类型的问题:

我已将Artifactory配置为内部代理存储库,一切正常,但现在我无法使用m2Eclipse向导创建新项目.

我用这种方式修改了settings.xml:

<proxies>
 <proxy>
   <id>optional</id>
   <active>true</active>
   <protocol>http</protocol>
   <username></username>
   <password></password>
   <host>myproxymachine.mycompany.com</host>
   <port>8080</port>
   <nonProxyHosts>*.mycompany.com|127.0.0.1</nonProxyHosts>
 </proxy>
</proxies>

<servers>
 <server>
  <username>user</username>
  <password>pwd</password>
  <id>central</id>
</server>
<server>
  <username>user</username>
  <password>pwd</password>
  <id>snapshots</id>
</server>
Run Code Online (Sandbox Code Playgroud)

<profile>
  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>libs-release</name>
      <url>http://srvmmaven.mycompany.com:8081/artifactory/libs-release</url>
    </repository>
    <repository>
      <snapshots />
      <id>snapshots</id>
      <name>libs-snapshot</name>
      <url>http://srvmmaven.mycompany.com:8081/artifactory/libs-snapshot</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>repo</name>
      <url>http://srvmmaven.mycompany.com:8081/artifactory/repo</url>
    </pluginRepository>
    <pluginRepository>
      <snapshots />
      <id>snapshots</id>
      <name>repo</name>
      <url>http://srvmmaven.mycompany.com:8081/artifactory/repo</url>
    </pluginRepository>
  </pluginRepositories>
  <id>artifactory</id>
</profile>
Run Code Online (Sandbox Code Playgroud)

<activeProfiles>
 <activeProfile>artifactory</activeProfile>
</activeProfiles>
Run Code Online (Sandbox Code Playgroud)

当我尝试创建一个新项目时,Eclipse在尝试加载Nexus目录时崩溃.

这是堆栈跟踪:

!ENTRY org.eclipse.core.jobs 4 2 2013-03-27 10:16:19.803
!MESSAGE An internal error occurred during: …
Run Code Online (Sandbox Code Playgroud)

m2eclipse artifactory maven

5
推荐指数
1
解决办法
1万
查看次数

将char指针从C#传递给C++

可能重复:将
char指针从C#传递给c ++函数

我有这种类型的问题:

我有一个带有此签名的c ++函数:

int myfunction ( char* Buffer, int * rotation)
Run Code Online (Sandbox Code Playgroud)

缓冲区参数必须填充空格字符(0x20十六进制)

在C++中,我可以简单地解决这个问题:

char* buffer = (char *)malloc(256);
memset(buffer,0x20,256);
res = myfunction (buffer, rotation);
Run Code Online (Sandbox Code Playgroud)

我试图从C#调用此函数.

这是我的p/invoke声明:

[DllImport("mydll.dll", CharSet = CharSet.Ansi, SetLastError = true)]
private static extern unsafe int myfunction (StringBuilder Buffer, int* RotDegree);
Run Code Online (Sandbox Code Playgroud)

在我的C#类中,我试图这样做:

StringBuilder buffer = new StringBuilder(256);
buffer.Append(' ', 256);
...
myfunction(buffer, rotation);
Run Code Online (Sandbox Code Playgroud)

但它不起作用....

有人可以帮帮我吗?

谢谢.

c# pinvoke pointers

3
推荐指数
1
解决办法
6316
查看次数

标签 统计

artifactory ×1

c# ×1

m2eclipse ×1

maven ×1

pinvoke ×1

pointers ×1