Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all 5661 articles
Browse latest View live

Maven multi module pom dependencies between modules

$
0
0

We have a multi module pom with a top level project that has two child jar modules, where the second child module has a dependency on the first child module's jar (in the dependencies section of the pom).

 

IntelliJ correctly creates the module structure, but the second module gets a dependency on the maven repo jar instead of a module dependency on the first IntelliJ module. This means that changes made in the first jar module are not available in the 2nd jar module, because it is using the jar from the maven repo instead of the compiled classes from the first module. The simple solution is to manually add a module dependency to the 2nd jar module. But every time the pom changes it is reimported and this dependency disappears.

 

Do anyone have any advice how to construct a multi-module project in a way that IntelliJ will interpret it as a module dependency instead of a maven repo dependency?

 

Any help would be appreciated.


Create module dependency when opening multiple gradle projects with matching group:artifact:version:

$
0
0

I have two separated projects in different repositories

Both project are using gradle build system

Project A has project.group=A, project.name=a and project.version=1-SNAPSHOT

Project B has project.group=B, project.name=b and project.version=1, and it have gradle dependency to A:a:1-SNAPSHOT

Typycally I want to be able to work with B without cloning A's repo(consider there are many projects like A so it would be a pain). I have jenkins that is building A and uploading it's artifacts to nexus, so everything works fine in this case.

 

Sometimes I want to do some work that affects both A and B. In this case I clone A and B, open B's project and add A as another gradle project there. I am using (+) button in gradle tab.

Unfortunatelly, when I am doing this, idea do not understand that reference to A:a:1-SNAPSHOT in B is now pointing to attached gradle project and not to snapshot in nexus. So every time I am doing this I have to go to module settings, remove reference to nexus snapshot and add reference to idea module A. And I have to repeat it every time I change something in gradle file and force gradle reimport.

 

Basically, as I understand Idea have good gradle support for cases when you organize whole project in single repository with root gradle proejct file.

While this is typically suffitient there are lots of cases when such project organisation is not convinient or impossible.

Examples are when part of your projects are delivered to open source(or are forks of other open source projects) or when multiple teams support almost independent components, so putting them all to single repository and keeping them always loaded as soures to IDE is bad idea.

IntelliJ not showing code while debugging

$
0
0

I am working on a new project in which I am using Gradle to build a small SpringBoot service.  I am building and running the service from the commandline, with JVM parms to set the debug port and pause the JVM until the debugger attaches.  All of that appears to be working as expected.

 

In IntelliJ, I created a remote debugging profile and am connecting to the process on localhost w/debug port specified and the debugger attaches to the process and even stops at break points.  However, when a break point is hit, the source for that breakpoint isn't shown.  It isn't telling me it cant find the source code... it acts like it isn't even trying to locate source.

 

Any suggestions as to why that isn't working as expected?

 

[[UPDATE]]  I discovered that when I imported the Gradle project IntelliJ failed to recognize and mark the source folder in the project.  The result was that the debugger couldn't find any source at all.  Adding the source in the Module Settings dialog's Module's Paths tab solved the issue.

Java: see compile errors throughout project on save?

$
0
0

I've tried to switch from Eclipse to IntelliJ for my Java development. The one issue I have is that I want to quickly see any compile errors throughout my project when I make changes in a given file. E.g. if I remove a method, I want to see all of the resulting compile errors in any file in my project.

 

How can I do this in IntelliJ?

 

Thanks.

When using the GUI Design to paint UI, why not set layout is null?

$
0
0

hello all,

When using the GUI Design to paint UI, why not set layout is null?

Making a JavaFX Artifacts

$
0
0

Hello

 

I'm trying to make a executable javaFx file with Intellij 13.1.4 and java SDK 1.6 but i can't get it to work.

 

When i try to Build Artifacts i get this error

 

Error:Java FX Packager: Unable to build JavaFX artifact. Application class should be specified in artifact's settings.

 

And when i go to File - Project Structure and the Java FX i find a Application Class but nothing i choose will work here. I always get the error "TestMain is not acceptable" where TestMain is the file width my public static void main method in.

 

Any help would be appreciated.

 

Best regards

Thomas vestergaard

How can I work in community edition with glassfish?

$
0
0

Hi!

 

How can I work in community edition with glassfish server app?

 

Or what should I do in order to begin working with glassfish server from intellij idea community edition?

 

Thanks.

File structure on CTRL+F12 dissapeared in 13.1.5?

$
0
0

Hello,

 

I am used to some shortcuts not working occasionally (a couple of bugs have been submitted, apparently related to the terminal subsystem).

 

I restarted the ide, CTRL+F12 is still not accessible here in 13.1.5 on linux mint 17 xfce, can anyone confirm (or infirm) this?

 

many thanks,

john


Git Commit says no changed detected

$
0
0

Hi,

 

When I change a file and then select git | commit within Intelliji Idea it displays "No changes detected" message.  However, if I run git from the DOS prompt it shows the changes and allows me to commit my changes.  How can I fix this in Intellij?

 

Thanks,

Structural Search for all method calls that have an annotation

$
0
0

I would like to create a Structural Search for all method calls to methods that are annotated with a specific annotation.

 

For example, imagine wanting to find all method calls to methods marked @Deprecated.

 

I can start with this template:

 

    $Instance$.$MethodCall$($Parameter$)

 

But then what do I do to the MethodCall variable?

How to activate the built-in HTTP Server in a Java Web-App Module?

$
0
0

Hiya,

 

I have a project that uses server side CDI beans, Servlets and a JAX-RS interface, in combination with an AngularJS SPA front-end, all deployed in a single WAR file.

 

