I am trying to run LibreOffice's examples in a small Maven project. Netbeans does not seem to find dependencies in Maven.
For example:
import com.sun.star.awt.Point;
It seems hard to believe that LibreOffice's dependencies are not available in Maven. Or aren't they?
They are not..
http://repo1.maven.org/maven2/com/sun/star
http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.sun.star%22
Arguably that should be fixed. I would suggest to raise an issue with LibreOffice and in the mean time install your own repository server like Sonatype Nexus and deploy the needed jars there.
Related
That looks easy enough: search the net in which package they are, copy the dependency into your pom.xml and here you go!
But I didn't didn't anything that I could use as a dependency.
Not much of a surprise, other people had the same problem, and solutions can found here https://stackoverflow.com/a/29270114/4142984 in combination with https://stackoverflow.com/a/15692230/4142984 .
In other words, those solutions suggest to get the jar manually and hard-link it in you build-path. It worked, though.
But isn't maven supposed to do that?
Question is: what did I miss, to tell maven to do this.
And I'm using maven with eclipse, just in case this would make a difference.
The links you provided suggest adding a JAR to your project CLASSPATH. That's not using Maven.
If you want to have Maven manage that dependency, and it's not in a Maven Central repo, you need to do an mvn install to your enterprise or local Maven repository.
I'm not if this Maven plugin is what you need. Maybe you can consider that as well.
I want to study the java spring portion of the Jbehave-tutorial project at https://github.com/jbehave/jbehave-tutorial.
The README.MD states the REQUIREMENTS for building at the bottom:
Building the tutorial has been tested with Maven 3.0.5-3.2.1 and JDK 1.6-1.7. Newer versions of Maven and JDK should work but could also present issues.If you find any, please report them via JIRA
On my computer My Computer I am running Maven Version: 3.3.3 and STS Version: 3.6.4 for 64-bit Windows 7.
I really don't want to make an Atlassian account in order to resolve this issue if I can resolve it on StackOverflow.
So these are the steps I took to build JBehave-tutorial on my machine:
git clone https://github.com/jbehave/jbehave-tutorial.git
mvn clean install -Pstable # Issued in the main parent folder 'jbehave-tutorial'
Imported into Spring Tool Suite (STS) as an existing maven project.
Received the following errors in STS:
This lead me to believe that maven did not correctly download and build those dependencies so I looked into the .m2\repository\org\jbehave folder and this is what I seen.
Did anybody else get this to work?
What workarounds are there?
What correct maven dependencies to specify for JBehave tutorial project in pom.xml(s)?
I'm not immediately clear on your specific situation but here are dependencies required to use JBehave without Spring. (example pom below - you'll only need gherkin if your user scenarios are in gherkin).
https://stackoverflow.com/questions/30685909/jbehave-dependencies-not-available-in-central-maven-repo
I'm also going to hazard a guess that you're going to need the below at the appropriate version.
<dependency>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-spring</artifactId>
<version>4.0.3</version>
</dependency>
Maven cannot find "SNAPSHOT" dependencies.
You need to google "Maven + dependency name without specified version" and check what is the latest version of them and make appropriate changes in pom file.
For example I have jbehave-web-runner version 3.6-beta-2 NOT 3.6-SNAPSHOT.
I'm working on a project in Intellij IDEA which is divided into several Maven modules. Moreover I configured these modules as WAR artifacts, so they can be deployed to a Tomcat 8 independently. During development I recognized a behavior I couldn't solve so far: If I add/remove a dependency in a module's pom.xml these changes are not considered in the lib-directory of my final artifact, leading to ClassNotFoundExceptions on server startup and so on. The only solution that came up to me is to fix these changes in my artifact settings manually, which works but seems not very handy to me. Is there any way to configure IntelliJ to synchronize an atrifact's lib folder with Maven dependencies automatically?
Sorry in case of duplication. I already found questions related to this one, but these solutions as well as the JetBrains docs have not been successful so far.
Thank for helping me!
Finally got it. The problem arises if you create WAR artifacts 'manually'. Because IntelliJ uses pom.xml to configure artifacts automatically, including war makes IDEA creating all necessary artifacts for you. These are always up to date with your Maven dependencies.
I am new to Maven and I faced a problem when I tried to convert my current project from using Ant -> using Maven.
That project requires many Jars, and I look up those jars on mvnrepository and add all to POM.xml.
I don't know if some dependency is redundant.
Do you guy know any way to check if which dependency which I really need?
The Maven dependency analyzer plugin is just what you're looking for.
Just run
mvn install dependency:analyze
(on some platforms, for some reason, the full notation is required:)
mvn install org.apache.maven.plugins:maven-dependency-plugin:2.9:analyze
And review the report it produces.
I'm having some issues making the maven google app engine plugin work properly.
First of all, I'm not even sure if the archetype I'm using is the correct one, their examples show version 0.7.0 but it seems like never versions exist (i tried 0.9.1 and that works), where can I find a overview of what versions of the plugin is available?
Secondly, the archetype seems.. messy, I don't like the package structure and it doesn't seem to actually include the GAE and GWT dependencies. I have to manually add them to my project in Eclipse, which kind of defeats the purpose of using maven. And how come they are breaking the gwt maven plugin? I know that one includes the actual gwt jars as maven dependencies?
I'm fairly new to Maven, but I have been using the gwt maven plugin for a while, and I'm very happy with everything about it. Is there any way I could just their archetype to do the base project and add the gae plugin to it?
UPDATE
I suspect the problem I'm seeing with the GAE maven plug-in is in regards to undefined properties in the POM. I have no idea if its due to error these aren't set-up or if its due to me actually have to manually set them up. The documentation on this plugin is sparse.
Thanks for the answer below, but I really don't want to add another archetype into play. I think the best solution for me is to try and adapt a GWT maven project manually, to include support for GAE.
I've used the archetype like so :
http://code.google.com/p/gae-mvn-archetype/
to generate a GAE project template.Then manually added my other dependencies. This got me a usable project which I can deploy to GAE and everything.
Also, for Eclipse importing, once the template project was done, I've imported it into eclipse using the m2_eclipse plugin :
http://m2eclipse.sonatype.org/installing-m2eclipse.html
(note that i've imported it into Eclipse as a Maven project, NOT as an Eclipse whatever project)
This imported the thing into eclipse with all the necessary dependencies and without errors.