[mevenide-user] “NetBeans Platform Dev elopment with Maven 2”, by Emilian Bold

Mike Amanti <[email protected]> Thu, 19 Jun 2008 09:01:40 -0700 (PDT)
Newsgroups gmane.comp.jakarta.turbine.maven.mevenide.user
Message-ID <[email protected]>
Emilian Bold: 

I downloaded and installed JDK 6u6 with NetBeans 6.1 (the Java SE
Development Kit 6u6 with NetBeans IDE 6.1 Bundle ) from here…
http://java.sun.com/javase/downloads/netbeans.html

Next, I Downloaded and installed “Java EE (5) + Tools” defaulted to the
existing Java SE directory “JDK_6u6_and_NB_6.1”… from here
http://java.sun.com/javaee/downloads/index.jsp

Thirdly, I used the Netbeans website http://www.netbeans.org/index.html
search mechanism and searched for “Maven 2” and found… 

    NetBeans Platform Development with Maven 2
     http://www.netbeans.org/community/magazine/html/04/maven.html

3.A) I followed the above development with Maven 2 procedures and created a
project: file | new project | maven and the although the build included an
error while “Starting Jakarta Velocity v1.4”, "Velocity successfully
started" and resulted in "BUILD SUCCESSFUL". 

3.B) Next, again, following the development procedure, I Changed the
packaging (from jar) to nbm and tried to build the project… and that
resulted in "BUILD SUCCESSFUL" 

3.C) Next, again, following the development procedure, I Added the
nbm-maven-plugin and did a Clean & Rebuild and this resulted in “BUILD
SUCCESSFUL” resulted. 

So far so good. 

3.D) Next, again, following the development procedure, "Run The Project". 
“You might get errors related to Windows paths while trying to run the
project. 
Make sure you don’t have spaces in these paths, as these are usually the
culprits.” 

NOTE: My NetBeans Project Window did not even show a directory for 
"Other Sources" as depicted in the development procedure. 
Perhaps this is the first sign of real trouble. 

When I ran the project, "ERROR"s resulted as follows… 
===================================== 
Attempting to resolve a version for plugin:
org.codehaus.mojo:nbm-maven-plugin using meta-version: RELEASE 
Using version: 2.6.2 of plugin: org.codehaus.mojo:nbm-maven-plugin 
Attempting to resolve a version for plugin:
org.codehaus.mojo:nbm-maven-plugin using meta-version: RELEASE 
Using version: 2.6.2 of plugin: org.codehaus.mojo:nbm-maven-plugin 
mkleint: setting version to 2.6.2 
Scanning for projects... 
project-execute 
[nbm:cluster] 
Created NetBeans module cluster(s) at C:\Documents and Settings\Mike
Amanti\My
Documents\JOB\JAVA\Web2.0\Struts_2_In_Action\NetBeansProjects\Struts2InActionWarProject1\target/netbeans_clusters 
[ERROR]One or more required mojo parameters have not been configured. 
[ERROR]Mojo: 
[ERROR]Group-Id: org.codehaus.mojo 
[ERROR]Artifact-Id: nbm-maven-plugin 
[ERROR]Version: 2.6.2 
[ERROR]Mojo: run-ide 
[ERROR]brought in via: Direct invocation 
[ERROR]While building project: 
[ERROR]Group-Id: com.popeye 
[ERROR]Artifact-Id: Struts2InActionWarProject1 
[ERROR]Version: 1.0-SNAPSHOT 
[ERROR]From file: C:\Documents and Settings\Mike Amanti\My
Documents\JOB\JAVA\Web2.0\Struts_2_In_Action\NetBeansProjects\Struts2InActionWarProject1\pom.xml 
[ERROR]Missing parameters include: 
[ERROR]netbeansInstallation 
------------------------------------------------------------------------ 
For more information, run with the -e flag 
------------------------------------------------------------------------ 
BUILD FAILED 
------------------------------------------------------------------------ 
Total time: < 1 second 
Finished at: Tue Jun 17 12:47:52 CDT 2008 
Final Memory: 60M/110M 
=========================================== 

The obvious question is... 
Given that I have followed the development procedure, 
What is causing the ERRORs? 

NOTE: In the project's properties wizard, 
I selected "actions" and then checked the checkbox associated with 
“Use External Maven for Build Executiuon”…  same results.

.........................

The contents of the pom.xml file are as follows...

<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.popeye</groupId>
  <artifactId>Struts2InActionWarProject1</artifactId>
  <packaging>nbm</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>Struts2InActionWarProject1</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>    
      <plugins>      
          <plugin>        
              <groupId>org.codehaus.mojo</groupId>        
              <artifactId>nbm-maven-plugin</artifactId>        
              <version>RELEASE</version>        
              <extensions>true</extensions>      
          </plugin>    
      </plugins>  
  </build>
  <properties>
       
<netbeans.hint.useExternalMaven>true</netbeans.hint.useExternalMaven>
    </properties>
</project>

Michael Amanti 


-- 
View this message in context: http://www.nabble.com/%E2%80%9CNetBeans-Platform-Development-with-Maven-2%E2%80%9D%2C-by-Emilian-Bold-tp18012267p18012267.html
Sent from the mevenide - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email