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 p/tango-ds/code - Revision 28762: /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] ProjectBuildingException - Apache Maven - Apache Software Foundation
[ERROR] [Help 2] UnresolvableModelException - Apache Maven - Apache Software Foundation

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 TANGO Device Servers / Code / [r28762] /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.:

<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>

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 (Central Repository:)]: 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] PluginVersionResolutionException - Apache Maven - Apache Software Foundation
tango-cs@tangobox:~/Downloads/AttributeComposer-4.2.0$

My pom.xml contents:

<?xml version="1.0" encoding="UTF-8"?>


4.0.0
fr.soleil.deviceservers
AttributeComposer
4.2.0
Attribute Composer
Attribute Composer Device Server


abeille
Gwenaelle Abeille
gwenaelle.abeille@synchrotron-soleil.fr
Synchrotron Soleil
http://www.synchrotron-soleil.fr

Manager
Java Developer

1


saintin
Katy saintin
katy.saintin@synchrotron-soleil.fr
Synchrotron Soleil
http://www.synchrotron-soleil.fr

Java Developer

1



${scm.connection.svn.tango-ds}/DeviceClasses/Calculation/AttributeComposer/trunk/
${scm.connection.svn.tango-ds}/DeviceClasses/Calculation/AttributeComposer/trunk/
${scm.connection.svn.tango-ds}/DeviceClasses/Calculation/AttributeComposer/trunk/




fr.soleil.maven.plugins
maven-script-plugin


install
install

generate




fr.soleil.tango.server.attributecomposer.AttributeComposer






org.tango-controls
JTangoServer
9.5.15


org.apache.commons
commons-math3
3.5


Hi,
you should also removed the following plugin:


<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>