Re: Eclipse and maven

2009-02-27 Thread supareno

David,

http://code.google.com/p/q4e is a very good tool too
though...i would also encourage you to check out the M2Eclipse plugin 
for Eclipse.  it does a really good job of helping with the 
integration of Maven and Eclipse


John Wooten wrote:

Eclipse won't let you nest projects in a directory structure.




-
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: basic question about maven

2009-02-26 Thread supareno

you can check this
http://maven.apache.org/plugins/maven-archetype-plugin/usage.html

or this
http://code.google.com/p/q4e/
to do it with eclipse

Hi,

I just want to develop one small application for a trust.
I want to set up a framework struts 2, spring, hibernate, acegi and maven.
I know we got our excellent Appfuse, but i don't know much about templates
and velocity
I want to use tlds and tiles.
And i set up maven nicely in my system.
But my main doubt is ---
whether we have to write a script for war creation or is there any command
for creating folders for srs---main  web/java.
If is there any command please give me that command
because in the Getting started guide of maven, they have given one command
to create srs and test folders. Is there anything like that for web
projects.

Thanks in advance
Ratna
  



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



Re: Packaging an application that can be run

2008-10-16 Thread supareno

alexworden ,


did you add this to your manifest:

Class-Path: foo.jar bar.jar

and is your folder looks like this:

appfolder
   |_ myExecJar.jar
   |_ foo.jar
   |_ bar.jar

??

check out this

http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html

it may help you

Hi,

I have a standalone application that needs to be run on a production
machine. I'm using the maven assembly plugin to create a zip file that
contains all of the dependencies. So far so good, however, I need a script
that can be invoked on the production machine (from a cron job). 


I can write this script myself, but I'll need to ensure that all the
dependency jars are included in the classpath. I'm hoping that the assembly
plugin or some other maven feature will help me achieve this last crucial
phase but I can't find any documentation or a single example. 


I have persuaded Maven to create an executable jar of my project and it
appears to have put all the dependencies in the Manifest file. When I invoke
it using java -jar myExecJar.jar it does appear to find the dependent jars
that are in the same lib directory as myExecJar.jar (I have no idea why). 
My problem is that I need to specify an additional path to my classpath that

contains some properties files for the target platform. If I use the
-classpath, I can no-longer invoke my executable jar. I've tried just
setting CLASSPATH but this has no effect. 


Can anyone help please?

Thanks,

Alex

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: the meaning of component.xml?

2008-09-28 Thread supareno

you caould find some infos here:
http://maven.apache.org/plugins/maven-assembly-plugin/component.html

I've read the source code of maven-dependency-plugin and there is a
component.xml,
I know this file is for pluxes container to locate load the plugin, can
anybody tell me the detail meaning of component.xml, or give a document
about the component.xml tags meaning, thanks!

component-set
  
components


!-- UnArchiver --

component

roleorg.codehaus.plexus.archiver.UnArchiver/role

role-hintswc/role-hint

!-- there is no implementaion of SWCUnArchiver, but ZipUnArchive will do
the job --

implementationorg.codehaus.plexus.archiver.zip.ZipUnArchiver/implementation

instantiation-strategyper-lookup/instantiation-strategy

/component

/components

/component-set

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: M 2.0.5 Maven Compiler Plugin 2.0.2 Problem

2008-07-30 Thread supareno

please check out this:
http://maven.apache.org/plugins/maven-compiler-plugin/

everything is in :-)

Even though I define my source as 1.4, I still get the following error.

 


Please help.

 


POM:

  plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-compiler-plugin/artifactId

version2.0.2/version

configuration

compilerArguments

  verbose /

 
bootclasspath${env.JAVA_HOME}\jre\lib\rt.jar/bootclasspath


  source1.4/source

  target1.4/target

/compilerArguments

  /configuration

/plugin

ERROR:

Embedded error: Error rendering Maven report: Exit code: 1 -
E:\development\workspace\ci-2\ecm\deloitte-maven-ecm\..\deloitte-p

word, and may not be used as an identifier

(try -source 1.4 or lower to use 'enum' as an identifier)

oper.setStyle(org.apache.axis.enum.Style.WRAPPED);

  ^ 



This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law.  If you are not the intended recipient, you should delete this message. 



Any disclosure, copying, or distribution of this message, or the taking of any 
action based on it, is strictly prohibited. [v.E.1]

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Repositories

2008-07-07 Thread supareno

