Building Mango and HTTP Publisher
-
I was able to get the basic build complete according to the How to setup Eclipse video: https://help.infiniteautomation.com/support/solutions/folders/14000104815.
However, I would like design a new Publisher that is similar to HTTP Publisher. I have the src files and I have imported it as a project into eclipse via the menu: "File --> Import.... --> General / Existing Projects into Workspace --> folder with the HTTP project"
However, I am not sure how to define the ma.home ant variable.
Here are the console messages I am receiving:
Buildfile: C:\Users\Ricardo\git\http\build.xml
[mvn:dependencies] Downloading: com/infiniteautomation/mango/mango-parent/2.7.10/mango-parent-2.7.10.pom from repository mango-core at file://${project.basedir}/maven-local
[mvn:dependencies] File: \maven-local\com\infiniteautomation\mango\mango-parent\2.7.10\mango-parent-2.7.10.pom does not exist
[mvn:dependencies] [INFO] Unable to find resource 'com.infiniteautomation.mango:mango-parent:pom:2.7.10' in repository mango-core (file://${project.basedir}/maven-local)
[mvn:dependencies] Downloading: com/infiniteautomation/mango/mango-parent/2.7.10/mango-parent-2.7.10.pom from repository central at http://repo1.maven.org/maven2
[mvn:dependencies] Unable to locate resource in repository
[mvn:dependencies] [INFO] Unable to find resource 'com.infiniteautomation.mango:mango-parent:pom:2.7.10' in repository central (http://repo1.maven.org/maven2)
[mvn:dependencies] An error has occurred while processing the Maven artifact tasks.
[mvn:dependencies] Diagnosis:
[mvn:dependencies]
[mvn:dependencies] Unable to resolve artifact: Unable to get dependency information: Unable to read the metadata file for artifact 'com.infiniteautomation:mango:jar': Cannot find parent: com.infiniteautomation.mango:mango-parent for project: com.infiniteautomation:mango:jar:null for project com.infiniteautomation:mango:jar:null
[mvn:dependencies] com.infiniteautomation:mango:jar:2.7.10
[mvn:dependencies]
[mvn:dependencies] from the specified remote repositories:
[mvn:dependencies] central (http://repo1.maven.org/maven2)
[mvn:dependencies]
[mvn:dependencies] Path to dependency:
[mvn:dependencies] 1) com.infiniteautomation.mango:http-ds:jar:1.5.2
[mvn:dependencies]
[mvn:dependencies]
[mvn:dependencies] Unable to download the artifact from any repository
[mvn:dependencies]BUILD FAILED
C:\Users\Ricardo\git\http\build.xml:4: The following error occurred while executing this line:
C:\Users\Ricardo\git\ma-core-public\Core\module-build.xml:34: Unable to resolve artifact: Unable to get dependency information: Unable to read the metadata file for artifact 'com.infiniteautomation:mango:jar': Cannot find parent: com.infiniteautomation.mango:mango-parent for project: com.infiniteautomation:mango:jar:null for project com.infiniteautomation:mango:jar:null
com.infiniteautomation:mango:jar:2.7.10from the specified remote repositories:
central (http://repo1.maven.org/maven2)Path to dependency:
1) com.infiniteautomation.mango:http-ds:jar:1.5.2Total time: 1 second
-
Hi Ricardo,
Using a command line,
cd ~\git\ma-core-public
mvn install
cd Core
mvn installand if those two succeed, try right clicking on the build.xml in the HTTP project and running it as an Ant build again.
-
Wow, it works what this sequence of command. Thanks.
Now I made some changes in HTTP, but it wouldn't compile when I tried Ant Build again at HTTP's build.xml. Can you advise?
Buildfile: C:\Users\Ricardo\git\http\build.xml
clean:
[echo] Cleaning C:\Users\Ricardo\git\ma-core-public\Core/web/modules/http
[delete] Deleting directory C:\Users\Ricardo\git\ma-core-public\Core\web\modules\httpBUILD FAILED
C:\Users\Ricardo\git\ma-core-public\Core\module-build.xml:72: Unable to delete file C:\Users\Ricardo\git\ma-core-public\Core\web\modules\http\lib\m2m2-http-1.5.2.jarTotal time: 15 seconds
-
You reported to me it worked after the debug / instance running in eclipse was stopped.
Just so you know, you only have to run the "mvn install" commands once, or to run them again if the dependencies in the pom.xml change.
-
So I don't know if this is the right area but I am having trouble linking the Icon i added to a HTTP.
-
Hi Jshbrick,
That's not really enough information for me to try to help you.
-
Phil,
thank you for the cool introduction video to mango development. Now I got the CORE.
There you did not build the modules anymore and I am struggling here.The ant-file "modue-build.xml" in CORE not the way, right? How I get them?
Thanks
Sasa -
Hi Sasa,
You are most welcome!
The build.xml file in each other module's project can be used to build the module. Simply use these for your ant builds, and you can copy it into new modules and it should work fine. It relies on your core.home ant variable to point to the /path/to/ma-core-public/Core as it references that "module-build.xml" and it needs to know where to deploy the modules. This property was probably already set, as you need it to build the Core.