newbie example for maven

2012-06-07 Thread Yaprak Ayazoglu
Hi,

I'm trying to understand whether maven works or not.

Depending on the lines below maven seems not working at all. How can I fix
this
problem? Can you help?

ya@yaprak:~$ mvn
Error: Could not find or load main class org.codehaus.classworlds.Launcher


-- 
Yaprak


Cannot properly deploy WAB, getting NullPointerException

2012-06-07 Thread Peter Penzov
I'm getting very strange error in Glassfish 3.1.2. I have a WAB package
with Primefaces. The WAB file is not deployed properly. This is the 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;
modelVersion4.0.0/modelVersion

groupIdcom.DX_57/groupId
artifactIdHistory-Module-57/artifactId
version1.0-SNAPSHOT/version
packagingwar/packaging

nameHistory-Module-57/name

properties
endorsed.dir${project.build.directory}/endorsed/endorsed.dir
project.build.sourceEncodingUTF-8/project.build.sourceEncoding
/properties

dependencies
dependency
groupIdjavax/groupId
artifactIdjavaee-web-api/artifactId
version6.0/version
scopeprovided/scope
/dependency

dependency
groupIdorg.primefaces/groupId
artifactIdprimefaces/artifactId
version3.3/version
/dependency

dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version4.8.2/version
scopetest/scope
/dependency

dependency
groupIdorg.osgi/groupId
artifactIdorg.osgi.core/artifactId
version4.2.0/version
scopeprovided/scope
/dependency
dependency
groupIdorg.osgi/groupId
artifactIdorg.osgi.compendium/artifactId
version4.2.0/version
scopeprovided/scope
/dependency
dependency
groupIdorg.glassfish/groupId
artifactIdosgi-cdi-api/artifactId
version3.1-b41/version
typejar/type
scopeprovided/scope
/dependency
/dependencies

build
pluginManagement

plugins
plugin
groupIdorg.apache.felix/groupId
artifactIdmaven-bundle-plugin/artifactId
version2.1.0/version
extensionstrue/extensions
configuration
supportedProjectTypes
supportedProjectTypeejb/supportedProjectType
supportedProjectTypewar/supportedProjectType

supportedProjectTypebundle/supportedProjectType
supportedProjectTypejar/supportedProjectType
/supportedProjectTypes
instructions
!-- Read all OSGi configuration info from this
optional file --
_include-osgi.properties/_include
!-- By default, we don't export anything --
Export-Package!*.impl.*, */Export-Package
DynamicImport-Packagejavax.*, org.*,
com.sun.faces.*/DynamicImport-Package

Import-Package*;resolution:=optional/Import-Package

Embed-Dependency*;scope=compile|runtime;inline=false/Embed-Dependency
Embed-Transitivetrue/Embed-Transitive
Embed-DirectoryWEB-INF/lib//Embed-Directory
Embed-StripVersionfalse/Embed-StripVersion
Embed-StripGrouptrue/Embed-StripGroup

Bundle-ClassPath.,WEB-INF/classes/Bundle-ClassPath
/instructions
/configuration
executions
execution
idbundle-manifest/id
phaseprocess-classes/phase
goals
goalmanifest/goal
/goals
/execution
execution
idbundle-install/id
phaseinstall/phase
goals
goalinstall/goal
/goals
/execution
/executions
/plugin

plugin !-- Need to use this plugin to build war files --
artifactIdmaven-war-plugin/artifactId
groupIdorg.apache.maven.plugins/groupId
!-- Use version 2.1-beta-1, as it supports the new
property failOnMissingWebXml --
version2.1-beta-1/version
configuration
archive
!-- add bundle plugin generated manifest to
the war --
manifestFile

${project.build.outputDirectory}/META-INF/MANIFEST.MF
/manifestFile
!-- For some reason, adding Bundle-ClassPath
in maven-bundle-plugin
confuses that plugin and it generates wrong
Import-Package, etc.
 

Re: newbie example for maven

2012-06-07 Thread Anders Hammar
Have you defined the M2_HOME env variable?

/Anders

On Thu, Jun 7, 2012 at 9:56 AM, Yaprak Ayazoglu
yaprak.ayazo...@gmail.com wrote:
 Hi,

 I'm trying to understand whether maven works or not.

 Depending on the lines below maven seems not working at all. How can I fix
 this
 problem? Can you help?

 ya@yaprak:~$ mvn
 Error: Could not find or load main class org.codehaus.classworlds.Launcher


 --
 Yaprak

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Maven clean install throws Checksum failed on download

2012-06-07 Thread DK
I'm getting a number of errors in my build like the following:

*** CHECKSUM FAILED - Checksum failed on download: local =
'2b0cd22fcfe2c88328b8c30eb57bc24b4b20ed'; remote =
'746e3c8abfad7fdc3d6384dd1a9b6b448140ef' - RETRYING
*** CHECKSUM FAILED - Checksum failed on download: local =
'2b0cd22fcfe2c88328b8c30e7c1bc24b4b20ed'; remote =
'746e3c8abfad703fdc6384dd1a9b6b448140ef' - IGNORING

Anyone know the cause? The error doesn't appear to be affect the build

--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-clean-install-throws-Checksum-failed-on-download-tp5710934.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Maven clean install throws Checksum failed on download

