Configure Dspace In Eclipse Luna - maven-2

How to configuring DSpace-1.7.0 in Eclipse Luna?

File -> import -> Projects from git
Clone URI
paste uri (https://github.com/DSpace/DSpace)
import as general proyect.
next back to dspace 1.7
over proyect -> rigth button -> team -> switch to.. -> Remote -> tags -> dspace-1.7.0 ( try to upgrade to 1.7.3) checkout
next do a maven eclipse:eclipse to generate java proyects
And re-import proyect:
File -> import -> existing proyect. -> import existing proyects

Related

Getting this error while building a react-native iOS app on xcode: `React/RCTBridgeModule.h` file not found

React/RCTBridgeModule.h file not found
after a while of searching, here is my solution:
1. Disable the parallel builds:
+++Xcode menu -> Product -> Scheme -> Edit Schemes...
+++Double click on your application
+++Build tab -> uncheck Parallelize Build
+++Click on the '+' sign, then add React
enter image description here:
[1]: https://i.stack.imgur.com/IeEdK.png
[2]: https://i.stack.imgur.com/4w3pC.png

Attempting To Run Kotlin Project In IntelliJ Idea But Getting Bug Error

My Previous Question + More
I am trying to start learning Kotlin, and I have installed IntelliJ Idea from JetBrains, I really like the layout of the IDE, and so I don't really want to change it.
Whenever I try to run the program, I get the following error:
Could not open init generic class cache for initialization script 'C:\Users\Jacob\AppData\Local\Temp\wrapper_init1.gradle' (C:\Users\Jacob\.gradle\caches\6.6.1\scripts\9x7j38tmeo1ohlyu8452ntfdm).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60
I know it's not the code, and since I am not very familiar with IntelliJ Idea or Kotlin, I have no idea where to start looking for the error or where to fix it...
Someone said that this question's answers were the solution, but I looked their, tried what it shows, but still found now solution for my situation... When I follow what they say, I get the same error.
Someone please help!!! 😁
I created instruction:
Install JDK (for example Oracle JDK 14)
Open project folder with build.gradle and settings.gradle in Idea
Add JDK to project: press F4 on left Project Tool -> SDk -> Add -> Apply
Set new SDK to project: press F4 on left Project Tool -> Project -> Project SDK -> Set new SDK -> OK
Set new SDK to Gradle Build Tool: press Ctrl + Alt + S -> Find gradle in search -> Go to Gradle JVM -> Set new SDK -> OK
Create new directory src/main/kotlin/main.kt with code
fun main() {
val jdk = System.getProperty("java.version")
println("Using JDK: $jdk")
}
Go to main.kt in Editor and press Ctrl + Shift + F10 and you must see your JDK version in console like: Using JDK: 14.0.2
Take a look sample project

Kotlin, IntelliJ: math operator not working

Ubuntu Mate 20.04
IntelliJ IDEA Community 2020.2 EAP, installed through Snap
Kotlin 1.3.72, installed through Snap
JRE 1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
Project set up as Kotlin: JVM|IDEA using SDK 11 (java 11.0.6)
Code:
fun main(args: Array<String>) {
var experiencePoints: Int = 5
experiencePoints += 5
println(experiencePoints)
}
has a red squiggly line under the "+=" and produces the following error:
Error:(3, 22) Kotlin: Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.Int'. Check your module classpath for missing or conflicting dependencies
Changed the code to the following:
fun main(args: Array<String>) {
var experiencePoints: Int = 5
experiencePoints = experiencePoints + 5
println(experiencePoints)
}
Red squiggly line beneath the "+" character and same error.
This is Day 1 for me, following example in "Kotlin Programming, The Big Nerd Ranch Guide" by Skeen and Greenhalgh. No idea what to do about this error.
I had this in Intellij 2021.2 Ultimate on MacOS Catalina, and I did have the JDK installed. But in File -> Project Structure -> Project Settings -> Project -> Project SDK I had the Kotlin SDK selected. Makes sense, it's a Kotlin project, right? Wrong, it needs to be the Java JDK selected here.
Also under Platform Settings -> SDKs -> Kotlin SDK I was missing the Classpath. I'm not sure if this was necessary, but it was that way when I created a new Kotlin project from scratch. I ran into trouble importing an existing combined Java/Kotlin project.
I discovered that I didn't have default-jdk installed. Once I did, I found that there were extra options under File -> Project Structure -> Project -> Project SDK. I added user/lib/jvm/java-11-openjdk-amd64 java version "11.0.7" and the problem resolved.

intellij "object index is not a member of package views.html"

I've got Intellij 15.0.5 and I cannot get rid of this error
object index is not a member of package views.
I've created a new play project in Intellij and also using the activator command
activator new PlayTestProject
But I keep getting the above error. I've read all the other similar question on SO but none of them helped and I've tried the following
Right click the project -> Add framework support -> select "Play 2"
Result: I didn't see any change to my project. When I hit OK, the window disappears but if I try the same the second time. Nothing happens and the window is still there!
Preferences -> Languages & Frameworks -> Play2 -> select "Use Play 2 compiler for this project"
Result: I get this error
Error:Module 'client' production: java.lang.NullPointerException
I've tried
invalidate cache & restart
sbt clean
checkout a fresh new project
But I keep getting the same error in Intellij.
Running sbt compile on command line runs the build successful. But Intellij keeps shows me the above error.
How do I fix this ?
Alright if anyone is running into the same problem. The fix was to mark the following two directories as Sources Roots in Intellij.
/target/twirl/main
/target/routes
Steps:
Right click the target folder -> Mark directory as -> Cancel exclusion (If you don't see Cancel exclusion do the next step.
Right click the target/scala-2.11/twirl/main folder -> Mark directory as -> Sources Root
Right click the target/scala-2.11/routes folder -> Mark directory as -> Sources Root
Right click the project Open module settings -> Sources -> and remove the above two directories if there are added in the Excluded folder's section.
This fixed my problem.
I found this problem and it appeared to be caused by an incomplete compile within sbt. (I had done "sbt clean ; sbt compile" but then aborted the compile with Ctrl+C because it had a error.)
Intellij worked correctly again after I ran:
sbt clean
After removing the .idea/ folder, I could successfully re-open/import my project, and the errors were gone.
Just remove the #() from top of index.scala.html because there are no parameters.
#()
<!DOCTYPE html>
<html lang="en">
And in Action you have
def index = Action {
Ok(views.html.index())
}
I had a similar error and just had to run npm install to fetch the necessary dependencies. Listing it here in case anyone has the same issue.

Android Studio: How to attach javadoc

It might be very trivial question, But I couldn't find any option to attach javadoc/source with local jar dependencies (in libs folder) in android project. I can't believe I have spent a hour on such simple stuff :(
Google search result just tells about adding android documentation or adding javadoc in eclipse. That's not What I am looking for!
I found a solution just now since I can't find any other solution for a long time.
suppose:
your lib name is: libxxx.jar
javadoc name is docs.zip
under folder .idea/libraries, you can find libxxx.xml. replace JAVADOC with
<JAVADOC>
<root url="jar://C:/yourpath/doc.zip!/" />
</JAVADOC>
then ctrl+alt+y to sync the project. (Don't do "Sync Project with Gradle files", it will delete the changes)
I've found & tested a way in which we can add the javadocs without loosing them after a gradle sync.
Right click in Project panel > External libraries > lib-name
Click Library properties
Click specify documentation URL
And specify an URL. For my machine it was file:///opt/android-sdk/extras/google/google_play_services/docs/reference
The result was:
And after a project sync I could browse the javadoc of the google play services
Note:
This placed the same JAVADOC entry in the xml identified by Jason but doesn't disappear after doing a sync with gradle
It is possible:
Open Project structure
Navigate to dependency that you want
Press button from the screenshot and provide folder or file
Another way to attach sources:
Step into class from library (Hover mouse over class name and do CMD + Left click or CMD + B)
You will see decompiled version of class there menu on the top right side of editor "Attach sources.."
I had problem with answer from Matyas that I wasn't seeing my local .jar library in the External Libraries list, because it only show maven attached libs.
Solution is mentioned here: https://code.google.com/p/android/issues/detail?id=73087#c26
Right click on the "Structure" tab and check "Split Mode" (so you can open both "Project" and "Structure" tabs at same time).
Open both "Project" and "Structure" tabs at the same time.
In "Project" tab select "Android" perspective and then select your module folder (e.g. "app")
In "Structure" window you should now see list of all libraries, including your local *.jar
Continue as in answer from Matyas:
Right click on wanted library and select "Library Properties..."
If you have *.jar with javadocs locally, you can press "add" button (green "+") and search for the file on your disk (you don't have to type "file://" path manually).
Still a current issue as of my posting it seems:
https://code.google.com/p/android/issues/detail?id=73087
After some investigation, I stumbled upon this:
https://github.com/xujiaao/AARLinkSources
Works like magic!
I wasted so much time on this too...
Here's a gradle task which finds source and javadoc by location/naming convention, and registers them in the .idea files on sync. It belongs in the root gradle file's allProjects section. As-is, it expects to find [projectname]/libs/lib.jar next to lib-sources.jar and/or lib-javadoc.jar. Also, as noted in comments, if your javadocs not pathed at "/" inside the jar, you may need to change the script to add "docs/html" (for example) at the end of "jar://$doc!/".
allprojects {
task addJavaDoc {
afterEvaluate {
// Specify paths, this will be run per non-root project
def projectDir = project.getProjectDir().getCanonicalPath()
def rootDir = project.getRootDir().getCanonicalPath()
def lib = projectDir + '/libs'
// println lib // Uncomment this to troubleshoot
// Get any jar dependencies register in the lib folder
fileTree(include: ['*.jar'], exclude: ['*-source.jar', '*-javadoc.jar'], dir: lib ).each { File jar ->
def jarName = jar.getName()
def moduleName = jarName.substring(0, jarName.lastIndexOf("."))
// IntelliJ does this to file names when making the xml files
def escapedName = moduleName.replace("-", "_").replace(".", "_")
def xmlFile = "$rootDir/.idea/libraries/${escapedName}.xml"
// println xmlFile // Uncomment this to troubleshoot
if (new File(xmlFile).exists()) {
['javadoc', 'sources'].each {String docType ->
// Get sources or java doc by naming convention, (expects name-sources or name-javadoc
def doc = "$lib/$moduleName-${docType}.jar"
// println doc // Uncomment this to troubleshoot
if(new File(doc).exists()) {
def xml = new XmlParser().parse(xmlFile);
def xmlTag = docType.toUpperCase()
// Perform xml replacement by convention
xml.library[xmlTag].replaceNode {
"$xmlTag" {
root(url: "jar://$doc!/")
}
}
// Write out changes
new XmlNodePrinter(new PrintWriter(new FileWriter(xmlFile))).print(xml)
// Notify that changes worked
println "Fixed up reference to $doc"
}
}
}
}
}
}
}
Also, if you are using jcenter or mavencentral, javadocs and sources should work for downloaded jars without using that task, but you may have to add this in each non-root gradle file:
apply plugin: 'idea'
idea{
module {
downloadJavadoc = true
downloadSources = true
}
}
Personally tested successfully!
1.Project Structure(ctrl+alt+shift+s)
2.SDK Location
3.JDK Location
4.UnCheck "Use embedded JDK(recommended)"
5.Select your own jdk path(My Path:C:\Program Files\Java\jdk1.8.0_111)
6.Synchronized(ctrl+alt+y)
success
in android studio if you use compileSdkVersion 23 in buidl.gradle and you have downloaded the SDK 23 document file and source file in SDK manager , the android API and java API doc and source will all show auto, you don't need to manual set.
There is a solution, This procedure take place through terminal ,
I have tested solution in MAC OS.
1) Move to your project folder
2) ls -al (to show hidden files)
3) Move to .idea folder , Command : cd .idea
4) Move to libraries folder , Command : cd libraries/
5) Now you can see list of all xml files for your libs or jars. Edit it like , vi open androidasync_2_1_7.xml
6) In the editor screen ,
For inserting
Press i
Now you see <SOURCES /> tag we have to provide a path here like,
<SOURCES>
<root url="file://$PROJECT_DIR$/androidasync/src/main/java" />
</SOURCES>
For exiting
Press Esc
:wq //for exiting and saving
:q! //for exiting without saving
7) Restart Android studio (Sometime it needed also sync gradle).