Can Java Netbeans desktop application and Maven work together? - java

I have developed a java desktop application in netbeans 8.1 for a security project I am currently busy with.
I have been asked by the client to add Google drive or DropBox to the desktop application for storing the data files on the cloud storage at any of the two mentioned above.
I have done research and have seen that the only way to get this to work is to use Maven or Gradle.
I have picked up that there is Maven projects in Netbeans, But I would like to know if the following is possible:
Would it be possible to just copy the desktop application to the Maven created project?
Do I need to use the dependencies to add the jars needed for the desktop application classes?
Will I need to re-download the jar files or how can I add the jars that I currently have on the computer to the Maven project?
Will the copying of the normal desktop application to the maven project affect any of the other features created previously?
Does the Maven project work differently from normal java desktop applications created in Netbeans?
I would be very grateful for answers to this or any other information that would help out. I do not want to start this transition and land up it not working out.
Any information will be tremendously helpful.
Much appreciated for your help

At work here, most java developers use netbeans with Maven.
Netbeans for java is built around Maven.

Related

How to share code between Eclipse Swing/maven and Androidstudio / gradle project?

I am an experienced Java developer with years of familarity with Eclipse and Maven.
My goal is to create an android application and I am getting familiar with the latest Development environment Android Studio 2.3.2 which obviously uses Java 8 and Gradle. The app shall share code with an Eclipse based project that uses maven and Swing and is also Java 8 based. I am intending to publish the result as an open source project on github.
I found e.g.
https://github.com/uhafner/android-config as an example but that seems to be outdated.
https://github.com/cgeo/cgeo - which explictly states that eclipse is only used for codewriting/testing
Gradle project for plain Java and Android with single source tree suggests an answer for a gradle only approach that has a tutorial link as an answer (which is not accepted) and no example
https://github.com/javadev/calc which is purely maven driven and has two pom.xml files
https://github.com/adrian/upm-swing and https://github.com/adrian/upm-android simply have copied subdirectories instead of any kind of shared config management
How feasible is a combined maven/gradle project structure?
What would be a proper way to structure the project files to accomplish the above goals?
What are good examples projects that follow a similar approach?
My reason to be reluctant with Gradle and IntelliJ is obvious. It is an unfamiliar environment for me and android is not the main target of my development.
Part of the answer seems be covered at:
Can Android Studio be used to run standard Java projects?
I got somewhat of a success with the project https://github.com/BITPlan/can4eve
but would appreciate some help on the android studio / gradle side of things.
The project also has travis support built in and I am also running nightly Jenkins checks based on maven.

Multi-project app in Eclipse with maven

I'm used to Visual Studio, so Eclipse is very new for me.
I have to start (ASAP) developing a project that contains 3 subprojects:
1 - Business logic library with Hibernate support
2 - JavaFX configuration utility
3 - Spring MVC app with a lot of JavaScript inside
2 and 3 use 1 as a core.
I've tried to google manual but all of them were about parts of this task, nothing about the complete solution.
I can create all 3 projects and put them in same subdirs in a solution directory. But how to connect them to core lib? Maven looks great for it, but I can't explain him how modules have to be connected.
How to make such a structure?
At the risk of being shot down in flames, in my opinion Eclipse does not handle structured projects as well as Visual Studio. (I program Java/Eclipse at work and use VS aka Atmel Studio at home for hobbyist C++/Arduino projects).
In Eclipse, I have found to best to check out each component to the top level and compile each component separately (mvn clean install). The output of this is generally a .jar file that will be installed in your local maven repository. You then list that jar as a dependency in the pom.xml file of the higher-level components.
I suggest you install M2Eclipse or some other Maven client into Eclipse. They are not perfect, but are far more productive than doing everything manually.in my opinion.
Also Eclipse supports multiple workspaces quite well. One workspace per major multi-component project works well.

eclipse wont let me create a dynamic web project

I recently downloaded java7 and eclipse indigo to my computer. I am trying to create a dynamic web project but it wont let me. It will only let me create General, CVS, Java, and Maven projects.
I would like to compile a project into a WAR file and am having difficulty.
If you have downloaded the Eclipse Classic or the Eclipse for Java Developers package, you will need an additional component called Eclipse Java EE Developer Tools. I suggest you install the whole Web,XML, Java EE and OSGI Enterprise Development section.
If you download Eclipse IDE for Java EE Developers you won't need to add it.
Use this guide to install new components in your IDE.

Choosing Netbeans project template or maven's project template

I'm little confused because of too many options when we take anything in java. I want to create a web application in java. whether i have create web application from 'java web' or 'maven' by creating new project in netbeans. I may use some archetypes in my future, but whether maven project has full IDE support from netbeans
I've been using Maven projects in NB 7 without a problem.

How Do I Package and Deploy an Eclipse Java Application?

I have built a Java application that has some dependencies (~10). I would like to easily package this application up and deploy it as a single file to a CD or USB drive.
There doesn't seem to be any "nice" wizard to search the project, grab the dependencies and setup the classpath on the target computer. I have to do this manually.
Is there a better way? Something simple, easy and straight-forward. A link to a tutorial on this would be great.
Seems to me that this should be a built-in feature to eclipse. Deployment of a web application seems easy enough, but not a Java application.
Have a look at the Fat Jar Plug-In.
That's because desktop deployment isn't well defined.
You are heading into release issues which is a huge can of worms.
I assume you have some form of version control like SVN or git? If so check out maven with the release plugin and maven-assembly-plugin
It'll take a lot of work to setup, but once you get it going you'll be cross linking and deploying distribution packages in no time!
Plus you'll have access to the vast maven repos on the web right now

Categories

Resources