2012-06-07 Thread Stephen Connolly
Did you see if the artifact in the repo has an incorrect checksum deployed
to the repo? There are a couple of repos that did not enforce checksum
validation/repair... And maven 2.1.0 through 2.2.0 deploy incorrect
checksums to remote repos (which is why we say don't use those versions)

On Thursday, 7 June 2012, DK wrote:

 I'm getting a number of errors in my build like the following:

 *** CHECKSUM FAILED - Checksum failed on download: local =
 '2b0cd22fcfe2c88328b8c30eb57bc24b4b20ed'; remote =
 '746e3c8abfad7fdc3d6384dd1a9b6b448140ef' - RETRYING
 *** CHECKSUM FAILED - Checksum failed on download: local =
 '2b0cd22fcfe2c88328b8c30e7c1bc24b4b20ed'; remote =
 '746e3c8abfad703fdc6384dd1a9b6b448140ef' - IGNORING

 Anyone know the cause? The error doesn't appear to be affect the build

 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Maven-clean-install-throws-Checksum-failed-on-download-tp5710934.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org javascript:;
 For additional commands, e-mail: users-h...@maven.apache.orgjavascript:;




Re: newbie example for maven

2012-06-07 Thread abhijith tn
Ensure you set the bin of Maven installation in classpath. Just google,
setting classpath of maven.

I think this should resolve the problem.

On Thu, Jun 7, 2012 at 10:27 AM, Anders Hammar and...@hammar.net wrote:

 Have you defined the M2_HOME env variable?

 /Anders

 On Thu, Jun 7, 2012 at 9:56 AM, Yaprak Ayazoglu
 yaprak.ayazo...@gmail.com wrote:
  Hi,
 
  I'm trying to understand whether maven works or not.
 
  Depending on the lines below maven seems not working at all. How can I
 fix
  this
  problem? Can you help?
 
  ya@yaprak:~$ mvn
  Error: Could not find or load main class
 org.codehaus.classworlds.Launcher
 
 
  --
  Yaprak

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Re: newbie example for maven

2012-06-07 Thread Mohamed SIDI
It seems a Maven configuration problem, if you are working with Windows,
can you make : c maven -version pour ensure thant maven is well installed

2012/6/7 abhijith tn abhijit...@gmail.com

 Ensure you set the bin of Maven installation in classpath. Just google,
 setting classpath of maven.

 I think this should resolve the problem.

 On Thu, Jun 7, 2012 at 10:27 AM, Anders Hammar and...@hammar.net wrote:

  Have you defined the M2_HOME env variable?
 
  /Anders
 
  On Thu, Jun 7, 2012 at 9:56 AM, Yaprak Ayazoglu
  yaprak.ayazo...@gmail.com wrote:
   Hi,
  
   I'm trying to understand whether maven works or not.
  
   Depending on the lines below maven seems not working at all. How can I
  fix
   this
   problem? Can you help?
  
   ya@yaprak:~$ mvn
   Error: Could not find or load main class
  org.codehaus.classworlds.Launcher
  
  
   --
   Yaprak
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 




-- 


Cordialement

Mohamed


Re: Maven clean install throws Checksum failed on download

2012-06-07 Thread DK
OK, 

Its downloading from Nexus repos and I guess they have been around for a
while.

I'm on Maven 2.2.1. 

So I guess there's not much that can be done the fix Nexus other than
deleting its artifacts and redeploy them.

--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-clean-install-throws-Checksum-failed-on-download-tp5710934p5710939.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: Cannot properly deploy WAB, getting NullPointerException

2012-06-07 Thread Martin Gainty

Hi PeterI tested with earlier version of 1.4.0insert a valid Bundle-Activator 
java class
comment out Bundle-ClassPath which does not seem to be working properly with 
v=1.4.0plugin
groupIdorg.apache.felix/groupId
artifactIdmaven-bundle-plugin/artifactId
!-- version2.1.0/version --
version1.4.0/version
extensionstrue/extensions
configuration
supportedProjectTypes
 supportedProjectTypeejb/supportedProjectType
 supportedProjectTypewar/supportedProjectType
 supportedProjectTypebundle/supportedProjectType
 supportedProjectTypejar/supportedProjectType
/supportedProjectTypes
instructions
 !-- MCG --
 Bundle-Activator
  org.apache.felix.examples.dictionaryservice.impl.Activator
/Bundle-Activator
!-- end MCG --

!-- Read all OSGi configuration info from this
   optional file --
_include-osgi.properties/_include

!-- MCG --
!-- Export-Package!*.impl.*, */Export-Package --
 
Export-Packageorg.apache.felix.examples.dictionaryservice.*/Export-Package  
  
!-- end MCG --
DynamicImport-Packagejavax.*, org.*,
   com.sun.faces.*/DynamicImport-Package   
Import-Package*;resolution:=optional/Import-Package   
Embed-Dependency*;scope=compile|runtime;inline=false/Embed-Dependency
Embed-Transitivetrue/Embed-Transitive
Embed-DirectoryWEB-INF/lib//Embed-Directory
Embed-StripVersionfalse/Embed-StripVersion
Embed-StripGrouptrue/Embed-StripGroup

!-- start comments MCG --
!-- Bundle-ClassPath.,WEB-INF/classes/Bundle-ClassPath -- !-- 
exporting packages that are NOT on Bundle-Classpath --
!-- Bundle-ClassPathWEB-INF/classes/Bundle-ClassPath --  !-- exporting 
packages that are NOT on Bundle-Classpath  --
 !-- 
Bundle-ClassPath/Maven-plugin/maven-bundle-plugin/examples/Peter/WEB-INF/classes/Bundle-ClassPath
 -- !-- exporting packages  NOT on Bundle-Classpath  --
!-- end comments MCG --

/instructions
/configuration
executions
execution
idbundle-manifest/id
phaseprocess-classes/phase
goals
goalmanifest/goal
/goals
/execution
execution
idbundle-install/id
phaseinstall/phase
goals
goalinstall/goal
/goals
/execution
/executions
  /plugin
[DEBUG]  (f) bundleJar = file:///users/mgainty/.m2/repository/org/apache/felix/
org.apache.felix.examples.dictionaryservice/0.9.0-SNAPSHOT/org.apache.felix.exam
ples.dictionaryservice-0.9.0-SNAPSHOT.jar jar is there
Martin Gainty 
__ 
Do not alter or disrupt this transmission. Thank You

  Date: Thu, 7 Jun 2012 11:27:02 +0300
 Subject: Cannot properly deploy WAB, getting NullPointerException
 From: peter.pen...@gmail.com
 To: users@maven.apache.org
 
 I'm getting very strange error in Glassfish 3.1.2. I have a WAB package
 with Primefaces. The WAB file is not deployed properly. This is the 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;
 modelVersion4.0.0/modelVersion
 
 groupIdcom.DX_57/groupId
 artifactIdHistory-Module-57/artifactId
 version1.0-SNAPSHOT/version
 packagingwar/packaging
 
 nameHistory-Module-57/name
 
 properties
 endorsed.dir${project.build.directory}/endorsed/endorsed.dir
 project.build.sourceEncodingUTF-8/project.build.sourceEncoding
 /properties
 
 dependencies
 dependency
 groupIdjavax/groupId
 artifactIdjavaee-web-api/artifactId
 version6.0/version
 scopeprovided/scope
 /dependency
 
 dependency
 groupIdorg.primefaces/groupId
 artifactIdprimefaces/artifactId
 version3.3/version
 /dependency
 
 dependency
 groupIdjunit/groupId
 artifactIdjunit/artifactId
 version4.8.2/version
 scopetest/scope
 /dependency
 
 dependency
 groupIdorg.osgi/groupId
 artifactIdorg.osgi.core/artifactId
 version4.2.0/version
 scopeprovided/scope
 /dependency
 dependency
 groupIdorg.osgi/groupId
 artifactIdorg.osgi.compendium/artifactId
 version4.2.0/version
 scopeprovided/scope
 /dependency
 dependency
 groupIdorg.glassfish/groupId
 artifactIdosgi-cdi-api/artifactId
 version3.1-b41/version
 typejar/type
 scopeprovided/scope
 /dependency
 /dependencies
 
 build
 pluginManagement
 
 plugins
 plugin
 groupIdorg.apache.felix/groupId
 artifactIdmaven-bundle-plugin/artifactId
 version2.1.0/version
 

Re: Cannot properly deploy WAB, getting NullPointerException

2012-06-07 Thread Peter Penzov
Would you please explain more clearly your idea?

On Thu, Jun 7, 2012 at 2:33 PM, Martin Gainty mgai...@hotmail.com wrote:


 Hi PeterI tested with earlier version of 1.4.0insert a valid
 Bundle-Activator java class
 comment out Bundle-ClassPath which does not seem to be working properly
 with v=1.4.0plugin
 groupIdorg.apache.felix/groupId
artifactIdmaven-bundle-plugin/artifactId
 !-- version2.1.0/version --
version1.4.0/version
 extensionstrue/extensions
configuration
supportedProjectTypes
 supportedProjectTypeejb/supportedProjectType
 supportedProjectTypewar/supportedProjectType
 supportedProjectTypebundle/supportedProjectType
 supportedProjectTypejar/supportedProjectType
/supportedProjectTypes
instructions
  !-- MCG --
 Bundle-Activator
  org.apache.felix.examples.dictionaryservice.impl.Activator
/Bundle-Activator
!-- end MCG --

!-- Read all OSGi configuration info from this
   optional file --
_include-osgi.properties/_include

 !-- MCG --
!-- Export-Package!*.impl.*, */Export-Package --

 Export-Packageorg.apache.felix.examples.dictionaryservice.*/Export-Package
!-- end MCG --
 DynamicImport-Packagejavax.*, org.*,
   com.sun.faces.*/DynamicImport-Package
 Import-Package*;resolution:=optional/Import-Package
 Embed-Dependency*;scope=compile|runtime;inline=false/Embed-Dependency
Embed-Transitivetrue/Embed-Transitive
Embed-DirectoryWEB-INF/lib//Embed-Directory
Embed-StripVersionfalse/Embed-StripVersion
Embed-StripGrouptrue/Embed-StripGroup

 !-- start comments MCG --
!-- Bundle-ClassPath.,WEB-INF/classes/Bundle-ClassPath -- !--
 exporting packages that are NOT on Bundle-Classpath --
!-- Bundle-ClassPathWEB-INF/classes/Bundle-ClassPath --  !--
 exporting packages that are NOT on Bundle-Classpath  --
  !--
 Bundle-ClassPath/Maven-plugin/maven-bundle-plugin/examples/Peter/WEB-INF/classes/Bundle-ClassPath
 -- !-- exporting packages  NOT on Bundle-Classpath  --
!-- end comments MCG --

/instructions
/configuration
executions
execution
idbundle-manifest/id
phaseprocess-classes/phase
goals
goalmanifest/goal
/goals
/execution
execution
idbundle-install/id
phaseinstall/phase
goals
goalinstall/goal
/goals
/execution
/executions
  /plugin
 [DEBUG]  (f) bundleJar =
 file:///users/mgainty/.m2/repository/org/apache/felix/

 org.apache.felix.examples.dictionaryservice/0.9.0-SNAPSHOT/org.apache.felix.exam
 ples.dictionaryservice-0.9.0-SNAPSHOT.jar jar is there
 Martin Gainty
 __
 Do not alter or disrupt this transmission. Thank You

   Date: Thu, 7 Jun 2012 11:27:02 +0300
  Subject: Cannot properly deploy WAB, getting NullPointerException
  From: peter.pen...@gmail.com
  To: users@maven.apache.org
 
  I'm getting very strange error in Glassfish 3.1.2. I have a WAB package
  with Primefaces. The WAB file is not deployed properly. This is the 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;
  modelVersion4.0.0/modelVersion
 
  groupIdcom.DX_57/groupId
  artifactIdHistory-Module-57/artifactId
  version1.0-SNAPSHOT/version
  packagingwar/packaging
 
  nameHistory-Module-57/name
 
  properties
  endorsed.dir${project.build.directory}/endorsed/endorsed.dir
 
 project.build.sourceEncodingUTF-8/project.build.sourceEncoding
  /properties
 
  dependencies
  dependency
  groupIdjavax/groupId
  artifactIdjavaee-web-api/artifactId
  version6.0/version
  scopeprovided/scope
  /dependency
 
  dependency
  groupIdorg.primefaces/groupId
  artifactIdprimefaces/artifactId
  version3.3/version
  /dependency
 
  dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version4.8.2/version
  scopetest/scope
  /dependency
 
  dependency
  groupIdorg.osgi/groupId
  artifactIdorg.osgi.core/artifactId
  version4.2.0/version
  scopeprovided/scope
  /dependency
  dependency
  groupIdorg.osgi/groupId
  artifactIdorg.osgi.compendium/artifactId
  version4.2.0/version
  scopeprovided/scope
  /dependency
  dependency
  groupIdorg.glassfish/groupId
  artifactIdosgi-cdi-api/artifactId
  version3.1-b41/version
  typejar/type
  scopeprovided/scope
  /dependency
  /dependencies
 
  build
  pluginManagement
 
  plugins
  plugin
   

Passing properties to maven POM ran from ant

2012-06-07 Thread nicolasduminil
Greetings,

I need to execute a mavem pom from an ant script. here is the code of the
ant script:

?xml version=1.0?
project name=...
  target name=...
  echo message=smx.home ${smx.home} /
exec dir=. executable=cmd
  arg value=/c/
  arg value=mvn/
  arg line=scm:bootstrap -Dsmx.home=${smx.home} /
/exec
  /target
/project

The property smx.home is correctly displayed in the echo task but, as soon
in the maven pom it's definition is lost. However, it is defined with
-Dsms.home=${smx.home} and, in the maven pom it is referenced as
${smx.home}.

Please help.

Many thanks in advance.

Nicolas

--
View this message in context: 
http://maven.40175.n5.nabble.com/Passing-properties-to-maven-POM-ran-from-ant-tp5710940.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



migrating from Eclipse to a Maven build

2012-06-07 Thread Ronald Albury
I have seen much documentation of importing a Maven project into Eclipse.
 However, many of us have the opposite situation - we are starting with an
Eclipse set-up and have decided to migrate to Maven for the builds.

I did find one posting on the subject - the author, like myself, was
intimidated by Maven ... and especially intimidated by the differences in
the directory layout between Maven and Eclipse.  However, he said that
since he was well experienced in Eclipse he was able to muddle thru it.
 Muddle thru it how?  The only thing I can think of is to start by building
a Maven set-up, manually moving my Eclipse files into the Maven projects,
and then importing back into Eclipse.

Surely there is a better way than that!

Thanks for your patience and your assistance,
   RonA


Re: migrating from Eclipse to a Maven build

2012-06-07 Thread Ron Wheeler

My 2 cents.
Move from Eclipse to Eclipse STS from Springsource.
This gives you an Eclipse ready to go out-of-the-box with Maven and 
everything else you need to develop in Java.


I believe that you can then add the maven nature to your project.

Adjust the Maven POM, if required, to point to your source directory as 
it is. Maven is pretty flexible about many things.


Add the dependencies that you need to the POM.

At that point, you should be able to build in Eclipse with Maven. Just 
point at the POM= right click = Run As and select the Maven goal that 
you want to run.


Not a big deal.

For new projects, just tell STS that you want a maven project and it 
will build you one that works once you add your dependencies.


If you don't want to go to STS you can manually add m2 plug-in and 
whatever else you need.
We started that way (plain Eclipse) but just lost so much time screwing 
around with Eclipse plug-ins on every new Eclipse release that we moved 
to STS. One donwload and a quick install and your new version of Eclipse 
is ready to go.


We never use Maven outside Eclipse but others do.

Ron


On 07/06/2012 8:59 AM, Ronald Albury wrote:

I have seen much documentation of importing a Maven project into Eclipse.
  However, many of us have the opposite situation - we are starting with an
Eclipse set-up and have decided to migrate to Maven for the builds.

I did find one posting on the subject - the author, like myself, was
intimidated by Maven ... and especially intimidated by the differences in
the directory layout between Maven and Eclipse.  However, he said that
since he was well experienced in Eclipse he was able to muddle thru it.
  Muddle thru it how?  The only thing I can think of is to start by building
a Maven set-up, manually moving my Eclipse files into the Maven projects,
and then importing back into Eclipse.

Surely there is a better way than that!

Thanks for your patience and your assistance,
RonA




--
Ron Wheeler President Artifact Software Inc email: 
rwhee...@artifact-software.com skype: ronaldmwheeler phone: 
866-970-2435, ext 102


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: migrating from Eclipse to a Maven build

2012-06-07 Thread Ron Wheeler

On 07/06/2012 8:59 AM, Ronald Albury wrote:

I have seen much documentation of importing a Maven project into Eclipse.
  However, many of us have the opposite situation - we are starting with an
Eclipse set-up and have decided to migrate to Maven for the builds.

I did find one posting on the subject - the author, like myself, was
intimidated by Maven ... and especially intimidated by the differences in
the directory layout between Maven and Eclipse.  However, he said that
since he was well experienced in Eclipse he was able to muddle thru it.
  Muddle thru it how?  The only thing I can think of is to start by building
a Maven set-up, manually moving my Eclipse files into the Maven projects,
and then importing back into Eclipse.

Surely there is a better way than that!

Thanks for your patience and your assistance,
RonA

The directory structure is not any different except where the root is in 
your source tree unless you have done some strange things with your 
sources or other resources.
Have Eclipse, with M2, (or Eclipse STS) generate a Maven project for 
you, add a simple dummy program and compile it. Then compare your source 
layout with Eclipse's maven layout and see how much your current layout 
differs.


Ron

--
Ron Wheeler President Artifact Software Inc email: 
rwhee...@artifact-software.com skype: ronaldmwheeler phone: 
866-970-2435, ext 102


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Cannot properly deploy WAB, getting NullPointerException

2012-06-07 Thread Wayne Fay
 I'm getting very strange error in Glassfish 3.1.2. I have a WAB package
 with Primefaces. The WAB file is not deployed properly. This is the POM
 file:

First off, please don't post massive logs from someone else's product
here -- what do you expect the Maven Users list to do about your
problems with Glassfish??

Now, does it seem reasonable that anyone with a problem deploying a
WAR file they happened to build with Maven would come here for all
future support with that WAR file? No.

Go post this on the Glassfish list and they should be able to help you
sort out what isn't working properly in Glassfish.

THEN you can come back here and maybe we can help you to configure
things in Maven so your WAR file is built properly.

Wayne

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: migrating from Eclipse to a Maven build

2012-06-07 Thread Ronald Albury
Thanks Ron

The other fly in the ointment is that this is an IBM shop and we are
required to develop in IBM's RAD flavor of Eclipse.  That doesn't mean we
can't add plugins - only that we can't go to STS.

I have the project layout pretty clean - with one artifact per project (jar
library, executable jar, war/ear).  There are three top level applications
that come out of the workspace - an ear and two runnable jar files.  The
jar libraries are shared across the three applications.  I have heard
rumors that Maven will object to this sort of layout ... I'd be interested
in your opinion on that subject.

Thanks again for your input.  I'll give your M2 plugin suggestions a try.

RonA

On Thu, Jun 7, 2012 at 9:29 AM, Ron Wheeler
rwhee...@artifact-software.comwrote:

 On 07/06/2012 8:59 AM, Ronald Albury wrote:

 I have seen much documentation of importing a Maven project into Eclipse.
  However, many of us have the opposite situation - we are starting with an
 Eclipse set-up and have decided to migrate to Maven for the builds.

 I did find one posting on the subject - the author, like myself, was
 intimidated by Maven ... and especially intimidated by the differences in
 the directory layout between Maven and Eclipse.  However, he said that
 since he was well experienced in Eclipse he was able to muddle thru it.
  Muddle thru it how?  The only thing I can think of is to start by
 building
 a Maven set-up, manually moving my Eclipse files into the Maven projects,
 and then importing back into Eclipse.

 Surely there is a better way than that!

 Thanks for your patience and your assistance,
RonA

  The directory structure is not any different except where the root is in
 your source tree unless you have done some strange things with your sources
 or other resources.
 Have Eclipse, with M2, (or Eclipse STS) generate a Maven project for you,
 add a simple dummy program and compile it. Then compare your source layout
 with Eclipse's maven layout and see how much your current layout differs.

 Ron

 --
 Ron Wheeler President Artifact Software Inc email:
 rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435,
 ext 102

 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@maven.**apache.orgusers-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Re: migrating from Eclipse to a Maven build

2012-06-07 Thread Antonio Petrelli
2012/6/7 Ronald Albury ronalb...@gmail.com:
 I have the project layout pretty clean - with one artifact per project (jar
 library, executable jar, war/ear).  There are three top level applications
 that come out of the workspace - an ear and two runnable jar files.  The
 jar libraries are shared across the three applications.  I have heard
 rumors that Maven will object to this sort of layout ... I'd be interested
 in your opinion on that subject.

Don't care about those rumours, they must be Ant users :-D
Seriously, the fact that you have alread one artifact per project it's
a nice start. All you have to do is create a project of time pom to
rule them all, and then a module for each artifact. The type of the
modules must match the type of your project (jar, ear, war).
Dependencies between modules are just like the other dependencies.
However I disagree with Ron, once you move to Maven, you'd better move
in a clean way, so it's better to move directory as the Maven standard
layout suggests.

Antonio

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: migrating from Eclipse to a Maven build

2012-06-07 Thread Curtis Rueden
Hi RonA, Antonio  everyone,

On Thu, Jun 7, 2012 at 9:15 AM, Antonio Petrelli wrote:

 However I disagree with Ron, once you move to Maven, you'd better move
 in a clean way, so it's better to move directory as the Maven standard
 layout suggests.


Why? Maven does not require it. You can keep your existing source folder
(say, src) using a single line of XML in the build section:

sourceDirectory${project.basedir}/src/sourceDirectory

If you have unit tests in a test folder you can do that too:

testSourceDirectory${project.basedir}/test/testSourceDirectory

Even if you want to keep your resources mixed in with your source (which a
lot of people do, even though IMO it is less clean), you can do that as
well; e.g.:

resources
  resource
directory${project.basedir}/src/directory
excludes
  exclude**/*.java/exclude
/excludes
  /resource
/resources
testResources
  testResource
directory${project.basedir}/test/directory
excludes
  exclude**/*.java/exclude
/excludes
  /testResource
/testResources

From my perspective, one of the most common excuses for disliking Maven is
the overly nested src/main/java directory structure, but people often do
not realize that it is merely a convention, not a requirement. There are
many other Maven conventions that IMO have much more serious consequences
if not followed. Violating the standard directory structure is really not a
serious offender in comparison, and it can greatly aid in migrating a
project to Maven in a less disruptive way.

Regards,
Curtis

P.S. The Eclipse plugin you need is called M2E, and it comes with the
Eclipse 3.7 for Java Developers distribution (not just with Eclipse STS).
However, if you must use a specific other flavor of Eclipse, it can likely
still be installed just fine using the M2E update site (linked from
http://www.eclipse.org/m2e/download/).

Another alternative is the maven-eclipse-plugin (i.e., mvn
eclipse:eclipse to manually generate Eclipse metadata files), but IMO it
is less convenient. With M2E, your dependencies will automagically switch
between JAR dependencies (out of ~/.m2/repository) and Eclipse project
dependencies as you open and close upstream projects within Eclipse.


On Thu, Jun 7, 2012 at 9:15 AM, Antonio Petrelli antonio.petre...@gmail.com
 wrote:

 2012/6/7 Ronald Albury ronalb...@gmail.com:
  I have the project layout pretty clean - with one artifact per project
 (jar
  library, executable jar, war/ear).  There are three top level
 applications
  that come out of the workspace - an ear and two runnable jar files.  The
  jar libraries are shared across the three applications.  I have heard
  rumors that Maven will object to this sort of layout ... I'd be
 interested
  in your opinion on that subject.

 Don't care about those rumours, they must be Ant users :-D
 Seriously, the fact that you have alread one artifact per project it's
 a nice start. All you have to do is create a project of time pom to
 rule them all, and then a module for each artifact. The type of the
 modules must match the type of your project (jar, ear, war).
 Dependencies between modules are just like the other dependencies.
 However I disagree with Ron, once you move to Maven, you'd better move
 in a clean way, so it's better to move directory as the Maven standard
 layout suggests.

 Antonio

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Re: migrating from Eclipse to a Maven build

2012-06-07 Thread Ron Wheeler

I am not religious in either direction.
My comment was more of an invitation to try to see the difference 
between what Ron has and what Eclipse and M2 would setup, given their 
own devices.

From that, Ron could make a decision.

At Artifact, we try to follow Maven conventions as closely as possible.

Ron

On 07/06/2012 11:43 AM, Curtis Rueden wrote:

Hi RonA, Antonio  everyone,

On Thu, Jun 7, 2012 at 9:15 AM, Antonio Petrelli wrote:


However I disagree with Ron, once you move to Maven, you'd better move
in a clean way, so it's better to move directory as the Maven standard
layout suggests.


Why? Maven does not require it. You can keep your existing source folder
(say, src) using a single line of XML in thebuild  section:

 sourceDirectory${project.basedir}/src/sourceDirectory

If you have unit tests in a test folder you can do that too:

 testSourceDirectory${project.basedir}/test/testSourceDirectory

Even if you want to keep your resources mixed in with your source (which a
lot of people do, even though IMO it is less clean), you can do that as
well; e.g.:

 resources
   resource
 directory${project.basedir}/src/directory
 excludes
   exclude**/*.java/exclude
 /excludes
   /resource
 /resources
 testResources
   testResource
 directory${project.basedir}/test/directory
 excludes
   exclude**/*.java/exclude
 /excludes
   /testResource
 /testResources

 From my perspective, one of the most common excuses for disliking Maven is
the overly nested src/main/java directory structure, but people often do
not realize that it is merely a convention, not a requirement. There are
many other Maven conventions that IMO have much more serious consequences
if not followed. Violating the standard directory structure is really not a
serious offender in comparison, and it can greatly aid in migrating a
project to Maven in a less disruptive way.

Regards,
Curtis

P.S. The Eclipse plugin you need is called M2E, and it comes with the
Eclipse 3.7 for Java Developers distribution (not just with Eclipse STS).
However, if you must use a specific other flavor of Eclipse, it can likely
still be installed just fine using the M2E update site (linked from
http://www.eclipse.org/m2e/download/).

Another alternative is the maven-eclipse-plugin (i.e., mvn
eclipse:eclipse to manually generate Eclipse metadata files), but IMO it
is less convenient. With M2E, your dependencies will automagically switch
between JAR dependencies (out of ~/.m2/repository) and Eclipse project
dependencies as you open and close upstream projects within Eclipse.


On Thu, Jun 7, 2012 at 9:15 AM, Antonio Petrelliantonio.petre...@gmail.com

wrote:
2012/6/7 Ronald Alburyronalb...@gmail.com:

I have the project layout pretty clean - with one artifact per project

(jar

library, executable jar, war/ear).  There are three top level

applications

that come out of the workspace - an ear and two runnable jar files.  The
jar libraries are shared across the three applications.  I have heard
rumors that Maven will object to this sort of layout ... I'd be

interested

in your opinion on that subject.

Don't care about those rumours, they must be Ant users :-D
Seriously, the fact that you have alread one artifact per project it's
a nice start. All you have to do is create a project of time pom to
rule them all, and then a module for each artifact. The type of the
modules must match the type of your project (jar, ear, war).
Dependencies between modules are just like the other dependencies.
However I disagree with Ron, once you move to Maven, you'd better move
in a clean way, so it's better to move directory as the Maven standard
layout suggests.

Antonio

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org





--
Ron Wheeler President Artifact Software Inc email: 
rwhee...@artifact-software.com skype: ronaldmwheeler phone: 
866-970-2435, ext 102


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



forkMode always ignores groups?

2012-06-07 Thread Billy
I am trying to separate my unit and integration tests into testng groups. I
have them separated into different executions the maven-surefire-plugin
section of the pom (included at the bottom of this message).

When forkMode is set to never, the grouping is obeyed however in the tests
the @Before* methods are never executed.

When forkMode is set to always the @Before* methods are executed exactly as
expected, but the grouping is not obeyed (it runs the integration and unit
groups as part of the default execution).

This seems to be the way the plugin wants to behave since I cannot find
anything to tweak that will make it work. My question is, how can I get the
@Before* methods to work AND have it obey the groupings.

Versions:
maven 2.2.1
testng 5.11
surefire-plugin 2.7.1

and finally, the plugin configuration:
plugin
artifactIdmaven-surefire-plugin/artifactId
version2.7.1/version
configuration
groupsunit/groups
forkModealways/forkMode
excludeGroupsintegration/excludeGroups
/configuration
executions
execution
idintegration-test/id
phaseintegration-test/phase
goals
goaltest/goal
/goals
configuration
groupsintegration/groups
/configuration
/execution
/executions
/plugin


--
View this message in context: 
http://maven.40175.n5.nabble.com/forkMode-always-ignores-groups-tp5710956.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: migrating from Eclipse to a Maven build

2012-06-07 Thread Benson Margulies
I think the bottom line here is that there are nuances to 'don't fight maven.'

Rearranging the tree within the reach of the various POM elements is
not a big deal. The big pain comes when you try to fight with the
workflow and artifact architecture.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: Passing properties to maven POM ran from ant

2012-06-07 Thread Martin Gainty

Hi Nicholas I would set an environment variable to smx_home before calling mvn 
e.g.SET smx.home=${smx.home}cmd.exe /c mvn.execmd.exe /c only executes the 
windows binary following /cunless of course if you pass /V:ON   to Enable 
delayed environment variable expansion (where using !var! will inplace expand 
value of var ...analogous to a define macro)

once inside maven... you can echo the environment variable of your environment 
variable smx.home e.g.plugins
plugin   groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-antrun-plugin/artifactId
  executions
execution
  idecho/id
  phaseinitialize/phase
  goalsgoalrun/goal/goals
  configuration
tasks
  echo${smx.home}/echo
...
 /tasks/configuration
/execution
/executions
/plugin
/plugins

Bon Chance,
Martin 
__ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

  Date: Thu, 7 Jun 2012 04:24:11 -0700
 From: nicolas.dumi...@simplex-software.fr
 To: users@maven.apache.org
 Subject: Passing properties to maven POM ran from ant
 
 Greetings,
 
 I need to execute a mavem pom from an ant script. here is the code of the
 ant script:
 
 ?xml version=1.0?
 project name=...
   target name=...
 echo message=smx.home ${smx.home} /
 exec dir=. executable=cmd
   arg value=/c/
   arg value=mvn/
   arg line=scm:bootstrap -Dsmx.home=${smx.home} /
 /exec
   /target
 /project
 
 The property smx.home is correctly displayed in the echo task but, as soon
 in the maven pom it's definition is lost. However, it is defined with
 -Dsms.home=${smx.home} and, in the maven pom it is referenced as
 ${smx.home}.
 
 Please help.
 
 Many thanks in advance.
 
 Nicolas
 
 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Passing-properties-to-maven-POM-ran-from-ant-tp5710940.html
 Sent from the Maven - Users mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
  

RE: Passing properties to maven POM ran from ant

2012-06-07 Thread Manfred Moser
Use env.smx.home


Environment variables are accessible via a prepended env.

On Thu, June 7, 2012 9:30 am, Martin Gainty wrote:

 Hi Nicholas I would set an environment variable to smx_home before calling
 mvn e.g.SET smx.home=${smx.home}cmd.exe /c mvn.execmd.exe /c only executes
 the windows binary following /cunless of course if you pass /V:ON   to
 Enable delayed environment variable expansion (where using !var! will
 inplace expand value of var ...analogous to a define macro)

 once inside maven... you can echo the environment variable of your
 environment variable smx.home e.g.plugins
 plugin   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-antrun-plugin/artifactId
   executions
 execution
   idecho/id
   phaseinitialize/phase
   goalsgoalrun/goal/goals
   configuration
 tasks
   echo${smx.home}/echo
 ...
  /tasks/configuration
 /execution
 /executions
 /plugin
 /plugins

 Bon Chance,
 Martin
 __
 Note de déni et de confidentialité
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
 destinataire prévu, nous te demandons avec bonté que pour satisfaire
 informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
 copie de ceci est interdite. Ce message sert à l'information seulement et
 n'aura pas n'importe quel effet légalement obligatoire. Étant donné que
 les email peuvent facilement être sujets à la manipulation, nous ne
 pouvons accepter aucune responsabilité pour le contenu fourni.

   Date: Thu, 7 Jun 2012 04:24:11 -0700
 From: nicolas.dumi...@simplex-software.fr
 To: users@maven.apache.org
 Subject: Passing properties to maven POM ran from ant

 Greetings,

 I need to execute a mavem pom from an ant script. here is the code of
 the
 ant script:

 ?xml version=1.0?
 project name=...
   target name=...
echo message=smx.home ${smx.home} /
 exec dir=. executable=cmd
   arg value=/c/
   arg value=mvn/
   arg line=scm:bootstrap -Dsmx.home=${smx.home} /
 /exec
   /target
 /project

 The property smx.home is correctly displayed in the echo task but, as
 soon
 in the maven pom it's definition is lost. However, it is defined with
 -Dsms.home=${smx.home} and, in the maven pom it is referenced as
 ${smx.home}.

 Please help.

 Many thanks in advance.

 Nicolas

 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Passing-properties-to-maven-POM-ran-from-ant-tp5710940.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: newbie example for maven

2012-06-07 Thread Martin Gainty

anders was right..setting M2_HOME to the maven deploy folder solved the problem 
cwd $M2_HOME/bootls *.jar
 plexus-classworlds-2.4.jar Cordialement..
Martin 
__ 


  Date: Thu, 7 Jun 2012 11:16:47 +0200
 Subject: Re: newbie example for maven
 From: mhm.s...@gmail.com
 To: users@maven.apache.org
 
 It seems a Maven configuration problem, if you are working with Windows,
 can you make : c maven -version pour ensure thant maven is well installed
 
 2012/6/7 abhijith tn abhijit...@gmail.com
 
  Ensure you set the bin of Maven installation in classpath. Just google,
  setting classpath of maven.
 
  I think this should resolve the problem.
 
  On Thu, Jun 7, 2012 at 10:27 AM, Anders Hammar and...@hammar.net wrote:
 
   Have you defined the M2_HOME env variable?
  
   /Anders
  
   On Thu, Jun 7, 2012 at 9:56 AM, Yaprak Ayazoglu
   yaprak.ayazo...@gmail.com wrote:
Hi,
   
I'm trying to understand whether maven works or not.
   
Depending on the lines below maven seems not working at all. How can I
   fix
this
problem? Can you help?
   
ya@yaprak:~$ mvn
Error: Could not find or load main class
   org.codehaus.classworlds.Launcher
   
   
--
Yaprak
  
   -
   To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
   For additional commands, e-mail: users-h...@maven.apache.org
  
  
 
 
 
 
 -- 
 
 
 Cordialement
 
 Mohamed
  

Re: forkMode always ignores groups?

2012-06-07 Thread Aliaksei Lahachou
I'm not experienced with maven-surefire plugin (beyond simple use for unit
tests), but after merging configurations your execution looks as follows:

execution
  idintegration-test/id
  configuration
groupsintegration/groups
forkModealways/forkMode
excludeGroupsintegration/excludeGroups
  /configuration
/execution

So, integration group is added and excluded, that could be your problem.
You can see merged configuration by executing mvn help:effective-pom -N.

You can try the following:

configuration !-- Affects all executions. --
forkModealways/forkMode
/configuration
executions
  execution !-- Default execution defined lifecycle mapping. --
iddefault-test/id
configuration
  groupsunit/groups
  excludeGroupsintegration/excludeGroups
/configuration
  /execution
  execution
idintegration-test/id
configuration
  groupsintegration/groups
/configuration
  /execution
/execution


Regards,
htfv (Aliaksei Lahachou)



On Thu, Jun 7, 2012 at 6:12 PM, Billy golfervrsbo...@gmail.com wrote:

 I am trying to separate my unit and integration tests into testng groups. I
 have them separated into different executions the maven-surefire-plugin
 section of the pom (included at the bottom of this message).

 When forkMode is set to never, the grouping is obeyed however in the tests
 the @Before* methods are never executed.

 When forkMode is set to always the @Before* methods are executed exactly as
 expected, but the grouping is not obeyed (it runs the integration and unit
 groups as part of the default execution).

 This seems to be the way the plugin wants to behave since I cannot find
 anything to tweak that will make it work. My question is, how can I get the
 @Before* methods to work AND have it obey the groupings.

 Versions:
 maven 2.2.1
 testng 5.11
 surefire-plugin 2.7.1

 and finally, the plugin configuration:
 plugin
artifactIdmaven-surefire-plugin/artifactId
version2.7.1/version
configuration
groupsunit/groups
forkModealways/forkMode
excludeGroupsintegration/excludeGroups
/configuration
executions
execution
idintegration-test/id
phaseintegration-test/phase
goals
goaltest/goal
/goals
configuration
groupsintegration/groups
/configuration
/execution
/executions
 /plugin


 --
 View this message in context:
 http://maven.40175.n5.nabble.com/forkMode-always-ignores-groups-tp5710956.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org