OPC UA Java Build Failures - opc-ua

I git cloned from the github UA-Java repository https://github.com/OPCFoundation/UA-Java to a folder UA-Java.
In the root of UA-Java, I ran
mvn package
Then, again from the root of UA-Java
mvn install
Finally,
in the examples\basic
mvn package
I got build failures for each of those. The last-parts of outputs are at here 1.
Could somebody help?

It looks like the tests are failing.
You can power through and ignore that by running mvn clean install -DskipTests at the root so it succeeds, then mvn package again in the examples to build your examples.
You might also consider opening an issue with the maintainers about the test failures if they're consistently failing.

Related

Angular portlet throws exception path does not start with a "/" character

On Liferay github there is sample portlet which uses Angular https://github.com/liferay/liferay-blade-samples/tree/master/gradle/apps/npm/angular-npm-portlet
I've created my own portlet using maven command mvn archetype:generate -Dfilter=liferay
choose: 12
and after that I've built it and deployed to tomcat and exception was thrown:
07:29:02,097 ERROR [http-nio-8080-exec-2][ComboServlet:89] java.lang.IllegalArgumentException: Path samplePortlet#1.0.0.js does not start with a "/" character
any idea how to fix this ?
I guess that you run the generate command and then you try to do mvn clean install. The error is a cryptic one but one of the cases that you can get it is when the combo servlet can't find the dependency in the jar file. There is not yet a maven wrapper for the npm functionality.
You can do 2 things.
Without gradle:
mvn clean install
npm run build
copy the js from build folder into the target folder. cp -R build/resources/main/META-INF/resources/ target/classes/META-INF/resources/
mvn install (don't clean!)
With gradle:
gradle build
Few remarks:
If you want to work with the npm stuff I suggest that you go for Liferay workspace, blade tools and Gradle combinations. It works smoother.
When you create the project with the archetype you might need to fix the ID for the component. In the JS code will contain something with the artefact name - root but the actual id in the JSP will probably be just namespace.

Upgraded to 0.6.13 and now node can't find module moment

I have a Play project that uses scala.js. Tests all ran fine until I upgraded the scala.js plugin to 0.6.13. Now I get "Error: Cannot find module '../moment'".
I read on the 0.6.13 release notes that run and test now use node.js by default; I'm sure that change is the root of my problem.
I see the note to install jsdom using "npm install jsdom" either locally or globally. I first tried installing the moment library globally (npm install -g moment). No change, so I tried installing in the project's root directory. Still no change.
Suggestions?
I updated the moment.js facade from "io.github.widok" %%% "scala-js-momentjs" % "0.2.0" to "ru.pavkin" %%% "scala-js-momentjs" % "0.4.1". Changed relevant import statements and recompiled. Tests passed.
Removed the node_modules directory from the app's root directory. Tests failed with the earlier error. Reinstalled the moment library (npm install moment) and tests pass again.

Running mvn eclipse:eclipse and the build path

Apologies if this is a simple question...
When I run the mvn eclipse:eclipse command to resolve the classpaths for eclipse it always appends the projects version as well. So if the project is called "ATestProject" and the version is "3", the build path will look for "ATestProject-3" but eclipse knows it only as "ATestProject". So there is a error unless I manually add the "ATestProject".
Is there a way to exclude the version? OR am I just doing something wrong?

Configure repo for SBT launcher in Travis build

Where can I override the repo URL that SBT uses to fetch its launcher when the SBT instance is provided by Travis-CI?
http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar is currently giving 404s and, as a result, the builds are failing on Travis with:
$ sbt clean dependencyUpdates coverage test coverageReport
Detected sbt version 0.13.8
Downloading sbt launcher for 0.13.8:
From http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar
To /home/travis/.sbt/launchers/0.13.8/sbt-launch.jar
Download failed. Obtain the jar manually and place it at /home/travis/.sbt/launchers/0.13.8/sbt-launch.jar
I ran into the same problem today, and logged an issue for travis-ci: https://github.com/travis-ci/travis-ci/issues/4527
As a workaround, you can download the sbt-launcher.jar by adding a before_script section to your .travis.yml
before_script:
- mkdir -p $HOME/.sbt/launchers/0.13.8/
- curl -L -o $HOME/.sbt/launchers/0.13.8/sbt-launch.jar http://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar
We just deployed the fix to production. SBT builds should be working now.
Sorry for the inconvenience.
https://github.com/travis-ci/travis-ci/issues/4527#issuecomment-124123880

Is there a log file for tests that are run during maven build life cycle?

When I run mvn clean install, it runs my tests and 2 of them fail. When I run them on their own as junit tests, they pass. It only tells me that they failed during the mvn clean install and not why they failed. I'm wondering if there's a log for the tests run during the build lifecycle that I'm not aware of. Or do I need to set up my own logging system for this?
You can have a look at the test report:
target/surfire-reports/index.html