Building trellis-t3 app

27 views
Skip to first unread message

Chris Ward

unread,
Nov 18, 2020, 7:01:05 AM11/18/20
to ONOS Developers
I'm trying to build the trellis-t3 and trellis-control apps. Attempting to build each of these with the specified
docker run -it --rm -v $HOME/.m2:/root/.m2 -v $PWD:/root/trellis-t3 -w /root/trellis-t3 maven:3.6.4-openjdk-11 mvn clean install
command results in an error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project t3-app: Compilation failure
[ERROR] /root/trellis-t3/app/src/main/java/org/onosproject/t3/api/NetworkConfigNib.java:[93,39] An unhandled exception was thrown by the Error Prone static analysis plugin.
[ERROR]      Please report this at https://github.com/google/error-prone/issues/new and include the following:
[ERROR]  
[ERROR]      error-prone version: 2.3.3
I reported this to github as requested, and was told that this bug is already fixed in error-prone 2.3.4 . So the question is, how to build with this version of error-prone instead of 2.3.3 . Asking on the Maven 'users' mailing list suggests that I need to change the pom in onosproject to achieve this, but I'm not sure how to do this. Can anyone help ?

Chris Ward

unread,
Nov 18, 2020, 10:44:28 AM11/18/20
to ONOS Developers, Chris Ward
I'm told that this requires a change in the ONOS project, to change the level of error-prone specified to 2.3.4 and to increment the version number of ONOS. Then the pom (?) needs to be uploaded to Maven Central, and then trellis-t3 and trellis-control can build with the new version of error-prone.

Who can make this change ?

Eric Tang

unread,
Nov 18, 2020, 11:59:38 PM11/18/20
to Chris Ward, ONOS Developers
Hi,

This is a hack. Please file jira ticket for proper fix.

Change the following entry in file
~/.m2/repository/org/onosproject/onos-dependencies/2.2.7-b2/onos-dependencies-2.2.7-b2.pom:
<errorprone.version>2.3.3</errorprone.version>

Hope this helps.

Regards,
Eric
> --
> You received this message because you are subscribed to the Google Groups
> "ONOS Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to onos-dev+u...@onosproject.org.
> To view this discussion on the web visit
> https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/1c6e8340-6429-4966-990f-81a16f4a8646n%40onosproject.org.
>

Chris Ward

unread,
Nov 19, 2020, 5:05:26 AM11/19/20
to ONOS Developers, qco...@gmail.com, ONOS Developers, Chris Ward
Another suggestion was to build trellis-control with command
docker run -it --rm -v $HOME/.m2:/root/.m2 -v $PWD:/root/trellis-control -w /root/trellis-control maven:3.6.3-openjdk-11 mvn clean install -Derrorprone.version=2.3.4
i.e. to override the version of error-prone on the command line. This worked.

I don't have access to ONOS jira, so I can't raise a ticket for a proper fix. It looks to be that the required patch is
:~/onos-main/onos$ git diff
diff --git a/tools/package/dependencies/template.pom b/tools/package/dependencies/template.pom
index 8a67b3bbd7..a5aac3a116 100644
--- a/tools/package/dependencies/template.pom
+++ b/tools/package/dependencies/template.pom
@@ -37,7 +37,7 @@
         <maven.version.min>3.3.9</maven.version.min>
         <java.version.min><!-- JAVA_VERSION --></java.version.min>
         <onos.version><!-- ONOS_VERSION --></onos.version>
-        <errorprone.version>2.3.3</errorprone.version>
+        <errorprone.version>2.3.4</errorprone.version>
     </properties>
 
     <dependencyManagement>
and then rebuilding ONOS with the version number incremented. Can someone do this for me, or tell me how to apply for jira access ?
Reply all
Reply to author
Forward
0 new messages