Mahout build errors in idea - mahout

I'm just starting out with Mahout, and got the latest from git, but it comes up with about a hundred or so errors when I build the project (exclusively in the 'math' section), such as:
import org.apache.mahout.math.set.OpenIntHashSet;
"Cannot resolve symbol OpenIntHashSet"
Similar problems exist for DoubleArrayList, DoubleDoubleProcedure, and others.

You need to import the project's Maven configuration.

Related

Setting up a Rascal example project

How do I setup a Rascal-MPL project to consume the DSL built with Rascal?
I don't seem to find any resource that details how to solve that particular problem
The documentation hasn't been written for that case but here goes:
Use newRascalProject from util::Reflective to create a basic setup. For both the DSL project and the consuming project that makes sense.
mvn install in the DSL project, if you won't have the DSL project folder open in Eclipse or VScode or if you are working bare bones Unix/Maven.
In RASCAL.MF of the client project add Require-Libraries: |lib://dsl-project|
In pom.xml of the client project add a dependency on the DSL jar.
Restart the console or terminal for a file of the client project.
In the terminal the active version of the path configuration for the interpreter will be printed. It should have the DSL project in the list of srcs.
In VScode log for the Rascal LSP you can see the path configuration printed when compiling/checking source files in the client project. There the DSL project should be in the libs path.
If the DSL project isn't compiled to .tpl files that appear in the target folder and eventually in the jar, you will get spurious error messages in the client code. In that case trigger the compiler in the DSL project by saving the top module, or run mvn install again. Revisit the pom file for the settings of the rascal-maven-plugin
For those landing at this page and trying to find an example of calling newRascalProject with working parameters...
The first parameter is a 'location'. While it is documented how to use this parameter (https://www.rascal-mpl.org/docs/Rascal/Expressions/Values/Location/), it still took my some time to figure out that a location is not a regular string, and not using double quotes " but |.
So if you try:
newRascalProject ("home:///Projects/rascal_playground", "hello2")
You get the following error:
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/UndeclaredVariable/UndeclaredVariable.html|
Including the variable name for the 2nd parameter...
newRascalProject ("home:///Projects/rascal_playground", name="hello")
... gives the same error.
This is the correct example:
newRascalProject (|home:///Projects/rascal_playground|, name="hello")

How to solve File can’t be indexed twice error in Run Code Analysis task TFS?

I am using SonarQube version 7.4 and TFS build task Run Code Analysis version 4
I am getting an error File can’t be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files
Below is my configuration for Prepare analysis on SonarQube task step
sonar.verbose=true
sonar.sources=(Build.SourcesDirectory)
sonar.inclusions=Code/**
sonar.cs.vstest.reportsPaths=**/*.trx
sonar.cs.vscoveragexml.reportsPaths=**/*.coveragexml
sonar.cfamily.build-wrapper-output=(Build.SourcesDirectory)
sonar.cfamily.threads=6
sonar.cfamily.cppunit.reportsPath=**/result.xml
sonar.branch.name=(Build.SourceBranchName) sonar.dependencyCheck.reportPath=(Build.ArtifactStagingDirectory)\dependency-check-report.xml
sonar.dependencyCheck.htmlReportPath=$(Build.ArtifactStagingDirectory)\dependency-check-report.html
Also below is my project folder structure
Client
Code
Lib
Package
Research
Runners
Tools
I want to scan only Code folder, Please help me.
How to solve File can’t be indexed twice error in Run Code Analysis task TFS?
According to your configuration for Prepare analysis on SonarQube task step, it seems that you have not configured the source and test files correctly.
Based on the FAQ on SonarOpenCommunity, we could to know:
Q: ERROR: Caused by: File [...] can't be indexed twice.
A: In case of below error you have to verify your exclusion/inclusion
properties. Please check that inclusion/exclusion patterns produce
disjoint sets for source and test files
So, to resolve this issue, we need to check the inclusion/exclusion patterns produce
disjoint sets for source and test files.
#Naveen Kumar`s solution:
Removed sonar.sources instaed added sonar.inclusions and sonar.exclusions resolved his issue.

Has anyone successfully built QuickFIX/J with IntelliJ IDE, importing Maven project structure?

I ask this question because it sort of builds but not really.
The core module could not be built; it is missing the Field classes.
I do not know how to make the builder generate these classes. I added some dependencies to point to JAR files that were included in folder \org.quickfixj-2.0.0-bin\org.quickfixj-2.0.0 which came prebuilt. I then no longer get a build problem for module core.
Next, I get errors on anything having to do with a test. I try to build the example Banzai. It complains:
Error:(35, 22) java: package quickfix.field does not exist
for lines like
import quickfix.field.AvgPx;
Environment:
IntelliJ 2017.2.5
QuickFixJ QFJ_RELEASE_2_0_0 2017-11-22

Intellij IDEA 14 Errors with grails run-app

I upgraded to IDEA 14 (from 13) and when I attempt to run my grails 2.2.0 application, I am getting the following error:
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/gdboling/Projects/GenRocket/web/build.gradle' line: 92
* What went wrong:
A problem occurred evaluating root project 'web'.
> No such property: environment for class: org.gradle.api.internal.project.DefaultProject_Decorated
It would seem that IDEA is attempting to use my build.gradle as part of the grails build process. IDEA 13 didn't do this. I use the build.gradle for some other non-grails related tasks for the project.
If I remove the build.gradle file all together, I get this error:
FAILURE: Build failed with an exception.
* What went wrong:
Task 'grails-run-app' not found in root project 'web'.
* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I do see the Grails View in the IDE but when I try and do a Make, it is telling me to re-import the gradle project. So it would seem that IntelliJ think this is a gradle project. How I can tell it that is is just a grails project?
To confirm my suspicions, I've opened a grails project that did not contain a build.gradle and it works just fine.
I had faced similar issue when unknowingly kept on hit next next in hurry. So, you probably mistakenly created a gradle project as shown in screenshot.
And when you recreated the project created it as "Create project from existing source" which idea well knows as grails-app (default for idea).
See if you can reproduce the error by re-importing the project using import project form external module.

Problem with dependencies using Ant from the shell

I'm having problems building my project, using an Ant script, from the command prompt using Ant itself. It can't find a certain import for a particular Java file in my project (which has nearly 5,000 source files as it is). The import is included in a .jar package whose location I have set in the Ant file itself. (As a pathelement, along with other needed JARs that either are fine, or haven't tried to been used when the crash occurs). The crash happens with javac, with the simple message of "import etc.ect.* cannot be found at line etc" Oddly enough, I can build the project just fine from the Ant file using an IDE like Eclipse. Any ideas what could be wrong? Thanks!
Wow, the solution was completely unrelated. It was a dumb fault in the java code where the class was trying to import .* from a directory that only had folders in it. For some reason, Eclipse didn't seem to mind, but javac did!
Eclipse's root classloader contains a lot of classes, when you run ant from console there's much less.
Just tell javac task to use the required .jar, and you'll be fine.
You should post the stack trace, does it say "import required by ..."? ( I forget the exact text). Likely there's a jar that's available in your eclipse environment that is not included in your ant script. Look in the stack trace for the missing class to identify the jar that's not being included in your build.

Resources