java - eclipse maven No plugin found for prefix 'maven-assembly-plugin' -


i trying use maven in eclipse luna environment assemble executable jar , deploy raspberry pi, found looks appropriate maven script, maven not appear finding first plugin , declares build failure see console log below:-

[info] scanning projects... [info] downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml [info] downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml [info] downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 kb @ 21.6 kb/sec) [info] downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 kb @ 32.6 kb/sec) [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 1.404 s [info] finished at: 2016-07-21t20:01:39+01:00 [info] final memory: 12m/164m [info] ------------------------------------------------------------------------ [error] no plugin found prefix 'maven-assembly-plugin' in current project , in plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available repositories [local (c:\users\gjwood\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [help 1] [error]  [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error]  [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/nopluginfoundforprefixexception 

this pom.xml file

<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>com.company</groupid> <artifactid>rpitank</artifactid> <version>1.0-snapshot</version> <packaging>jar</packaging>  <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>      <!-- default raspberry pi properties -->     <pi.host>192.168.1.123</pi.host>     <pi.port>22</pi.port>     <pi.user>pi</pi.user>     <pi.password>raspberry</pi.password>     <pi.deploydirectory>/home/pi/artifacts</pi.deploydirectory>     <pi.main.class>rpitank</pi.main.class>  </properties>  <dependencies>     <dependency>         <groupid>junit</groupid>         <artifactid>junit</artifactid>         <version>3.8.1</version>         <scope>test</scope>     </dependency>     <dependency>         <groupid>com.pi4j</groupid>         <artifactid>pi4j-core</artifactid>         <version>1.1-snapshot</version>     </dependency> </dependencies>  <build>     <plugins>          <!-- plugin generate jar manifest file inside jar in order make our application runnable -->         <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-assembly-plugin</artifactid>             <configuration>                 <archive>                     <manifest>                         <addclasspath>true</addclasspath>                         <mainclass>${pi.main.class}</mainclass>                     </manifest>                 </archive>                 <descriptorrefs>                     <descriptorref>jar-with-dependencies</descriptorref>                 </descriptorrefs>             </configuration>             <executions>                 <execution>                     <id>make-my-jar-with-dependencies</id>                     <phase>package</phase>                     <goals>                         <goal>single</goal>                     </goals>                 </execution>             </executions>         </plugin>          <!--this plugin transfer executable jar file pi , runs -->         <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-antrun-plugin</artifactid>             <version>1.8</version>             <executions>                 <execution>                     <phase>install</phase>                     <goals>                         <goal>run</goal>                     </goals>                     <configuration>                         <tasks>                             <!-- ensure target directory exists on 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.deploydirectory}"/>                              <!-- copy jar file raspberry pi -->                             <scp                                 file="${project.build.directory}/${project.build.finalname}-jar-with-dependencies.jar"                                 todir="${pi.user}:${pi.password}@${pi.host}:${pi.deploydirectory}"                                 port="${pi.port}" trust="true" verbose="true" failonerror="true">                             </scp>                               <!-- run jar file on raspberry pi -->                             <sshexec host="${pi.host}" port="${pi.port}" username="${pi.user}"                                      password="${pi.password}" trust="true" failonerror="false"                                      verbose="true"                                       command="java -jar ${pi.deploydirectory}/${project.build.finalname}-jar-with-dependencies.jar"/>                         </tasks>                     </configuration>                 </execution>             </executions>             <dependencies>                 <dependency>                     <groupid>org.apache.ant</groupid>                     <artifactid>ant-jsch</artifactid>                     <version>1.9.6</version>                 </dependency>             </dependencies>         </plugin>     </plugins> </build> </project> 

i have installed maven on eclipse , have checked plugin files on pc , classpath set (and files are)

c:\users\gjwood\.m2\repository\org\apache\maven\plugins\maven-assembly-plugin\2.2-beta-5 

i have tried referencing jar files in referenced libraries

all no avail!

the original objective of question deploy code eclipse raspberry pi, have achieved simple "hello world" program follows:

  1. probably unnecessary thought start clean install of latest version of eclipse (neon)

  2. updated pom.xml 1 shown below

    http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.ladbury helloworld 0.0.1-snapshot helloworld simple

    <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>      <!-- default raspberry pi properties -->     <pi.host>192.168.1.123</pi.host>     <pi.port>22</pi.port>     <pi.user>pi</pi.user>     <pi.password>raspberry</pi.password>     <pi.deploydirectory>/home/pi/artifacts</pi.deploydirectory>     <pi.main.class>org.ladbury.testpkg.helloworld</pi.main.class> </properties>  <build>     <sourcedirectory>src</sourcedirectory>     <plugins>         <plugin>             <artifactid>maven-compiler-plugin</artifactid>             <version>3.5.1</version>             <configuration>                 <source>1.8</source>                 <target>1.8</target>             </configuration>         </plugin>          <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-jar-plugin</artifactid>             <version>3.0.2</version>             <configuration>                 <archive>                     <manifest>                         <addclasspath>true</addclasspath>                         <mainclass>${pi.main.class}</mainclass>                     </manifest>                 </archive>             </configuration>         </plugin>          <!--this plugin transfer executable jar file pi , runs              -->         <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-antrun-plugin</artifactid>             <version>1.8</version>             <executions>                 <execution>                     <id>ant-copy-execute</id>                     <phase>install</phase>                     <configuration>                          <target>                             <!-- ensure target directory exists on 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.deploydirectory}" />                              <!-- copy jar file raspberry pi -->                             <scp file="${project.build.directory}/${project.build.finalname}.jar"                                 todir="${pi.user}:${pi.password}@${pi.host}:${pi.deploydirectory}"                                 port="${pi.port}" trust="true" verbose="true" failonerror="true" />                               <!-- run jar file on raspberry pi -->                             <sshexec host="${pi.host}" port="${pi.port}" username="${pi.user}"                                 password="${pi.password}" trust="true" failonerror="false"                                 verbose="true"                                 command="java -jar ${pi.deploydirectory}/${project.build.finalname}.jar" />                         </target>                      </configuration>                     <goals>                         <goal>run</goal>                     </goals>                 </execution>             </executions>             <dependencies>                 <dependency>                     <groupid>org.apache.ant</groupid>                     <artifactid>ant-jsch</artifactid>                     <version>1.9.6</version>                 </dependency>             </dependencies>         </plugin>     </plugins> </build> 

    • to execute there 2 steps

3.1 build jar file containing main class:

  • right click project in package explorer
  • select run run configurations
  • in maven section, main tab, fill in goals box jar:jar
  • in name box put hello world jar
  • click run button, should build jar shown below

    [info] scanning projects... [info]
    [info] ------------------------------------------------------------------------ [info] building helloworld 0.0.1-snapshot [info] ------------------------------------------------------------------------ [info] [info] --- maven-jar-plugin:3.0.2:jar (default-cli) @ helloworld --- [info] building jar: c:\users\gjwood\git\helloworld\helloworld\target\helloworld-0.0.1-snapshot.jar [info] ------------------------------------------------------------------------ [info] build success [info] ------------------------------------------------------------------------ [info] total time: 1.104 s [info] finished at: 2016-07-29t16:13:48+01:00 [info] final memory: 8m/170m [info] ------------------------------------------------------------------------

3.2 transfer jar via ssh , execute on raspberry pi follows - right click project in package explorer - select run run configurations - in maven section, main tab, fill in goals box antrun:run@ant-copy-execute - in name box put helloworld antrun - click run button, should transfer program , run shown below

[info] scanning projects... [info]                                                                          [info] ------------------------------------------------------------------------ [info] building helloworld 0.0.1-snapshot [info] ------------------------------------------------------------------------ [info]  [info] --- maven-antrun-plugin:1.8:run (ant-copy-execute) @ helloworld --- [info] executing tasks  main:   [sshexec] connecting 192.168.1.123:22   [sshexec] connecting 192.168.1.123 port 22   [sshexec] connection established   [sshexec] remote version string: ssh-2.0-openssh_6.7p1 raspbian-5+deb8u2   [sshexec] local version string: ssh-2.0-jsch-0.1.50   [sshexec] checkciphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256   [sshexec] aes256-ctr not available.   [sshexec] aes192-ctr not available.   [sshexec] aes256-cbc not available.   [sshexec] aes192-cbc not available.   [sshexec] arcfour256 not available.   [sshexec] checkkexes: diffie-hellman-group14-sha1   [sshexec] ssh_msg_kexinit sent   [sshexec] ssh_msg_kexinit received   [sshexec] kex: server: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1   [sshexec] kex: server: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519   [sshexec] kex: server: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com   [sshexec] kex: server: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com   [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1   [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1   [sshexec] kex: server: none,zlib@openssh.com   [sshexec] kex: server: none,zlib@openssh.com   [sshexec] kex: server:    [sshexec] kex: server:    [sshexec] kex: client: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1   [sshexec] kex: client: ssh-rsa,ssh-dss   [sshexec] kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc   [sshexec] kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc   [sshexec] kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96   [sshexec] kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96   [sshexec] kex: client: none   [sshexec] kex: client: none   [sshexec] kex: client:    [sshexec] kex: client:    [sshexec] kex: server->client aes128-ctr hmac-sha1 none   [sshexec] kex: client->server aes128-ctr hmac-sha1 none   [sshexec] ssh_msg_kexdh_init sent   [sshexec] expecting ssh_msg_kexdh_reply   [sshexec] ssh_rsa_verify: signature true   [sshexec] permanently added '192.168.1.123' (rsa) list of known hosts.   [sshexec] ssh_msg_newkeys sent   [sshexec] ssh_msg_newkeys received   [sshexec] ssh_msg_service_request sent   [sshexec] ssh_msg_service_accept received   [sshexec] authentications can continue: publickey,keyboard-interactive,password   [sshexec] next authentication method: publickey   [sshexec] authentications can continue: password   [sshexec] next authentication method: password   [sshexec] authentication succeeded (password).   [sshexec] cmd : mkdir --parents /home/pi/artifacts   [sshexec] disconnecting 192.168.1.123 port 22   [sshexec] caught exception, leaving main loop due socket closed       [scp] connecting 192.168.1.123:22       [scp] connecting 192.168.1.123 port 22       [scp] connection established       [scp] remote version string: ssh-2.0-openssh_6.7p1 raspbian-5+deb8u2       [scp] local version string: ssh-2.0-jsch-0.1.50       [scp] checkciphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256       [scp] aes256-ctr not available.       [scp] aes192-ctr not available.       [scp] aes256-cbc not available.       [scp] aes192-cbc not available.       [scp] arcfour256 not available.       [scp] checkkexes: diffie-hellman-group14-sha1       [scp] ssh_msg_kexinit sent       [scp] ssh_msg_kexinit received       [scp] kex: server: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1       [scp] kex: server: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519       [scp] kex: server: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com       [scp] kex: server: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com       [scp] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1       [scp] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1       [scp] kex: server: none,zlib@openssh.com       [scp] kex: server: none,zlib@openssh.com       [scp] kex: server:        [scp] kex: server:        [scp] kex: client: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1       [scp] kex: client: ssh-rsa,ssh-dss       [scp] kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc       [scp] kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc       [scp] kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96       [scp] kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96       [scp] kex: client: none       [scp] kex: client: none       [scp] kex: client:        [scp] kex: client:        [scp] kex: server->client aes128-ctr hmac-sha1 none       [scp] kex: client->server aes128-ctr hmac-sha1 none       [scp] ssh_msg_kexdh_init sent       [scp] expecting ssh_msg_kexdh_reply       [scp] ssh_rsa_verify: signature true       [scp] permanently added '192.168.1.123' (rsa) list of known hosts.       [scp] ssh_msg_newkeys sent       [scp] ssh_msg_newkeys received       [scp] ssh_msg_service_request sent       [scp] ssh_msg_service_accept received       [scp] authentications can continue: publickey,keyboard-interactive,password       [scp] next authentication method: publickey       [scp] authentications can continue: password       [scp] next authentication method: password       [scp] authentication succeeded (password).       [scp] sending: helloworld-0.0.1-snapshot.jar : 3278       [scp] file transfer time: 0.01 average rate: 409,750.0 b/s       [scp] done.       [scp] disconnecting 192.168.1.123 port 22       [scp] caught exception, leaving main loop due socket closed   [sshexec] connecting 192.168.1.123:22   [sshexec] connecting 192.168.1.123 port 22   [sshexec] connection established   [sshexec] remote version string: ssh-2.0-openssh_6.7p1 raspbian-5+deb8u2   [sshexec] local version string: ssh-2.0-jsch-0.1.50   [sshexec] checkciphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256   [sshexec] aes256-ctr not available.   [sshexec] aes192-ctr not available.   [sshexec] aes256-cbc not available.   [sshexec] aes192-cbc not available.   [sshexec] arcfour256 not available.   [sshexec] checkkexes: diffie-hellman-group14-sha1   [sshexec] ssh_msg_kexinit sent   [sshexec] ssh_msg_kexinit received   [sshexec] kex: server: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1   [sshexec] kex: server: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519   [sshexec] kex: server: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com   [sshexec] kex: server: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com   [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1   [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1   [sshexec] kex: server: none,zlib@openssh.com   [sshexec] kex: server: none,zlib@openssh.com   [sshexec] kex: server:    [sshexec] kex: server:    [sshexec] kex: client: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1   [sshexec] kex: client: ssh-rsa,ssh-dss   [sshexec] kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc   [sshexec] kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc   [sshexec] kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96   [sshexec] kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96   [sshexec] kex: client: none   [sshexec] kex: client: none   [sshexec] kex: client:    [sshexec] kex: client:    [sshexec] kex: server->client aes128-ctr hmac-sha1 none   [sshexec] kex: client->server aes128-ctr hmac-sha1 none   [sshexec] ssh_msg_kexdh_init sent   [sshexec] expecting ssh_msg_kexdh_reply   [sshexec] ssh_rsa_verify: signature true   [sshexec] permanently added '192.168.1.123' (rsa) list of known hosts.   [sshexec] ssh_msg_newkeys sent   [sshexec] ssh_msg_newkeys received   [sshexec] ssh_msg_service_request sent   [sshexec] ssh_msg_service_accept received   [sshexec] authentications can continue: publickey,keyboard-interactive,password   [sshexec] next authentication method: publickey   [sshexec] authentications can continue: password   [sshexec] next authentication method: password   [sshexec] authentication succeeded (password).   [sshexec] cmd : java -jar /home/pi/artifacts/helloworld-0.0.1-snapshot.jar hello world   [sshexec] disconnecting 192.168.1.123 port 22   [sshexec] caught exception, leaving main loop due socket closed [info] executed tasks [info] ------------------------------------------------------------------------ [info] build success [info] ------------------------------------------------------------------------ [info] total time: 8.052 s [info] finished at: 2016-07-29t15:11:30+01:00 [info] final memory: 11m/170m [info] ------------------------------------------------------------------------ 

Comments