I have mocked all the REST services with Angular's $httpBackend, so I can work on the client side stuff without the Server running, and I can also auto-deploy to JBoss as an exploded WAR and work on the server with the real back-end.   So far so good.

 

My issue is in this: 

- If I select "Static Web" when creating the new Module, I get the built-in HTTP Server in IDEA, which allows me to run all my Angular and static web stuff.  Using "Open in Browser" on my SPA index.html opens a browser with a URL that starts with "http://localhost:63342/...", which means the mocked client-side application works - it's all being served by the same embedded web server.  But then I don't get the Java Facets on the module, which I need.

- On the other hand, if I select Java|Web Application etc when creating the module, I don't get the built-in HTTP Server.  "Open in Browser" starts a browser with a URL that starts with "file:///C:/...", and my client-side Angular application fails with "Cross origin requests are only supported for HTTP".  The embedded server doesn't seem to be running. 

 

So my question is how do I activate the built-in HTTP Server in a Java/WebApp module?  Any hints?

 

Thanks very much,

 

Adam Crowther

IDEA 14 Community Edition

$
0
0

I often work with binary data.

 

1.

How I can see binary(hex) values in Watch window for ordinary variables and digital arrays?

 

2.

byte array b

In variables window show as hex - b[i]=0x99

If i try edit this to 0xE9 will appear error window "Type mismatch".

Why?

 

3.

You show hex values only in variables window, but for temporary variables IDEA reset view to decimal every cycle.

You can fix it?

 

4.

You show hex values only in variables window, but not save this view mode in project settings.

Reload IDEA will reset view to decimal every times.

You can fix it?

How to avoid navigation popup large size?

$
0
0

Sorry for big image

I have task panel in windows on left side. My problem is that navigation popup is too large and I not see class name How to fix pupup size? Or customize class path to some shorter relative representation? http://clip2net.com/clip/m5889/f1169-clip-328kb.png

I'm having issues with IntelliJ building when I make changes to maven files.

$
0
0

Originally from http://stackoverflow.com/questions/25769094/how-do-i-rebuild-make-iml-files-in-maven-multi-module-project-in-intellij-13-1

 

I'm working in a multi-module maven project in Intellij. There was a snapshot update in another module which required an update in a few POMs. Normally I will click the "Re-import all maven projects" from the maven plugins tool then do a full build.

 

However, this time the .iml files associated with the changed POMs weren't being updated. It wasn't until I did "Build->Rebuild Project" that the .iml files were updated. Does anyone know how to update .iml files as part of a build configuration?

 

Note: Before rebuilding the project, I know mvn at least picked up on the change because my local .m2 repo had the latest snapshot.

 

EDIT #1: So, this is also true if I add a maven runtime dependency in a module. It won't pick up the change unless I do rebuild project.

Application server deployment locations

$
0
0

Howdy friends, I have been fishing around for a whlile trying to figure out why my tomcat application server deployments are all named with Unnames_<project name>, I have attached a screenshot.

 

I sort of expected the firstone to be Unnamed because that how it is defined in my build configurations. Sense i have started working with testing deployments on different version of tomcat, i wanted to change the name of the run configuration. every time i do that, all i get is Unnamed_(1)_<projectName>. I would expect this folder to get named something like "Tomcat_7.0.42_<projectName>" another screen shot is attached.

 

im on a Mac, using intellij 13.1.4 Ultimate edition.

 

 

On a side note, I think it would be a good enhancement ot auto open the tomcat deployment logs directory when i try and add a log to a run configuration. Right now, i have to go through all the folders down to /Users/<username>/Library/Caches/IntelliJIdea13/tomcat/<runConfiguration>.

 

Thanks for any help guys. Its not really a big deal, just something i expected to be automatic for some reason.


LiveEdit ends after start of inspector

$
0
0

I'm using LiveEdit plugin in IDEA for live editting and debugging in Chrome browser. When I turn on web inspector, live editting ends and Jetbrains IDE support is disconnected. Can you explain me why I can't use live edit with inspecting? Is it possible set up?

Why can't I use the same abbreviation in LiveTemplates?

$
0
0

I have a livetemplate, consisting of two parts: some HTML, and some CSS. I created two live templates for that, one which is applicable to HTML, and one to CSS. I'd like to use access those live templates with the same abbreviation, which should be possible IMO, since they are in different contexts. However, IntelliJ doesn't allow me to do so and reports an error.

 

So my question is: why is this limitation? Can it be removed, or is there a good workaround for this?

 

Thanks,

 

Erik

Disabling blue balloon notification

$
0
0

Scenario: The package statement of a class has an error and I want to fix the package with alt + Enter.

 

Result: IntelliJ wants to be helpful and shows a blue notification (see screenshot). The balloon seems to “overwrite” my caret because when it’s displayed and I hit alt + Enter then I don’t get the option to move the class or reset the package but the class shown in the notification is imported. I always have to hit ESC first before hitting alt + Enter.

 

I already disabled all notifications with Preferences > Notifications > Display balloon notifications. But the blue annoyance still appears. Is there a way to suppress this notification?

 

   

Thank you kindly.

Organizing classes in a directory

$
0
0

I have a bunch of classes in a directory and want to order them in the Project tab. Like, for example, I want to put all the files that I set to read-only at the end of the list so that I can focus only on the ones that I'm currently working on, or at the very least, try to separate the classes that I might edit soon from the classes which will almost certainly not change for a while. At the moment, I can only get the classes ordered alphabetically. Is there a way to achieve what I want?

Spring MVC as a new project type

Viewing all 5661 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>