buters,

check out this:
http://www.hibernate.org/422.html?cmd=prntdoc

it may help you

supareno

Hi,

E.g. there is an artifact antlr-2.7.7.jar in
http://repository.jboss.org/maven2;, but m2eclipse doesn't show it in Add
Dependency. If I try to put it manual in pom.xml with dependency, Maven
doesn't accept it. I don't want to copy an artifact from repository in my
local repository. 


How can I configure my settings.xml or pom.xml that Maven accepts artifacts
from other than central repositories? 

Thanks beforehand, 
regards, buters 

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problems with multiple profiles...

2008-01-31 Thread supareno

hello,

i read a lot about profiles ans i 'm stuck on a problem
i'm using eclipse 3.2
my maven version is :
Maven version: 2.0.8
my java version is:
Java version: 1.6.0_03

so, in my pom.xml, i have a profile with build, plugins and depedencies 
like this:


project
   modelVersion4.0.0/modelVersion
   groupIdgroupid/groupId
   artifactIdartifactid/artifactId
   [...]
   profile
  build
 [...]
  /build
  depedencies
 [...]
  /depedencies
  [...]
   /profile
/project

when i run this pom with the eclipse external tools launcher, everything 
works fine

but i put mu profile between profiles tag like this

project
   [...]
   profiles
   profile
  [...]
   /profile
   /profiles
/project

to add another profile, i've got an error which is:

INFO] 


[ERROR] BUILD FAILURE
[INFO] 

[INFO] Error scanning for extensions: Error building model lineage in 
order to pre-scan for extensions: Failed to parse model from: 
/home/project/pom.xml for project unknown at /home/project/pom.xml
[INFO] 


[INFO] Total time: 1 second
[INFO] Finished at: Thu Jan 31 14:23:32 CET 2008
[INFO] Memory 2M/4M
[INFO] 



what's wrong with my config??

regards
supareno

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problems with multiple profiles...

2008-01-31 Thread supareno



Hmm, I don't know why your first example is working, because that is not a 
valid layout for the POM. See [1].
  

because eclipse plugin accept this layout
i tried my pom.xml with  mvn help:active-profiles  with a terminal and 
i had an error

Could you give us the output of mvn -e -P your-profile your-goal
  

i found the problem:
i have got a build tag with sourceDirectory tag outside the profile !

with the following layout, i don't have any error

project
   [...]
   build
  sourceDirectory.../sourceDirectory
  testSourceDirectorysrc/test/testSourceDirectory
  resources
   resource
   filteringtrue/filtering
   directorysrc/main/resources//directory
   excludes
  excludefoo/exclude
   /excludes
   /resource
  /resources
   /build
   [...]
   profiles
  profile
 build
  [...]
 /build
  /profile
  profile
 build

  [...]
 /build
  /profile
   /profiles
/project

With regards,

Nick Stolwijk

[1] http://maven.apache.org/ref/2.0.7/maven-model/maven.html
  

thanks a lot

supareno

-Original Message-
From: supareno [mailto:[EMAIL PROTECTED]
Sent: Thu 1/31/2008 2:34 PM
To: Maven Users List
Subject: problems with multiple profiles...
 
hello,


i read a lot about profiles ans i 'm stuck on a problem
i'm using eclipse 3.2
my maven version is :
Maven version: 2.0.8
my java version is:
Java version: 1.6.0_03

so, in my pom.xml, i have a profile with build, plugins and depedencies 
like this:


project
modelVersion4.0.0/modelVersion
groupIdgroupid/groupId
artifactIdartifactid/artifactId
[...]
profile
   build
  [...]
   /build
   depedencies
  [...]
   /depedencies
   [...]
/profile
/project

when i run this pom with the eclipse external tools launcher, everything 
works fine

but i put mu profile between profiles tag like this

project
[...]
profiles
profile
   [...]
/profile
/profiles
/project

to add another profile, i've got an error which is:

INFO] 


[ERROR] BUILD FAILURE
[INFO] 

[INFO] Error scanning for extensions: Error building model lineage in 
order to pre-scan for extensions: Failed to parse model from: 
/home/project/pom.xml for project unknown at /home/project/pom.xml
[INFO] 


[INFO] Total time: 1 second
[INFO] Finished at: Thu Jan 31 14:23:32 CET 2008
[INFO] Memory 2M/4M
[INFO] 



what's wrong with my config??

regards
supareno

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



