简体   繁体   English

Arch Linux ARMv7-使用Maven构建Pi4J在JNI处失败

[英]Arch Linux ARMv7 - Pi4J build with maven failed at JNI

I am trying to build Pi4J on Raspberry Pi2 model B with Arch linux ARM installed. 我正在尝试在安装了Arch Linux ARM的Raspberry Pi2模型B上构建Pi4J。 Everything works fine, except for the build of the JNI natural libraries. 除了构建JNI自然库之外,其他所有东西都工作正常。 Here is the error message (and part of the log): 这是错误消息(以及部分日志):

    [INFO] --- maven-antrun-plugin:1.3:run (build-native-so) @ pi4j-native ---
[INFO] Executing tasks

build-libpi4j.so:
     [echo] Building native libpi4j shared library for ABI: hard-float
  [sshexec] Connecting to 192.168.178.94:22
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Pi4J :: Parent POM ................................. SUCCESS [01:04 min]
[INFO] Pi4J :: JNI Native Library ......................... FAILURE [ 18.906 s]
[INFO] Pi4J :: Java Library (Core) ........................ SKIPPED
[INFO] Pi4J :: GPIO Extension ............................. SKIPPED
[INFO] Pi4J :: Device Abstractions ........................ SKIPPED
[INFO] Pi4J :: Java Examples .............................. SKIPPED
[INFO] Pi4J :: OSGi Service ............................... SKIPPED
[INFO] Pi4J :: Distribution ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:50 min
[INFO] Finished at: 2015-08-11T20:50:37+00:00
[INFO] Final Memory: 11M/29M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (build-native-so) on project pi4j-native: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /media/temp/pi4j-arch/pi4j-native/build.xml:10: com.jcraft.jsch.JSchException: Algorithm negotiation fail
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (build-native-so) on project pi4j-native: An Ant BuildException has occured: The following error occurred while executing this line:
/media/temp/pi4j-arch/pi4j-native/build.xml:10: com.jcraft.jsch.JSchException: Algorithm negotiation fail
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: The following error occurred while executing this line:
/media/temp/pi4j-arch/pi4j-native/build.xml:10: com.jcraft.jsch.JSchException: Algorithm negotiation fail
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:131)
        at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:98)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 20 more
Caused by: The following error occurred while executing this line:
/media/temp/pi4j-arch/pi4j-native/build.xml:10: com.jcraft.jsch.JSchException: Algorithm negotiation fail
        at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:418)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at net.sf.antcontrib.logic.IfTask.execute(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:118)
        ... 23 more
Caused by: /media/temp/pi4j-arch/pi4j-native/build.xml:10: com.jcraft.jsch.JSchException: Algorithm negotiation fail
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(SSHExec.java:188)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
        ... 53 more
Caused by: com.jcraft.jsch.JSchException: Algorithm negotiation fail
        at com.jcraft.jsch.Session.receive_kexinit(Session.java:520)
        at com.jcraft.jsch.Session.connect(Session.java:286)
        at com.jcraft.jsch.Session.connect(Session.java:150)
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession(SSHBase.java:212)
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(SSHExec.java:158)
        ... 66 more

I tried everything I could figure out, but I cannot make it work. 我尝试了所有可以解决的问题,但无法使其正常工作。 Please help :) 请帮忙 :)

EDIT: 编辑:

After some further investigation, I am starting to have an idea about what these messages mean and how it works. 经过一些进一步的调查,我开始对这些消息的含义及其工作原理有所了解。 This is the part of the build.xml that gives the error: 这是build.xml中给出错误的部分:

            <!-- ensure the target directory is empty on the Raspberry Pi -->
            <sshexec host="${pi-host}" port="${pi-port}" username="${pi-user}"
                    password="${pi-password}" trust="true" failonerror="true"
                    verbose="true" command="rm --recursive --force ${pi-dirBuildTemp}" />

