Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
In my case I'm developing a Java web app and I want to add the Jersey JAX-RS API, but this question is general:
Is there any recommended/professional/best way to add external APIs to our projects?
I mean, in my university projects I always just import the jar files into my project in Eclipse/NetBeans, but I was wondering if there's a more professional way, also regarding to licenses and so on...
More professional way is to use Dependency Management Tools like Gradle, Maven, Ivy etc for your project.
Maven
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.17.1</version>
</dependency>
Gradle
'com.sun.jersey:jersey-server:1.17.1'
Ivy
<dependency org="com.sun.jersey" name="jersey-server" rev="1.17.1"/>
After this, there is single place in your project when all external libraries/apis are defined. There is very easy to check what you are using, much easier than looking inside JAR file for additional information.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I use the latest intellij, with latest hybris plugin. And today when I try to run the junit, then have following error
Try updating Hybris Integration plug-in to 2020.2.1.7+ version:
Bug fix. JUnit didn't work with hybris projects on java 8.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Currently I'am constructing an automation framework but need clarification on whether its a good idea to house the automation framework within the same directory of the application under test?
Example: I have developed an automation framework using Selenium WebDriver and Java and the application I'm creating scripts to test is built upon HTML, CSS and JavaScript, is it a good idea to house both projects together or seperate the maven project in isolation from the system under test (Website)
Your common framework should be an different entity and should be used like any other maven dependency and that common framework should not contain the tests for your application under test.
Its recommended that you should have the common framework as a different project and you should upload it in your nexus and use it as a jar in the application under test project. It's like making another maven dependency which would solve your common configurations and utilities problems.
Biggest advantage of that would be: Lets say you are working on web application and you have made the common framework and the web application tests in the same project and in future, if your application starts supporting mobile web as well, then you would need to make all the configuration and setup again which you have already made in the previous project. So, in order to make your code more usable and scalable, the common framework should be complete different project and there should not be any tests written in it so that in near future, whenever you need to support any other platform with the automation, you just need to add the common framework jar in that project and you would be able to fetch all the methods and configurations easily.
Hope that helps and answers your question!!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
this far i've been working on projects without using any build manager, i've used Maven just once before and found it pretty useful, so i'd like to start implementing it on my new projects.
I'm starting a Web application that uses Hibernate, JPA, Struts2, log4j, Ajax, Apache Commons Jquery and Junit but i'm failing epicly at finding the right dependency declarations to include in my Maven pom.
Is there some up to date list of the repos, artifact id's, etc that i could use?
Thanks in advance!
This is what I use: http://mvnrepository.com/
Apart from this I use
JBoss Maven Repository: https://repository.jboss.org/nexus/index.html#welcome
Java Maven2 repo: http://download.java.net/maven/2/ or http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html
I have these repositories in my pom.xml
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
</repositories>
<repository>
<id>jboss</id>
<url>http://repository.jboss.com/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
Just realized that there is an plug-in for Firefox to look into mvnrepository.com see here:
https://addons.mozilla.org/en-US/firefox/addon/mvnrepository-search/
Thank you #Sébastien Le Callonnec
NOTE: This tool seems to be bit old, on FireFox 3.6, it says, "This search engine isn't supported by Firefox and can't be installed." Sorry for misinformation.
Everything you want is on the default central repo.
http://mavencentral.sonatype.com/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Maven has changed from version 2 to 3 and so it has changed the ioc container from plexus to google guice.
So my wagon (to download artifacts from sourceforge file release area) for maven 2 must be rewritten to maven 3 to satisfy guice.
Is there a tutorial / api description / to learn how to change from plexus wagon to guice wagon?
org.sonatype.aether.connector.wagon.WagonRepositoryConnector is a good example to use wagon in maven 3
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I recently started a JavaFX project, and I'd like to use Maven as my compiler/deployment tool.
Is there a good tutorial or plugin to integrate JavaFX and Maven?
Starting with Java 7u9 I think JavaFX is shipped together with Java SE runtime and the rest, so it makes it pretty easy to create a Maven-based JavaFX project.
Here is what you do (assuming you have latest Java SE 7 runtime environment):
Go to directory where your JRE libs are installed: cd "/c/Program
Files/Java/jre7/lib"
Find what is the version of the JavaFX by reading the javafx.properties file. cat javafx.properties will produce something like: javafx.runtime.version=2.2.3
Now you are ready to install the JavaFX runtime package to Maven: mvn install:install-file -Dfile=jfxrt.jar -DgroupId=com.oracle -DartifactId=javafx -Dpackaging=jar -Dversion=2.2.3
Finally, create a simple Maven project, in say NetBeans, open your pom.xml file and add the following dependency:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>javafx</artifactId>
<version>2.2.3</version>
</dependency>
Once you save the pom.xml you can continue using your typical Maven workflow.
Please note I used the MSYS (http://www.mingw.org) environment on Windows in the examples above in the case you get confused. If you prefer Windows CMD it would be very much similar. I just do not feel comfortable without BASH and GNU tools such as sed, grep, etc...
This helped me a lot:
Blog Entry
In the beginning of the Blog Entry the author mentions another great Article that can be found here...:
Another Blog
The main "magic" is getting "settings.xml" right...
Afterwards...it is not that difficult.
I released a new version of the FEST JavaFX Compiler Maven Plug-in. This new version supports compilation of test sources. For more details please visit http://alexruiz.developerblogs.com/?p=1197
There is a maven plugin developped by an user of javafx.
See this mailling post :
http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-October/003969.html
and the github site :
https://github.com/zonski/javafx-maven-plugin
Alex Ruiz had a really good post on this recently and released a Maven plugin that should help you:
http://alexruiz.developerblogs.com/?p=725