double build

2008-01-29 Thread supareno

hello,

i need to do a double compilation
- one for java 6
- one for java 5 (with specifics jars)

for the moment, i have two projects with differents POMs.
is it possible to do this with  single POM file?
can i merge them with two 'build' tag??
is anybody has ever done this?


regards
supareno

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ant exception

2008-01-15 Thread supareno

hello,

i read this tutorial to use Ant
http://maven.apache.org/ant-tasks.html

the exception is on this build line:

 [...]
   artifact:pom file=pom.xml id=my.maven.project/
 [...]

exception...

Caused by: The following error occurred while executing this line:
java.lang.NoSuchMethodError: 
org.apache.maven.settings.Settings.setRuntimeInfo(Lorg/apache/maven/settings/RuntimeInfo;)V
   at 
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)

   at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   ..

is anybody has any clue??

supareno

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there a problem with surefire-junit-2.4?

2008-01-14 Thread supareno

Ben Lidgey a écrit :

Some of our builds here have started failing today as it is unable to download 
surefire-junit-2.4-SNAPSHOT artifact. Is there an issue with this?

I have tried mvn -U -up with no success. Most developers are using Maven 2.0.7, 
but some of us are using 2.0.8 to prepare for rolling that out. Would that have 
updated some plugins in the local repository, causing old builds to fail?

Downloading: http://dev1.wa:8280/maven-proxy/repository/org/apache/maven/surefir
e/surefire-junit/2.4-SNAPSHOT/surefire-junit-2.4-SNAPSHOT.pom
Downloading: http://dev1.wa:8280/maven-proxy/repository/org/apache/maven/surefir
e/surefire-junit/2.4-SNAPSHOT/surefire-junit-2.4-SNAPSHOT.jar
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to resolve artifact.

Missing:
--
1) org.apache.maven.surefire:surefire-junit:jar:2.4-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command:
  mvn install:install-file -DgroupId=org.apache.maven.surefire -DartifactId=
surefire-junit \
  -Dversion=2.4-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.apache.maven.surefire -DartifactId=sure
fire-junit \
  -Dversion=2.4-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file \
   -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
1) dummy:dummy:jar:1.0
2) org.apache.maven.surefire:surefire-junit:jar:2.4-SNAPSHOT

--
1 required artifact is missing.