And to be exact, it is the line starting with "verbose". 确切地说,这是以“ verbose”开头的行。 I tried editing the command, removing parts of it... Nothing helps. 我尝试编辑该命令,删除了其中的一部分...没有任何帮助。 I tried removing the whole block of code, leaving the others (that look really like that) and the error then is on the last line of the next block. 我尝试删除了整个代码块,而其余代码(看起来确实如此),然后错误出现在下一个代码块的最后一行。 Here is the whole /media/temp/pi4j-arch/pi4j-native/build.xml : 这是整个/media/temp/pi4j-arch/pi4j-native/build.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project name="pi4j-native" default="build-libpi4j.so" basedir=".">
    <target name="build-libpi4j.so">

        <echo message="Building native libpi4j shared library for ABI: ${pi-abi}"/>

                <!-- ensure the target directory is empty on the Raspberry Pi -->
                <sshexec host="${pi-host}" port="${pi-port}" username="${pi-user}"
                        password="${pi-password}" trust="true" failonerror="true"
                        verbose="true" command="rm --recursive --force ${pi-dirBuildTemp}" />

                <!-- ensure the target directory exists on the Raspberry Pi -->
                <sshexec host="${pi-host}" port="${pi-port}" username="${pi-user}"
                        password="${pi-password}" trust="true" failonerror="false"
                        verbose="true" command="mkdir --parents ${pi-dirBuildTemp}" />

                <!-- copy all the necessary source files to the Raspberry Pi -->
                <scp todir="${pi-user}:${pi-password}@${pi-host}:${pi-dirBuildTemp}"
                        port="${pi-port}" trust="true" verbose="true" failonerror="true">
                        <fileset dir="src/main/native" />
                </scp>

                <!-- download and compile the 'wiringPi.a' native static library on the Raspberry
                        Pi platform -->
                <sshexec host="${pi-host}" port="${pi-port}" username="${pi-user}"
                        password="${pi-password}" trust="true" failonerror="true"
                        verbose="true" command="cd ${pi-dirBuildTemp}; sudo chmod +x wiringpi-build.sh; ./wiringpi-build.sh" />

                <!-- compile the 'lib4j.so' JNI native shared library on the Raspberry
                        Pi platform -->
                <sshexec host="${pi-host}" port="${pi-port}" username="${pi-user}"
                        password="${pi-password}" trust="true" failonerror="true"
                        verbose="true" command="cd ${pi-dirBuildTemp}; make clean; make all" />

                <!-- copy the compiled 'lib4j.so' JNI native shared library back -->
                <scp
                        file="${pi-user}:${pi-password}@${pi-host}:${pi-dirBuildTemp}/libpi4j.so"
                        todir="${project-build-directory}/${pi-abi}/" port="${pi-port}" trust="true"
                        verbose="true" failonerror="true">
                </scp>

                <!-- remove the temporary target directory from the Raspberry Pi  -->
                <sshexec host="${pi-host}" port="${pi-port}" username="${pi-user}"
                        password="${pi-password}" trust="true" failonerror="true"
                        verbose="true" command="rm --recursive --force ${pi-dirBuildTemp}" />

    </target>
</project>

Maybe the problem is not in the code itself, but in the sshexec command. 也许问题不在于代码本身,而在于sshexec命令。 But I still haven't understood how exactly it works and what might be the problem. 但是我仍然不知道它是如何工作的,可能是什么问题。 Tomorrow I will try to remove the variables and put the values there, just for the sake of the experiment. 明天,仅出于实验目的,我将尝试删除变量并将值放在其中。

EDIT2: I tested it... Still the same error at the same place... EDIT2:我对其进行了测试...在同一位置仍然存在相同的错误...

If anyone has any ideas, please share. 如果有人有任何想法,请分享。

EDIT3: 编辑3:

Thank you very much, prunge! 非常感谢,修剪! Now I am a few steps ahead! 现在,我向前走了几步! I did both of the things you suggested, as with the first one it didn't work (But I forgot to restart SSH when trying, so maybe it would work). 我完成了您建议的所有操作,因为第一个操作不起作用(但是我在尝试时忘记重新启动SSH,所以也许可以工作)。

Now I get another error, on another step... I get only one result when googled it, but I couldn't find the file they were talking about: https://github.com/rm-hull/wiringPi/issues/2 And I am not sure if this is exactly the same issue. 现在,在另一个步骤上,我又遇到另一个错误...用谷歌搜索时只得到一个结果,但找不到他们正在谈论的文件: https : //github.com/rm-hull/wiringPi/issues/ 2我不确定这是否是完全相同的问题。

Here is the error: 这是错误:

fatal: destination path 'wiringPi' already exists and is not an empty directory.
[UnInstall]
wiringPi Build script
=====================

