I use Gradle to configure my new projects and import them into eclipse.
The project A (wtp) depends on project B (pure java).
Root
A (web application)
B (java dependencies)
I try to use gradle's multi project settings. In Project A build.gradle I've added
compile(project(":B")).
Inside eclipse I'm able to use the project B class, but I'm not able to run it in tomcat because of the following error:
"Could not publish to the server. Path for project must have only one segment."
Do You have any suggestions?
Related
is there anyway to append node.js application to java maven project as a dependency and to run it from inside the java maven project?
I know I can add it as a module inside the java project and run it via ProcessBuilder
but I got a requirement:1. this module will be built out of the java maven project and will be added to the java maven project as a dependency (with all the required node modules etc compiled inside ) 2. this module will be executed from the java maven project , is there any way to do that ?
Thanks.
I am developing a project A (Java Maven) which uses a library B (a JAR file)
I have the source code of library B, and I want to change code in project B, while it's used as library for project A.
Is that possible in Intellij to replace a JAR library by its source code ?
I'd configure a multi-module Maven project with the parent aggregate pom.xml and 2 sub-modules: for the app and for the library with their own pom.xml files.
Define a dependency on the lib module for the app module. IDE will resolve such dependencies via the sources and you will see the changes in the project instantly without the need to compile. Refactorings will also work across the modules so that you can rename a method from the usage in the app and it will automatically rename it in the lib.
Is there a way to create a gradle java project in IntelliJ with a client and server side that share a class library? Something similar to how Visual Studio allows multiple sub projects that can have their own .exe build for each and a .dll for the library.
Example:
+ Project
- Client (Separate .jar built)
- Server (Separate .jar built)
- ClassLibrary (used by Client and Server)
Yes, use File | New... | Module action and select Gradle type for the new module.
By default IDE will add this Gradle module to your project as a child via include '<project-name>' directive in settings.gradle file.
Then in your main/parent project build.gradle script you can add this Gradle project as a dependency: implementation project(':<project-name>'). See Gradle documentation for Project lib dependencies for more information.
I Have Created a BndTools OSGi project that generates a .jar file.Now i want the BundleContext of that jar in my main project i.e. Dynamic Web Project (.war File).
Dynamic web Project doesn't contain bnd.bnd file.So i can't inject that jar's dependency.
Are there any ways by which i can achieve this.
This can be accomplished two ways.
Quick and dirty way
Create dynamic web project
Right click web project > Choose Properties menu
Click on Deployment Assembly
Click Add
Select Project for assembly directive type
Select the bndtools project
Repeat for 2nd project you want
Deploy this web project to server or export war and notice that the output of the
Note this jar will only create the classes and no other resources that are usually created by the bnd.bnd file (e.g. correct Manifest, other included resources)
Better and more correct way
Deploy the 2 jar files created by bndtools to some artifact repository local or public
Create a new maven project using war packaging (e.g. default web project archetype)
Specify these two bndtools project jars as dependencies
Install the m2e-wtp plugin from its updatesite for Eclipse (which imports maven war projects and automagically creates eclipse dynamic web projects with all dependency references setup)
Import the maven web project using File > Import > existing maven project
During import the m2e-wtp project configurator will be activated and the necessary settings for including your 2 bndproject jars as dependencies will be correctly setup
How do I add my existing GWT/GAE maven project into a new EAR project in Eclipse? So my first step is creating an EAR project with target runtime of GAE, then after that I want to add my existing GAE/GWT maven project as a default module in it. How can I do this? I only see an option to add dynamic web application module.
Thanks.