for artifact:
  dummy:dummy:jar:1.0

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  appfuse (http://static.appfuse.org/repository)



Ben Lidgey
Senior Software Engineer
e: [EMAIL PROTECTED]

Inuk Networks Limited
Enterprise House
Navigation Park
Abercynon
CF45 4SN
t: +44 (0)844 546 0100
f: +44 (0)844 546 0200
w: www.inuknetworks.com


This e-mail is confidential and intended solely for the use of the 
individual(s) to whom it is addressed. Any views or opinions expressed are 
those of the author. If you are not the intended recipient, please be advised 
that any use, dissemination, printing or copying of this email is strictly 
prohibited.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

Hi,

you could try this 
http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html 
http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html

to enable snapshot repositories

regards
supareno

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Excluding files from JAR with maven-jar-plugin 2.2-SNAPSHOT failed

2008-01-12 Thread supareno

Hello guys

i read the previous threads about exclusion with interest
because i am always confronted with the excludes problem

i followed all the steps:
changed my settings.xml to enable snapshot plugin repositories...
(http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html)
everything is working except the excludes tag

my pom.xml looks like this:

...
   plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-jar-plugin/artifactId
   version2.2-SNAPSHOT/version
   executions
   execution
   goals
   goaljar/goal
   /goals
   configuration
  excludes**/*.xsd/excludes
  
schemaDirectorysrc/main/resources/xml/schemaDirectory

  /configuration
   /execution
  /executions
/plugin   
...


and when i run maven with the following command:
mvn -Papache package
i've got this exception!

...
[INFO] 


[ERROR] BUILD ERROR
[INFO] 

[INFO] Failed to configure plugin parameters for: 
org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT


   (found static expression: '**/*.xsd' which may act as a default value).


Cause: Cannot assign configuration entry 'excludes' to 'class 
[Ljava.lang.String;' from '**/*.xsd', which is of type class 
java.lang.String
[INFO] 


[INFO] For more information, run Maven with the -e switch
...

do i forget something during my builds??

regards
supareno

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Excluding files from JAR with maven-jar-plugin 2.2-SNAPSHOT failed

2008-01-12 Thread supareno

Thanks Olivier (and Jochen and Dennis),

it is now building without any error but the xsd files is always here
i'm gonna try with Ant task to if it is working !

regards

Hi,
Can you try with :
  excludes
exclude**/*.xsd/exclude
  /excludes

--
Olivier

2008/1/12, supareno [EMAIL PROTECTED]:
  

Hello guys

i read the previous threads about exclusion with interest
because i am always confronted with the excludes problem

i followed all the steps:
changed my settings.xml to enable snapshot plugin repositories...
(http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html)
everything is working except the excludes tag

my pom.xml looks like this:

...
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-jar-plugin/artifactId
version2.2-SNAPSHOT/version
executions
execution
goals
goaljar/goal
/goals
configuration
   excludes**/*.xsd/excludes

schemaDirectorysrc/main/resources/xml/schemaDirectory
   /configuration
/execution
   /executions
 /plugin
...

and when i run maven with the following command:
mvn -Papache package
i've got this exception!

...
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to configure plugin parameters for:
org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT

(found static expression: '**/*.xsd' which may act as a default value).


Cause: Cannot assign configuration entry 'excludes' to 'class
[Ljava.lang.String;' from '**/*.xsd', which is of type class
java.lang.String
[INFO]

[INFO] For more information, run Maven with the -e switch
...

do i forget something during my builds??

regards
supareno

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Excluding files from JAR with maven-jar-plugin 2.2-SNAPSHOT failed

2008-01-12 Thread supareno

thanks for your Olivier ,

it works now!
i forgot to make a clean in the target folder so that's why the files 
were always present !


regards

The excludes field in the jar plugin is to exclude content from
${project.build.outputDirectory} not to exclude resources.
In order to exclude resources have a look here [1].

I don't really understand your jar plugin configuration.
Can you try a more simple :

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-jar-plugin/artifactId
configuration
  excludes
exclude**/*.xsd/exclude
  /excludes
/configuration
  /plugin

--
Olivier
[1] 
http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html

2008/1/12, supareno [EMAIL PROTECTED]:
  

Thanks Olivier (and Jochen and Dennis),

it is now building without any error but the xsd files is always here
i'm gonna try with Ant task to if it is working !

regards


Hi,
Can you try with :
  excludes
exclude**/*.xsd/exclude
  /excludes

--
Olivier

2008/1/12, supareno [EMAIL PROTECTED]:

  

Hello guys

i read the previous threads about exclusion with interest
because i am always confronted with the excludes problem

i followed all the steps:
changed my settings.xml to enable snapshot plugin repositories...
(http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html)
everything is working except the excludes tag

my pom.xml looks like this:

...
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-jar-plugin/artifactId
version2.2-SNAPSHOT/version
executions
execution
goals
goaljar/goal
/goals
configuration
   excludes**/*.xsd/excludes

schemaDirectorysrc/main/resources/xml/schemaDirectory
   /configuration
/execution
   /executions
 /plugin
...

and when i run maven with the following command:
mvn -Papache package
i've got this exception!

...
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to configure plugin parameters for:
org.apache.maven.plugins:maven-jar-plugin:2.2-SNAPSHOT

(found static expression: '**/*.xsd' which may act as a default value).


Cause: Cannot assign configuration entry 'excludes' to 'class
[Ljava.lang.String;' from '**/*.xsd', which is of type class
java.lang.String
[INFO]

[INFO] For more information, run Maven with the -e switch
...

do i forget something during my builds??

regards
supareno

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JUnit test compilation problems

2008-01-09 Thread supareno

hello guys,

a little problem with maven and JUnit test.
i use JUnit 4.1 and a jdk 1.6.0_03 under linux (ubuntu)

my JAVA_HOME is correctly set and MAVEN_HOME too !

i wrote test classes with static import, annotations and generics.
when i run maven in a terminal

mvn test-compile

i've got the following output:

[ERROR] BUILD FAILURE
[INFO] 


[INFO] Compilation failure

/my_project/src/test/java/TestParser.java:[7,7] static import 
declarations are not supported in -source 1.3

(use -source 5 or higher to enable static import declarations)
import static org.junit.Assert.*;

/my_project/src/test/java/TestParser.java:[24,2] annotations are not 
supported in -source 1.3

(use -source 5 or higher to enable annotations)
   @Test
etc...

what am i doing wrong?

regards
supareno

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]