0

I'm trying to setup remote development for my raspberry pi using eclipse.

https://docs.deistercloud.com/content/Technology.50/Internet%20of%20Things/Raspberry%20PI.2/Eclipse.4.xml?embedded=true

When I run my ant build all the Maven downloads default to using these repositories: HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/maven/apache-maven/2.0.10/apache-maven-2.0.10.pom

I'm aware of the change to Maven that requires these downloads be from HTTPS sources and I've modified everywhere that I can think of to tell Maven to use the updated repositories to no avail. I included the below in my pom.xml:

<pluginRepositories>
    <pluginRepository>
        <id>central</id>
        <name>Central Repository</name>
        <url>https://repo.maven.apache.org/maven2</url>
        <layout>default</layout>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <releases>
            <updatePolicy>never</updatePolicy>
        </releases>
    </pluginRepository>
</pluginRepositories>
<repositories>
    <repository>
        <id>central</id>
        <name>Central Repository</name>
        <url>https://repo.maven.apache.org/maven2</url>
        <layout>default</layout>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

I also followed all the steps here: Requests to http://repo1.maven.org/maven2/ return a 501 HTTPS Required status and a body

No matter what, when I do the ant build, it forces downloads at the http location and fails.

Any advice?

The project is created in eclipse via new -> other -> maven -> org.apache.maven maven->quickstart

macmeyers50
  • 309
  • 2
  • 15
  • Is this a Maven or an Ant build? Furthermore which Maven version, Eclipse version and JDK do you use? – khmarbaise Mar 16 '21 at 15:46
  • jdk 11, maven 3.6.3, the first link clarifies it a bit, but maven is used to manage dependencies but it's a remote ant build. Latest eclipse version – macmeyers50 Mar 16 '21 at 15:54
  • How do you do the Ant build? With the antrun plugin? – J Fabian Meier Mar 16 '21 at 15:57
  • right click build.xml, run as ant build – macmeyers50 Mar 16 '21 at 15:59
  • Ah...sorry Ant build? Maven? Please explain more in detail apart from that if you use Ant to transfer the resulting artifacts to your Pi... I would suggest to do that via shell script it's easier because only scp ... also building with Maven works with https... I would say remove the ant part furthermore the start/etc. can done easier and more a debian way... – khmarbaise Mar 16 '21 at 15:59
  • Also open to any alternatives to remotely test code from eclipse on the pi, the only links I found were using this hybrid ant/maven build which is just going terribly. – macmeyers50 Mar 16 '21 at 15:59
  • The first link describes it in better detail than I could, apologies I'm not particularly familiar with the build tools. – macmeyers50 Mar 16 '21 at 16:00
  • Use a shell script which will startup the jvm with appropriate parameters and also a one which will do for remote debugging. – khmarbaise Mar 16 '21 at 16:00
  • Apart from that I would strongly reconsider the usage of JDK on a PI ...maybe Go might be more appropriate to work in PI... – khmarbaise Mar 16 '21 at 16:01
  • Unfortunately I'm bound by java in this case (this is a demo for code that will run on a beaglebone black using java) I just need to test some of the GPIO logic on what I have available currently; the pi. Your help is much appreciated though. – macmeyers50 Mar 16 '21 at 16:03
  • If you run the `build.xml` you just bypass Maven. – J Fabian Meier Mar 16 '21 at 16:08

0 Answers0