Need help with Java Device Server: Averager
|
|
---|---|
Please help! I am new to Maven project build. Is there a compiled, package version of Averager.jar for Linux? I use TangoBox-9.3 for testing. I tried to compile the java Averager from http://svn.code.sf.net/p/tango-ds/code/DeviceClasses/Calculation/Averager/ but ran into a bunch of errors that I need help with. tango-cs@tangobox:~/archivedAverager/Averager.original$ mvn archetype:generate \ > -DarchetypeGroupId=org.tango-controls \ > -DarchetypeArtifactId=jtango-maven-archetype \ > -DarchetypeVersion=1.4 [INFO] Scanning for projects… Downloading from bintray-tango-controls-maven: https://dl.bintray.com/tango-controls/maven/fr/soleil/super-pom/1.1/super-pom-1.1.pom Downloading from central: https://repo.maven.apache.org/maven2/fr/soleil/super-pom/1.1/super-pom-1.1.pom [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for fr.soleil.deviceservers:Averager:1.0.3: Could not find artifact fr.soleil:super-pom:pom:1.1 in bintray-tango-controls-maven (https://dl.bintray.com/tango-controls/maven) and 'parent.relativePath' points at wrong local POM @ line 3, column 10 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project fr.soleil.deviceservers:Averager:1.0.3 (/home/tango-cs/archivedAverager/Averager.original/pom.xml) has 1 error [ERROR] Non-resolvable parent POM for fr.soleil.deviceservers:Averager:1.0.3: Could not find artifact fr.soleil:super-pom:pom:1.1 in bintray-tango-controls-maven (https://dl.bintray.com/tango-controls/maven) and 'parent.relativePath' points at wrong local POM @ line 3, column 10 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException |
|
|
---|---|
Hello, The pom.xml (http://svn.code.sf.net/p/tango-ds/code/DeviceClasses/Calculation/Averager/trunk/pom.xml) only works in the SOLEIL context because it refers to a SOLEIL parent pom. Moreover, this device was developed by SOLEIL and is no more maintained (last commit from 2008), it uses a very old version of Tango (IDL2). Another device that provides the average of several attributes is https://sourceforge.net/p/tango-ds/code/HEAD/tree/DeviceClasses/Calculation/AttributeComposer/. To compile it, you will have to modify the pom: * remove the parent section * update dependencies section and specify versions, e.g.:
Best regards, Gwenaëlle. |
|
|
---|---|
Thanks you Gwenaëlle for your help. I downloaded the AttributeComposer-4.2.0 from sourceforge. Modified the pom.xml per your suggestions but still has error when build. Tac. Error when build: tango-cs@tangobox:~/Downloads/AttributeComposer-4.2.0$ mvn archetype:generate \ > -DarchetypeGroupId=org.tango-controls \ > -DarchetypeArtifactId=jtango-maven-archetype \ > -DarchetypeVersion=1.4 [INFO] Scanning for projects… [WARNING] [WARNING] Some problems were encountered while building the effective model for fr.soleil.deviceservers:AttributeComposer:jar:4.2.0 [WARNING] 'build.plugins.plugin.version' for fr.soleil.maven.plugins:maven-script-plugin is missing. @ line 42, column 15 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] Downloading from central: https://repo.maven.apache.org/maven2/fr/soleil/maven/plugins/maven-script-plugin/maven-metadata.xml [INFO] ———————————————————————— [INFO] BUILD FAILURE [INFO] ———————————————————————— [INFO] Total time: 1.375 s [INFO] Finished at: 2019-08-24T07:21:44-07:00 [INFO] ———————————————————————— [ERROR] Error resolving version for plugin 'fr.soleil.maven.plugins:maven-script-plugin' from the repositories [local (/home/tango-cs/.m2/repository), central (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginVersionResolutionException tango-cs@tangobox:~/Downloads/AttributeComposer-4.2.0$ My pom.xml contents: <?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>fr.soleil.deviceservers</groupId> <artifactId>AttributeComposer</artifactId> <version>4.2.0</version> <name>Attribute Composer</name> <description>Attribute Composer Device Server</description> <developers> <developer> <id>abeille</id> <name>Gwenaelle Abeille</name> <email>gwenaelle.abeille@synchrotron-soleil.fr</email> <organization>Synchrotron Soleil</organization> <organizationUrl>http://www.synchrotron-soleil.fr</organizationUrl> <roles> <role>Manager</role> <role>Java Developer</role> </roles> <timezone>1</timezone> </developer> <developer> <id>saintin</id> <name>Katy saintin</name> <email>katy.saintin@synchrotron-soleil.fr</email> <organization>Synchrotron Soleil</organization> <organizationUrl>http://www.synchrotron-soleil.fr</organizationUrl> <roles> <role>Java Developer</role> </roles> <timezone>1</timezone> </developer> </developers> <scm> <connection>${scm.connection.svn.tango-ds}/DeviceClasses/Calculation/AttributeComposer/trunk/</connection> <developerConnection>${scm.connection.svn.tango-ds}/DeviceClasses/Calculation/AttributeComposer/trunk/</developerConnection> <url>${scm.connection.svn.tango-ds}/DeviceClasses/Calculation/AttributeComposer/trunk/</url> </scm> <build> <plugins> <plugin> <groupId>fr.soleil.maven.plugins</groupId> <artifactId>maven-script-plugin</artifactId> <executions> <execution> <id>install</id> <phase>install</phase> <goals> <goal>generate</goal> </goals> </execution> </executions> <configuration> <mainClass>fr.soleil.tango.server.attributecomposer.AttributeComposer</mainClass> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.tango-controls</groupId> <artifactId>JTangoServer</artifactId> <version>9.5.15</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-math3</artifactId> <version>3.5</version> </dependency> </dependencies> </project> |
|
|
---|---|
Hi, you should also removed the following plugin:
|