Installing Vaadin Charts Trial License in Intellij Idea, Windows platform - intellij-idea

As the Book of Vaadin explains I added the maven repository;
<dependencies>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>vaadin-charts</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
But the resolving becomes unsuccessful for 2.0.0 so I used 1.0.0 which was successful.
I got the TRIAL license key from vaadin but I cannot find a way to install it. My IDE is intellij Idea and im using windows 8. When i deploy the tutorial in the book of vaadin without the license i get the following error.
HTTP Status 500 - com.vaadin.server.ServiceException: java.lang.NoClassDefFoundError: com/vaadin/addon/charts/model/Series
Any help regarding this is greatly appreciated.

I worked out the issue by starting the vaading project using Maven in intellij idea. I didnt go for the Vaadin application but went for a new project using vaadin maven repo.
It downloaded the needed resources through the repo. And I ran the package maven goal to get my widget set compiled.
as to the licensing problem I had, It was solved by placing the licence key in a file named .vaadin.chartsdeveloper.license inside my home
that is in windows, : C:\Users\username
Now all is working fine.

Related

Lombok Issue In IntelliJ

I have lombok plugin installed on Mac IntelliJ, but for some reason my intelliJ not finding log.info or other logger methods,
i verified the below settings, looks good.
Lombok annotations do not compile under Intellij idea
i reinstalled my lombok, and cleared cache and reset it, though no luck. I have re-installed IntelliJ.
I've cleared few setting under "~/Library/Preferences" too. Not working any suggestion?
I primarily use Lombok for auto generating the getters,setters, toString etc. Even though you have downloaded it as a plugin, have you imported it in your pom.xml if you are using Maven project?
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
my intelliJ creates main.iml and test.iml after import. After removing those files, works fine. Thanks for your inputs.

How to download JAR from Maven and add to non-Maven IntelliJ WAR project

I need to setup https://github.com/adminfaces but i can't make it work at all. I get errors in wildfly deployment.
I setup intellij project, i select framework support for JSF, and Primefaces which are prerequisites. But than docs say:
Add admin theme to your classpath:
<dependency>
<groupId>com.github.adminfaces</groupId>
<artifactId>admin-theme</artifactId>
<version>1.0.0-RC9</version>
</dependency>
How do i do this if i don't use maven? Can i set it up, via some jar file. Also i don't get it, if i download release from github, what is install.sh?
But even if i added it through maven via Intellij browser it still doesn't work. Can't deploy to Wildfly.
Maven library can be added to non Maven project through Intellij IDEA.
Project structure->Libraries->Add library->From Maven
AdminFaces jars are published to maven central, you can download it there, see here.
Just add admin-template and admin-theme to your classpath.
Also it depends on OmniFaces (2.x) and PrimeFaces (5.1.1 or greater) and also JavaEE apis such as servlet, EJB, CDI, JSF and JPA.
If you are running it outside a JavaEE container such as Tomcat take a look at Admin Starter Tomcat dependencies, you should be able to download them from maven central as well.

intellij JavaDoc browser plugin can't find javax

I'm on Arch linux x64 machine , I installed intellij idea but whenever I open a project a startupabortedexception occurs with the JavaDoc browser plugin.
I looked into my idea.log and figured out that it can't find javax.servlet.Servlet, I disabled the plugin in order to open a java project and indeed when I type import javax; it says it can't find javax.
I have java-openjfx installed and still intellij can't find it, what to do in this case ? .
Environment information
jdk:openjdk 1.8.0_60 64 bit.
intellij version: 14.1.5 community edition.
Goal
My goal is to get the JavaDoc browser plugin to work not to program in javax.servlet, I don't intend to do any web development with java right now.
If you don't have Maven project, you can just add the jar to the project. The one you are missing can be downloaded from:
http://mvnrepository.com/artifact/javax.servlet/javax.servlet-api/3.1.0
(just click "Download (JAR)" button)
The class javax.servlet.Servlet is not part of the standard JDK, it is part of the JEE, so you have to add servlet-api.jar to your classpath.
If your project is a Maven project you add the dependency like this:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
And you probably want to add
<scope>provided</scope>
as this dependency is most likely present in your application server.

How to add Java EE Servlet API library on your compile classpath in IntelliJ

I am new to IntelliJ and I have been working on a few small projects to familiarize myself with IDE and how to develop Java web projects with it.
I recently picked up Professional Java for Web Applications to practise my web development skills and I wanted to try it because it focuses on IntelliJ rather than Eclipse.
My main issues are from not knowing my way around the IDE at all. I have come across a problem that I have been unable to figure out how to do correctly.
How do you add Java EE Servlet API library on your compile classpath ?
Where is the compile classpath located in IntelliJ ?
Any help is appreciated!
This depends on how you are managing dependencies in your project.
If you are using Maven simply add it as a dependency in your pom.xml. When IDEA sees a maven based project it will over for you to Import Changes and/or Enable Auto Import. A common JavaEE 7 maven dependency would look like this in your pom.xml:
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
If you are only using an IDEA project to manage things (vs. maven, gradle etc.) then you can go into the project structure dialog, click on modules and select the module containing your web tier code. Then click on the dependencies tab. Then click on plus button (+) and add a JAR, then navigate to the JAR containing the servelet APIs that is bundled with your application server and select that.
There are another half dozen ways to set this up and exactly which one you choose depends on a lot of factors like how you want to manage provided dependencies in your project etc. Either of these methods should get you on your way though.

In what maven2 repository can Google Guice be found?

As far as I understand Google Guice 2.0 is out not so long ago. But I see that central repo still has outdated 1.0 version. Please, tell where can I find maven2 repository with Google Guice 2.0.
Guice 3.0 is now available on central. You'll need the following to depend on it.
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
Sadly, they haven't uploaded source jars, and the class files have been compiled with Java 6. This may be a show-stopper for you…
Guice 2.0 is now available in the official google-maven-repository. To use it, add the following to your pom.xml inside of the <dependencies> tag (you'll need to add one if there isn't one):
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>2.0</version>
</dependency>
You shouldn't need to, but you can add a reference to the official google-maven-repository in your pom.xml by following the instructions here.
Since I don't see Guice 2.0 in central I thought I'd include a stable repo where I found it:
https://repository.jboss.org/nexus/content/repositories/thirdparty-uploads/
The Grails OpenID plugin references http://guice-maven.googlecode.com/svn/trunk/ but that doesn't have it (currently).
They will put it to the central repository soon, as they promised here: http://groups.google.com/group/google-guice/browse_thread/thread/6707a887ed5ef2e3
Never mind. Guice-maven is intended to provide this.
Until it reaches the central repository, I've been getting it from here: http://guice-maven.googlecode.com/svn/trunk