You can install your jar locally and modify the pom.xml file under the comment:
<!-- This section adds the maven repository that contains the Thingworx jar -->
<!-- If you cannot access this repository, download your own copy and use the -->
<!-- bin/install-thingworx-jar.sh script to install it locally -->
Here, the new URL to the mvnrepo should be: http://maker01.cloud.thingworx.com/mvnrepo i believe that the current URL is now http://maker01.ptcmanaged.com/mvnrepo which is the former server that we used. So, you need to set the server address which is: http://maker01.cloud.thingworx.com/mvnrepo
Let me know how it went.
I would like to ask every Academic user(a student or professor that is part of the Thingworx Academic program that has a hosted Thingworx in AWS) to post all their discussions on the Academic Forum (Academic Community)
Is there a more recent location of the maven repository than http://maker01.cloud.thingworx.com/mvnrepo
The old and the new location are both not available.
Or can someone provide the required .jar file.
I know this Raspberry PI Academic program example is old, but it is still available from the ThingWorx main web site.
I did a couple of things to get around this issue. Like the original poster, I was unable to connect to either remote maven repo. I had a copy of the ThingWorx 5.4 Java SDK, which contains thingworx-common-5.4.0.b445.jar, so I took Adrian's suggestion and installed it in my local maven repository. Here's the command to do that:
mvn install:install-file -Dfile=lib/thingworx-common-5.4.0.b445.jar -DgroupId=com.thingworx -DartifactId=thingworx-common -Dversion=5.4.0 -Dpackaging=jar
Some things to note about the command:
- I'm obviously in the SDK's main directory, right above the /lib directory containing the jar.
- I ran this command from the command line.
- While the version on the end of the jar itself is 5.4.0.b445, I chose to pass a -Dversion parameter of 5.4.0 to make life easier when I wanted to use the jar.
- The groupId is com.thingworx (you'll see why this matters when I talk about the pom file for the temperature-thing project).
The original project used version 5.0.0 of thingworx-common.jar, so I made the following modifications to the pom:
- I changed the version to 5.4.0 (remember how I made the version 5.4.0 when I installed it? This is why.)
- I noticed the groupId was com.thingworxs, instead of com.thingworx. I fixed that.
<dependency> <groupId>com.thingworx</groupId> <artifactId>thingworx-common</artifactId> <version>5.4.0</version> </dependency>
I got lucky, and none of the other dependencies had to be changed. The temperature-thing built and deployed as expected, and I was able to run it in both simulated and "real" mode on two different Raspberry Pis.