The wiringPi I2C helper libraries will not be built.

WiringPi library
[UnInstall]
make: Nothing to be done for 'all'.
[Install]

GPIO Utility
[Link]
gpio.o: In function `main':
gpio.c:(.text.startup+0x194): undefined reference to `wiringPiSetupPiFaceForGpioProg'
gpio.c:(.text.startup+0x670): undefined reference to `gertboardSPISetup'
gpio.c:(.text.startup+0x684): undefined reference to `gertboardAnalogWrite'
gpio.c:(.text.startup+0x884): undefined reference to `gertboardSPISetup'
gpio.c:(.text.startup+0x894): undefined reference to `gertboardAnalogRead'
collect2: error: ld returned 1 exit status
Makefile:45: recipe for target 'gpio' failed
make: *** [gpio] Error 1

Make Failed...
Please check the messages and fix any problems. If you're still stuck,
then please email all the output and as many details as you can to
  projects@drogon.net

      [ant] Exiting /media/temp/pi4j-arch/pi4j-native/build.xml.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Pi4J :: Parent POM ................................. SUCCESS [01:07 min]
[INFO] Pi4J :: JNI Native Library ......................... FAILURE [04:05 min]
[INFO] Pi4J :: Java Library (Core) ........................ SKIPPED
[INFO] Pi4J :: GPIO Extension ............................. SKIPPED
[INFO] Pi4J :: Device Abstractions ........................ SKIPPED
[INFO] Pi4J :: Java Examples .............................. SKIPPED
[INFO] Pi4J :: OSGi Service ............................... SKIPPED
[INFO] Pi4J :: Distribution ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:41 min
[INFO] Finished at: 2015-08-13T17:01:08+00:00
[INFO] Final Memory: 12M/30M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (build-native-so) on project pi4j-native: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /media/temp/pi4j-arch/pi4j-native/build.xml:27: Remote command failed with exit status 1
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (build-native-so) on project pi4j-native: An Ant BuildException has occured: The following error occurred while executing this line:
/media/temp/pi4j-arch/pi4j-native/build.xml:27: Remote command failed with exit status 1
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: The following error occurred while executing this line:
/media/temp/pi4j-arch/pi4j-native/build.xml:27: Remote command failed with exit status 1
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:131)
        at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:98)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 20 more
Caused by: The following error occurred while executing this line:
/media/temp/pi4j-arch/pi4j-native/build.xml:27: Remote command failed with exit status 1
        at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:418)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at net.sf.antcontrib.logic.IfTask.execute(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:118)
        ... 23 more
Caused by: /media/temp/pi4j-arch/pi4j-native/build.xml:27: Remote command failed with exit status 1
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.executeCommand(SSHExec.java:250)
        at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(SSHExec.java:162)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
        ... 53 more

I really don't get how this works, I don't see anywhere the things written in the comments (in the build.xml file)... Here is the part of build.xml that is causing the error: 我真的不知道它是如何工作的,在任何地方都看不到注释中写的东西(在build.xml文件中)...这是build.xml中引起错误的部分:

<!-- download and compile the 'wiringPi.a' native static library on the Raspberry
        Pi platform -->
<sshexec host="${pi-host}" port="${pi-port}" username="${pi-user}"
        password="${pi-password}" trust="true" failonerror="true"
        verbose="true" command="cd ${pi-dirBuildTemp};  sudo chmod +x wiringpi-build.sh; ./wiringpi-build.sh" />

I can't find the wiringpi-build.sh ... 我找不到connectionpi-build.sh ...

Thanks and regards, Krum 谢谢和问候,克鲁姆

It's failing to talk to your Pi via SSH protocol. 通过SSH协议与您的Pi通讯失败。

If you haven't already, you might want to try installing the unlimited strength encryption policy files into your JDK/JRE you are running Maven from. 如果还没有,您可能想尝试将无限强度加密策略文件安装到要从中运行Maven的JDK / JRE中。 This will allow more algorithms to be negotiated when connecting via SSH. 通过SSH连接时,这将允许协商更多算法。

An alternative is to change SSHD configuration files on you Pi to allow some algorithms JSCH from your JDK/JRE supports. 一种替代方法是更改​​Pi上的SSHD配置文件,以允许JDK / JRE支持的某些算法JSCH。 Details for doing this is in this answer . 此操作的详细信息在此答案中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM