OpenDolphin Maven on Netbeans basic config - maven

I'm trying to get started with JavaFX / OpenDolphin and have downloaded the jumpstart zip. When I import the Maven zip into Netbeans, I get the expected project tree. Then I try to run jumpstart_0 and get the following error:
Could not find artifact MyFirstDolphin:server:jar:1.0-SNAPSHOT
As Maven is also new to me, I am puzzled as to where to begin solving this problem.
Two suggestions by HelpWiki are:
The POM misses the declaration of the repository which hosts the artifact.
The repository you have configured requires authentication and Maven failed to provide the correct credentials to the server. In this case, make sure your ${user.home}/.m2/settings.xml contains a declaration whose matches the of the remote repository to use.
Here is the current pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>MyFirstDolphin</artifactId>
<groupId>MyFirstDolphin</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>shared</artifactId>
</project>
There is obviously some basic knowledge I'm lacking and it would be great if someone could shed some light on this. DolphinJumpStart doesn't work 'out of the box' in Netbeans 8 on Windows 7, so there must be others with the same problem?

Related

How to use smartics-jboss-modules maven plugin in maven project

We can create module.xml manually and keep it in modules folder of Jboss. But to autogenerate it, there is a plugin called smartics-jboss-modules-maven-plugin. Has anyone implemented it in maven project. My requirement is to generate module.xml and module from maven project and automatically add it to jboss modules folder. I need to know the exact steps to implement it in my project.
and inside that particular folder make sure you create a file that complies with the following model
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
</project>
As documented in here:
https://www.smartics.eu/confluence/display/SJBMMP/The+smartics+JBoss+Modules+XSD

Can't figure out a global setting for pom.xml

I'm trying to compile an open source project on Github that has no build instructions. I know it's built with Maven, but there are some variables that need to be set in settings.xml and I cannot find in the Maven documentation anything about the custom variables (outside of "servers", "proxies", etc). I found this answer that helps a bit, but I still cannot figure it out.
For example, Where do I set the value ${global.awe.version} used in the top level pom.xml file, where it seems to be defined 2 lines later:
<global.awe.version>3.6.0-rc-05</global.awe.version>?
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
...
<version>${global.awe.version}</version>
<properties>
<global.awe.version>3.6.0-rc-05</global.awe.version>
<global.awe-api.version>2.2.0-rc-05</global.awe-api.version>
</properties>
...

Maven version error during build

I get the following error when I am trying to build my project
Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.25.0:validate-version (default-validate-version) on project com.google.guice: Maven version 8.0.0.qualifier must have -SNAPSHOT qualifier for SNAPSHOT builds -> [Help 1]
I am not using release plugin for my build. I haven't seen this error before and not very certain about its meaning. All I am doing is changing version from in my pom from "-SNAPSHOT" to ".qualifier". Can someone help me understand what I am doing wrong? As far as I can tell I am not doing anything different from previous times I've build release version of my projects.
Here is my pom file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>com.google.guice</artifactId>
<!-- BEFORE -->
<version>8.0.0-SNAPSHOT</version>
<!-- NOW -->
<version>8.0.0.qualifier</version>
<build>
...
...

Cannot build a Hudson plugin using Maven

I cannot manage to build the Hudson plugin using Maven.
Here is my pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>hudson-plugin-parent</artifactId>
<version>2.2.1</version><!-- which version of Hudson is this plugin built against? -->
</parent>
<groupId>com.my-project</groupId>
<artifactId>my-project-hudson-asap-plugin</artifactId>
<version>2.0.1</version>
<packaging>hpi</packaging>
<name>my-project-hudson-asap-plugin</name>
<url>http://www.my-project.com</url>
</project>
Here is the error:
Failed to execute goal org.jvnet.hudson.tools:maven-hpi-plugin:3.0.1:run (default-cli) on project my-project-hudson-asap-plugin: Version of org.jvnet.hudson.main:gin:jar:2.1.2 is inconsistent with org.jvnet.hudson.main:hudson-war:war:2.2.1 -> [Help 1]
I have a feeling it has to do with moving to java 7, it worked in java 6 yet i've made many changes since i moved to java 7.
Any suggestions?
Thank you
Try compiling with different parent version, such as that 2.1.2 mentioned in the error. That should at least change the error message...
Or do you have some specific reason to use 2.2.1 parent, instead of an older one?

Automate creation of pom file dependencies based on the jar file

I have hundreds of jar files scattered across different projects that I need to create pom file dependencies files for. I'd really like to avoid manually searching for every jar file and adding the dependency manually. Is there an API I can use to accomplish this task or some other way ?
Ive tried using a generic pom as described : http://maven.apache.org/plugins/maven-install-plugin/examples/generic-pom-generation.html
Using this command - mvn install:install-file -Dfile=spring-webmvc-portlet-3.0.6.RELEASE -DgroupId=test -DartifactId=test -Dversion=version -Dpackaging=jar-DgeneratePom=true
But should the generated pom not match the jar file ? Or do I need to add this myself
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>version</version>
<packaging>jar-DgeneratePom=true</packaging>
<description>POM was created from install:install-file</description>
</project>
I wrote a script that generates an ivy file. It uses the jar checksums to identify the matching modules in Maven central.
https://github.com/myspotontheweb/ant2ivy
This solution could be adapted to generate a Maven POM.
You may create a bash script which uses the Maven Install plugin to produce a generic POM.
See http://maven.apache.org/plugins/maven-install-plugin/examples/generic-pom-generation.html

Resources