Using Eclipse 2019-09, my goal is to use OpenPDF library, but first, I need to be able to debug its code a bit when calling from my test project.
I have created a workspace where I have created a simple java program that would open a PDF.
I have cloned the OpenPDF repo, and I have added the projects to Eclipse. They are Maven projects.
Now, I need to setup the relation between the projects, in order to use OpenPDF code.
I've read here that I should add openpdf project to the Projects in Java Build Path of my test project, but that is not clear. If I add the openpdf project to the Classpath entry there, it's not compiling because it does not find the openpdf project classes.
So, what is the right setup? (I am not asking how to refer a library through Maven and I don't intend to build a signed Maven library).
Related
I have a Java project, which is an Intellij IDEA project, not a maven or Gradle project,
I want to work with the project in Visual Studio Code now, but I have a problem, I have an external dependency for handling CSV files called Jsefa(Java Simple Exchange Format API).
How can I add this dependency to my Visual Studio Code Project so that I can build the project in VS Code easily that uses this library??
Can I do this with some modifications in the settings.json file? or is there another way??
Currently, I have a maven project that has a server running (using Jersey REST API). I also have a java project, I need to move all the contents of the java project into the maven project. The maven project is a subset of the java project. However, the maven project only displays the parts of the java project. However, I want a project that allows me to use maven and displays all of the other details from the java project.
I would've copied and pasted however I'm using git so I want to also preserve history.
I was thinking it would be easier to nest the maven project inside the java project but I don't know if that's possible.
Here's a picture of my package explorer to help explain everything.
Package explorer showing the maven project being a subset of the java project.
What I've tried is converting the java project into a maven project and then updating the pom.xml but then it doesn't link to the web.xml. Also, it tries to run the server with the name of the project name TeamProject. When infact it should run the url with the name client_server
I was considering just copying and pasting all the code into the maven project (from the Teamproject java project).
Actually nesting the java project inside the Maven project makes more sense, as it is the purpose of Maven to handle a project lifecycle. (also by default Maven will look for sources in the src/ folder which should ease the task of putting your Java project inside Maven's hands)
There are several possibilities I would see:
Copy your java project in the src/ of your client project and update maven accordingly (within the pom.xml)
Make your Java project a Maven project and aggregate the two projects in a parent pom (see Multi module maven project example)
Make your Java project a Maven project, and decide of a "Master" project between it and the client and compose one with the other (not sure that's a great solution)
Nesting your Maven project inside the Java project would not be so great because Maven could only handle the client and not your Java project, and then you'd miss on numerous functionalities offered by Maven (just look at how simple it is to get dependencies compared to downloading a jar and including it on the build path manually)
I've been doing some research on adding Maven to an existing Android project and I'm struggling to see how this works. I've used Maven once at work on a web based project with Netbeans, but for this project I'm looking to use IntelliJ. I can create a new "Maven Module", but I already have an Android project so I'm not entirely sure that's the route I should be taking.
I found this post which does provide some detail, but not a step-by-step windows integration guide (at least that I'm seeing).
Is it possible for me to use Maven within an Android project?
Edit: I'm looking to do this within a Windows environment
To answer your question in the last sentence: Yes, you can use Maven to build an Android project.
You should use the maven-android-plugin in your Maven project. The best place to get started is https://code.google.com/p/maven-android-plugin/wiki/GettingStarted. Need to read up a bit, but definitely worth the effort.
If I have existing IDE specific Android project that you would like to switch to Maven, instead of trying to "add Maven support to an existing IntelliJ project", I would:
Create a new Maven based project using an appropriate archetype https://github.com/akquinet/android-archetypes
Copy existing source/resources to the Maven project directories.
If done correctly, you can open this (Android) Maven project (pom.xml) in IntelliJ and use it like an Android project (including GUI editor). IntelliJ automatically generates an IntelliJ project from Maven's pom.xml and detects the Android facet.
This way, your project also stays IDE agnostic - you can do everything (build/test/deploy) from command line as well - how Maven projects should be IMHO. :D
I have an existing EJB project set up in Eclipse Helios, and would like to slowly introduce Scala into the project. The Scala IDE has been installed successfully, and I'm able to create standalone scala project. The issue however comes when trying to use my existing project with scala additions. I've went as far as manually editing the .project, .classpath, and related files under .settings of the project's home directory for eclipse.
However I still have the issue where the Java compiler tries to compiles .scala classes, which results in errors and ultimately not being able to build the project.
Has anyone faced a similar scenario or are there any workarounds?
Thanks in advance.
You should be able to right-click the project, go to "Scala" and click on "add scala nature". Then .scala files should be recognized as such. You might also have to add the scala library to your dependencies. Depending on whether this is a "simple" Eclipse project or you're using Maven there might be other steps required.
Right click on project, and choose Configure/Add Scala Nature.
I have an eclipse plugin project which dependes on java project in my eclipse. usually what I did is export the project as jar and use it as-is in the plugin. but this requires manual work. can I have a reference from my plugin projct to a java project that will be both compile-time and run-time dependency ?
I saw a similar question, but not exactly the same.
I think, the closest thing to this is to create a jar file from the referenced project, and import it to the projects repository. But thats quite hard to manage for a currently developed project.
On the other hand, isn't it possible to simply convert the Java project into a plug-in permanently? If the other user does not use OSGi/Eclipse, he/she will see only a manifest/manifest.mf file (and possibly a plugin.xml) next to the java project specific stuff, so this would not disturb them, but would help you.