Re: New to Maven - need help

2008-10-17 Thread Jan K

I went through the book,i donot find any information regarding adding our own
dependencies in maven.
I read a article as :
dependency
   groupIdquartz/groupId
   artifactIdquartz/artifactId
   version1.5.1/version
   scopecompile/scope
 /dependency

Maven downloads and use Quartz as a dependency for our project.So whatever
dependency we need,maven will download right?but i have some predefined
dependency for my project which doesnot exist in maven.Please let me know
how should i load my own dependency into maven and call it using
dependency tag.


Jan K wrote:
 
 Is there any possiblity of adding our own dependencies in maven?
 
 
 
 Thomas Lutz wrote:
 
 Jan K schrieb:
 First time i created a project using
  mvn archetype:create -DgroupId=com.careertales -DartifactId=careertales
 -DarchetypeArtifactId=maven-archetype-webapp.

 I got a folder structure as :
 src/main
  -- resources
  -- webapp

 In resources folder,i placed a simple java file(Test.java) which just
 prints
 a string.In webapp folder,I got some default index.jsp file and  a
 web-inf
 folder.Then i executed mvn install command.I got Build Successful in my
 console.I am able to see a target folder created.Inside this target
 folder i
 have war,classes,careertales.war folders.Then i executed mvn compile
 command.Inside classes folder, my point is i should see the  class file
 of
 Test.But instead i can see the same Test.java file in classes
 folder.What is
 going wrong?
   
 
 resources is not compiled.. it's for resources. place it in 
 src/main/java...
 
 follow the maven in 5 minutes guide from http://maven.apache.org ... 
 start with the standard java archetype... makes it easier :-)
 


 After that i placed a java file(This file prints a string)


 matinh wrote:
   
 On Thursday 16 October 2008 Jan K wrote:
 
 I went through the site given by arnaud.It is really useful for as i
 am
 new maven.
   
 Through the whole book? Really?

 
 It get the following message in the console:

 [INFO] OldArchetype created in dir:
 /home/jano/CVS/margadarsi/ct3/src/careertales
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 
 [INFO] Total time: 17 seconds
 [INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
 [INFO] Final Memory: 7M/13M
   
 The build succeeds. The question is, what did you build? Accoring to
 the 
 messages above I guess you executed some mvn archetype:create
 command, 
 right? This does not compile anything, it generates a new project.

 
 I have placed my java files in src/main/java.I dont get the class
 files
 generated when i compile.What is wrong in my code?please help
   
 How do you compile? As I explained earlier you should execute mvn
 compile 
 to compile your classes. The result can be found in the folder 
 target/classes.

 hth,
 - martin

  

 

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

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20027612.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-17 Thread David C. Hicks

Jan,

I would first suggest you search the main repository to make sure that 
the dependency you're looking for is truly not already in there.  Here 
is the site to search:  http://www.mvnrepository.com/


If you can't find what you're looking for there, then you can always add 
dependencies to your local repository using the install command.  It 
goes something like this:


mvn install:install-file -DgroupId=grouIp -DartifactId=artifactId 
-Dversion=version -Dpackaging=jar -Dfile=/path/to/file


If you need to share that dependency among a team of developers, then I 
would suggest looking at Artifactory to set up your own site-wide 
repository.  It will also cache dependencies pulled from the main 
repository and save you a little bit of network bandwidth:  
http://www.jfrog.org/sites/artifactory/1.2/


Dave

Jan K wrote:

I went through the book,i donot find any information regarding adding our own
dependencies in maven.
I read a article as :
dependency
   groupIdquartz/groupId
   artifactIdquartz/artifactId
   version1.5.1/version
   scopecompile/scope
 /dependency

Maven downloads and use Quartz as a dependency for our project.So whatever
dependency we need,maven will download right?but i have some predefined
dependency for my project which doesnot exist in maven.Please let me know
how should i load my own dependency into maven and call it using
dependency tag.


Jan K wrote:
  

Is there any possiblity of adding our own dependencies in maven?



Thomas Lutz wrote:


Jan K schrieb:
  

First time i created a project using
 mvn archetype:create -DgroupId=com.careertales -DartifactId=careertales
-DarchetypeArtifactId=maven-archetype-webapp.

I got a folder structure as :
src/main
 -- resources
 -- webapp

In resources folder,i placed a simple java file(Test.java) which just
prints
a string.In webapp folder,I got some default index.jsp file and  a
web-inf
folder.Then i executed mvn install command.I got Build Successful in my
console.I am able to see a target folder created.Inside this target
folder i
have war,classes,careertales.war folders.Then i executed mvn compile
command.Inside classes folder, my point is i should see the  class file
of
Test.But instead i can see the same Test.java file in classes
folder.What is
going wrong?
  

resources is not compiled.. it's for resources. place it in 
src/main/java...


follow the maven in 5 minutes guide from http://maven.apache.org ... 
start with the standard java archetype... makes it easier :-)


  

After that i placed a java file(This file prints a string)


matinh wrote:
  


On Thursday 16 October 2008 Jan K wrote:

  

I went through the site given by arnaud.It is really useful for as i
am
new maven.
  


Through the whole book? Really?


  

It get the following message in the console:

[INFO] OldArchetype created in dir:
/home/jano/CVS/margadarsi/ct3/src/careertales
[INFO]

[INFO] BUILD SUCCESSFUL
[INFO]

[INFO] Total time: 17 seconds
[INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
[INFO] Final Memory: 7M/13M
  


The build succeeds. The question is, what did you build? Accoring to
the 
messages above I guess you executed some mvn archetype:create
command, 
right? This does not compile anything, it generates a new project.



  

I have placed my java files in src/main/java.I dont get the class
files
generated when i compile.What is wrong in my code?please help
  


How do you compile? As I explained earlier you should execute mvn
compile 
to compile your classes. The result can be found in the folder 
target/classes.


hth,
- martin

 


  
  


-
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: New to Maven - need help

2008-10-17 Thread Jan K

I will explain in detail what i have in my hand.

I created a project.I have a folder structure created .Please note,i have
client related java files in one folder,Servlet related java files in
another folder and so on in my project.So In src/main/java ,i copied all the 
jave files(with the folder structure such as client ,servlet etc) i have in
my project and placed it there.Now in src/main/java,i have nearly 6 folders
have java files.I have run it using ant.Now i asked to do the same in
Maven.In ant,i have dependency written for each a every thing required and
finally will call the dependency in build.xml. How should i do this using
maven?Also i read in a article as : maven will download the the dependency
required for our project.How can i add my own dependencies in maven?please
help.
 


Jan K wrote:
 
 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's and installed maven. I executed the following commands  in command
 prompt,
 
 mvn archetype:create \
   -DarchetypeGroupId=org.apache.maven.archetypes \
   -DgroupId=com.mycompany.app \
   -DartifactId=my-app
 
 
 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help me what should i do next?How to change it the project i am willing to
 run?
 
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20027789.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-17 Thread Stephen Connolly
You're rushing too fast.

Seriously,

Try walking through the sonatype book or one of the other maven tutorials.

It will not take as long as you think.

You will end up understanding what you are doing and get where you are going
faster than playing table tennis with the mailing list

-Stephen

2008/10/17 Jan K [EMAIL PROTECTED]


 I will explain in detail what i have in my hand.

 I created a project.I have a folder structure created .Please note,i have
 client related java files in one folder,Servlet related java files in
 another folder and so on in my project.So In src/main/java ,i copied all
 the
 jave files(with the folder structure such as client ,servlet etc) i have in
 my project and placed it there.Now in src/main/java,i have nearly 6 folders
 have java files.I have run it using ant.Now i asked to do the same in
 Maven.In ant,i have dependency written for each a every thing required and
 finally will call the dependency in build.xml. How should i do this using
 maven?Also i read in a article as : maven will download the the dependency
 required for our project.How can i add my own dependencies in maven?please
 help.



 Jan K wrote:
 
  I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
  doc's and installed maven. I executed the following commands  in command
  prompt,
 
  mvn archetype:create \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DgroupId=com.mycompany.app \
-DartifactId=my-app
 
 
  I got a folder as my-app in my local path.I can see the pom.xml.Please
  help me what should i do next?How to change it the project i am willing
 to
  run?
 
 

 --
 View this message in context:
 http://www.nabble.com/New-to-Maven---need-help-tp19971205p20027789.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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




Re: New to Maven - need help

2008-10-17 Thread Jan K
]



   
 

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

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20028880.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-17 Thread David C. Hicks
See Stephen's comment from a previous email.  You're getting *way* ahead 
of yourself.  You've got some very basic problems that are going to get 
in your way long before dependencies are an issue.  Either get yourself 
a copy of Maven: The Definitive Guide or use the online copy -  
http://www.sonatype.com/community/definitive_guide.html.  And, as 
Stephen pointed out, go slow!  It will help you learn if you don't try 
to do too much all at one time.


Good luck!


Jan K wrote:

Hi dchicks,

I will explain in detail what i have in my hand.

I created a project in maven.I have a folder structure created .Please
note,i have client related java files in one folder,Servlet related java
files in another folder and so on in my project.So In src/main/java ,i
copied all the jave files(with the folder structure such as client ,servlet
etc) i have in my project and placed it there.Now in src/main/java,i have
nearly 6 folders having java files.I have run it using ant.Now i asked to do
the same in Maven.In ant,i have dependency written for each a every thing
required in a xml file and finally will call all the xml files in build.xml.
How should i do this using maven?Also i read in a article as : maven will
download the the dependency required for our project.How can i add my own
dependencies in maven?please help.


dchicks wrote:
  

Jan,

I would first suggest you search the main repository to make sure that 
the dependency you're looking for is truly not already in there.  Here 
is the site to search:  http://www.mvnrepository.com/


If you can't find what you're looking for there, then you can always add 
dependencies to your local repository using the install command.  It 
goes something like this:


mvn install:install-file -DgroupId=grouIp -DartifactId=artifactId 
-Dversion=version -Dpackaging=jar -Dfile=/path/to/file


If you need to share that dependency among a team of developers, then I 
would suggest looking at Artifactory to set up your own site-wide 
repository.  It will also cache dependencies pulled from the main 
repository and save you a little bit of network bandwidth:  
http://www.jfrog.org/sites/artifactory/1.2/


Dave

Jan K wrote:


I went through the book,i donot find any information regarding adding our
own
dependencies in maven.
I read a article as :
dependency
   groupIdquartz/groupId
   artifactIdquartz/artifactId
   version1.5.1/version
   scopecompile/scope
 /dependency

Maven downloads and use Quartz as a dependency for our project.So
whatever
dependency we need,maven will download right?but i have some predefined
dependency for my project which doesnot exist in maven.Please let me know
how should i load my own dependency into maven and call it using
dependency tag.


Jan K wrote:
  
  

Is there any possiblity of adding our own dependencies in maven?



Thomas Lutz wrote:



Jan K schrieb:
  
  

First time i created a project using
 mvn archetype:create -DgroupId=com.careertales
-DartifactId=careertales
-DarchetypeArtifactId=maven-archetype-webapp.

I got a folder structure as :
src/main
 -- resources
 -- webapp

In resources folder,i placed a simple java file(Test.java) which just
prints
a string.In webapp folder,I got some default index.jsp file and  a
web-inf
folder.Then i executed mvn install command.I got Build Successful in
my
console.I am able to see a target folder created.Inside this target
folder i
have war,classes,careertales.war folders.Then i executed mvn compile
command.Inside classes folder, my point is i should see the  class
file
of
Test.But instead i can see the same Test.java file in classes
folder.What is
going wrong?
  


resources is not compiled.. it's for resources. place it in 
src/main/java...


follow the maven in 5 minutes guide from http://maven.apache.org ... 
start with the standard java archetype... makes it easier :-)


  
  

After that i placed a java file(This file prints a string)


matinh wrote:
  



On Thursday 16 October 2008 Jan K wrote:

  
  

I went through the site given by arnaud.It is really useful for as i
am
new maven.
  



Through the whole book? Really?


  
  

It get the following message in the console:

[INFO] OldArchetype created in dir:
/home/jano/CVS/margadarsi/ct3/src/careertales
[INFO]

[INFO] BUILD SUCCESSFUL
[INFO]

[INFO] Total time: 17 seconds
[INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
[INFO] Final Memory: 7M/13M
  



The build succeeds. The question is, what did you build? Accoring to
the 
messages above I guess you executed some mvn archetype:create
command, 
right? This does not compile anything, it generates a new project.



  
  

I have placed 

Re: New to Maven - need help

2008-10-16 Thread Jan K

I able to build the project successfully.I get a target folder created.But i
donot find any class files created for the project.Here is my sample pom.xml
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/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdcareertales.net/groupId
  artifactIdcareertales/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  nameCT/name
  urlhttp://localhost:8080/ct2/url
  dependencies
dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scopetest/scope
/dependency
  /dependencies
/project

Please correct me.Please let me know what i am missing.




Jan K wrote:
 
 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's and installed maven. I executed the following commands  in command
 prompt,
 
 mvn archetype:create \
   -DarchetypeGroupId=org.apache.maven.archetypes \
   -DgroupId=com.mycompany.app \
   -DartifactId=my-app
 
 
 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help me what should i do next?How to change it the project i am willing to
 run?
 
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20008277.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-16 Thread Wayne Fay
Based on the information you are providing, it is nearly impossible to
tell you what's going on/wrong/missing/etc in your specific project.

Are your Java source files in src/main/java?
When you run mvn compile, what happens? Does it say BUILD
SUCCESSFUL near the bottom of the output?
When you look in the target directory, what kinds of files (if any) do
you find? You may need to go into target/classes to see your Java
class files.

The free e-books linked to by Arnaud are basically considered
mandatory reading for people posting on this list. If you have not
read them yet, you should go do it now.

Wayne

On Thu, Oct 16, 2008 at 12:06 AM, Jan K [EMAIL PROTECTED] wrote:

 I able to build the project successfully.I get a target folder created.But i
 donot find any class files created for the project.Here is my sample pom.xml
 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/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdcareertales.net/groupId
  artifactIdcareertales/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  nameCT/name
  urlhttp://localhost:8080/ct2/url
  dependencies
dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scopetest/scope
/dependency
  /dependencies
 /project

 Please correct me.Please let me know what i am missing.




 Jan K wrote:

 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's and installed maven. I executed the following commands  in command
 prompt,

 mvn archetype:create \
   -DarchetypeGroupId=org.apache.maven.archetypes \
   -DgroupId=com.mycompany.app \
   -DartifactId=my-app


 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help me what should i do next?How to change it the project i am willing to
 run?



 --
 View this message in context: 
 http://www.nabble.com/New-to-Maven---need-help-tp19971205p20008277.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 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: New to Maven - need help

2008-10-16 Thread Jan K

Hi Wayne,
Sorry to miss this information.I have a folder called classes in the target
folder.It has the entire java files used in my project.I should instead have
class files right?Please let me know.


Wayne Fay wrote:
 
 Based on the information you are providing, it is nearly impossible to
 tell you what's going on/wrong/missing/etc in your specific project.
 
 Are your Java source files in src/main/java?
 When you run mvn compile, what happens? Does it say BUILD
 SUCCESSFUL near the bottom of the output?
 When you look in the target directory, what kinds of files (if any) do
 you find? You may need to go into target/classes to see your Java
 class files.
 
 The free e-books linked to by Arnaud are basically considered
 mandatory reading for people posting on this list. If you have not
 read them yet, you should go do it now.
 
 Wayne
 
 On Thu, Oct 16, 2008 at 12:06 AM, Jan K [EMAIL PROTECTED] wrote:

 I able to build the project successfully.I get a target folder
 created.But i
 donot find any class files created for the project.Here is my sample
 pom.xml
 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/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdcareertales.net/groupId
  artifactIdcareertales/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  nameCT/name
  urlhttp://localhost:8080/ct2/url
  dependencies
dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scopetest/scope
/dependency
  /dependencies
 /project

 Please correct me.Please let me know what i am missing.




 Jan K wrote:

 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's and installed maven. I executed the following commands  in command
 prompt,

 mvn archetype:create \
   -DarchetypeGroupId=org.apache.maven.archetypes \
   -DgroupId=com.mycompany.app \
   -DartifactId=my-app


 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help me what should i do next?How to change it the project i am willing
 to
 run?



 --
 View this message in context:
 http://www.nabble.com/New-to-Maven---need-help-tp19971205p20008277.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20010431.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-16 Thread Jan K

First time i created a project using
 mvn archetype:create -DgroupId=com.careertales -DartifactId=careertales
-DarchetypeArtifactId=maven-archetype-webapp.

I got a folder structure as :
src/main
 -- resources
 -- webapp

In resources folder,i placed a simple java file(Test.java) which just prints
a string.In webapp folder,I got some default index.jsp file and  a web-inf
folder.Then i executed mvn install command.I got Build Successful in my
console.I am able to see a target folder created.Inside this target folder i
have war,classes,careertales.war folders.Then i executed mvn compile
command.Inside classes folder, my point is i should see the  class file of
Test.But instead i can see the same Test.java file in classes folder.What is
going wrong?



After that i placed a java file(This file prints a string)


matinh wrote:
 
 On Thursday 16 October 2008 Jan K wrote:
 I went through the site given by arnaud.It is really useful for as i am
 new maven.
 
 Through the whole book? Really?
 
 It get the following message in the console:

 [INFO] OldArchetype created in dir:
 /home/jano/CVS/margadarsi/ct3/src/careertales
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 
 [INFO] Total time: 17 seconds
 [INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
 [INFO] Final Memory: 7M/13M
 
 The build succeeds. The question is, what did you build? Accoring to the 
 messages above I guess you executed some mvn archetype:create command, 
 right? This does not compile anything, it generates a new project.
 
 I have placed my java files in src/main/java.I dont get the class files
 generated when i compile.What is wrong in my code?please help
 
 How do you compile? As I explained earlier you should execute mvn
 compile 
 to compile your classes. The result can be found in the folder 
 target/classes.
 
 hth,
 - martin
 
  
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20011195.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-16 Thread Thomas Lutz

Jan K schrieb:

First time i created a project using
 mvn archetype:create -DgroupId=com.careertales -DartifactId=careertales
-DarchetypeArtifactId=maven-archetype-webapp.

I got a folder structure as :
src/main
 -- resources
 -- webapp

In resources folder,i placed a simple java file(Test.java) which just prints
a string.In webapp folder,I got some default index.jsp file and  a web-inf
folder.Then i executed mvn install command.I got Build Successful in my
console.I am able to see a target folder created.Inside this target folder i
have war,classes,careertales.war folders.Then i executed mvn compile
command.Inside classes folder, my point is i should see the  class file of
Test.But instead i can see the same Test.java file in classes folder.What is
going wrong?
  


resources is not compiled.. it's for resources. place it in 
src/main/java...


follow the maven in 5 minutes guide from http://maven.apache.org ... 
start with the standard java archetype... makes it easier :-)





After that i placed a java file(This file prints a string)


matinh wrote:
  

On Thursday 16 October 2008 Jan K wrote:


I went through the site given by arnaud.It is really useful for as i am
new maven.
  

Through the whole book? Really?



It get the following message in the console:

[INFO] OldArchetype created in dir:
/home/jano/CVS/margadarsi/ct3/src/careertales
[INFO]

[INFO] BUILD SUCCESSFUL
[INFO]

[INFO] Total time: 17 seconds
[INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
[INFO] Final Memory: 7M/13M
  
The build succeeds. The question is, what did you build? Accoring to the 
messages above I guess you executed some mvn archetype:create command, 
right? This does not compile anything, it generates a new project.




I have placed my java files in src/main/java.I dont get the class files
generated when i compile.What is wrong in my code?please help
  

How do you compile? As I explained earlier you should execute mvn
compile 
to compile your classes. The result can be found in the folder 
target/classes.


hth,
- martin

 




  



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



Re: New to Maven - need help

2008-10-16 Thread Jan K

Is there any possiblity of adding our own dependencies in maven?



Thomas Lutz wrote:
 
 Jan K schrieb:
 First time i created a project using
  mvn archetype:create -DgroupId=com.careertales -DartifactId=careertales
 -DarchetypeArtifactId=maven-archetype-webapp.

 I got a folder structure as :
 src/main
  -- resources
  -- webapp

 In resources folder,i placed a simple java file(Test.java) which just
 prints
 a string.In webapp folder,I got some default index.jsp file and  a
 web-inf
 folder.Then i executed mvn install command.I got Build Successful in my
 console.I am able to see a target folder created.Inside this target
 folder i
 have war,classes,careertales.war folders.Then i executed mvn compile
 command.Inside classes folder, my point is i should see the  class file
 of
 Test.But instead i can see the same Test.java file in classes folder.What
 is
 going wrong?
   
 
 resources is not compiled.. it's for resources. place it in 
 src/main/java...
 
 follow the maven in 5 minutes guide from http://maven.apache.org ... 
 start with the standard java archetype... makes it easier :-)
 


 After that i placed a java file(This file prints a string)


 matinh wrote:
   
 On Thursday 16 October 2008 Jan K wrote:
 
 I went through the site given by arnaud.It is really useful for as i am
 new maven.
   
 Through the whole book? Really?

 
 It get the following message in the console:

 [INFO] OldArchetype created in dir:
 /home/jano/CVS/margadarsi/ct3/src/careertales
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 
 [INFO] Total time: 17 seconds
 [INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
 [INFO] Final Memory: 7M/13M
   
 The build succeeds. The question is, what did you build? Accoring to the 
 messages above I guess you executed some mvn archetype:create command, 
 right? This does not compile anything, it generates a new project.

 
 I have placed my java files in src/main/java.I dont get the class files
 generated when i compile.What is wrong in my code?please help
   
 How do you compile? As I explained earlier you should execute mvn
 compile 
 to compile your classes. The result can be found in the folder 
 target/classes.

 hth,
 - martin

  

 

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

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20013278.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-16 Thread Jan K

I went through the site given by arnaud.It is really useful for as i am new
maven.
It get the following message in the console:

[INFO] OldArchetype created in dir:
/home/jano/CVS/margadarsi/ct3/src/careertales
[INFO]

[INFO] BUILD SUCCESSFUL
[INFO]

[INFO] Total time: 17 seconds
[INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
[INFO] Final Memory: 7M/13M

I have placed my java files in src/main/java.I dont get the class files
generated when i compile.What is wrong in my code?please help


Wayne Fay wrote:
 
 Based on the information you are providing, it is nearly impossible to
 tell you what's going on/wrong/missing/etc in your specific project.
 
 Are your Java source files in src/main/java?
 When you run mvn compile, what happens? Does it say BUILD
 SUCCESSFUL near the bottom of the output?
 When you look in the target directory, what kinds of files (if any) do
 you find? You may need to go into target/classes to see your Java
 class files.
 
 The free e-books linked to by Arnaud are basically considered
 mandatory reading for people posting on this list. If you have not
 read them yet, you should go do it now.
 
 Wayne
 
 On Thu, Oct 16, 2008 at 12:06 AM, Jan K [EMAIL PROTECTED] wrote:

 I able to build the project successfully.I get a target folder
 created.But i
 donot find any class files created for the project.Here is my sample
 pom.xml
 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/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdcareertales.net/groupId
  artifactIdcareertales/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  nameCT/name
  urlhttp://localhost:8080/ct2/url
  dependencies
dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scopetest/scope
/dependency
  /dependencies
 /project

 Please correct me.Please let me know what i am missing.




 Jan K wrote:

 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's and installed maven. I executed the following commands  in command
 prompt,

 mvn archetype:create \
   -DarchetypeGroupId=org.apache.maven.archetypes \
   -DgroupId=com.mycompany.app \
   -DartifactId=my-app


 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help me what should i do next?How to change it the project i am willing
 to
 run?



 --
 View this message in context:
 http://www.nabble.com/New-to-Maven---need-help-tp19971205p20008277.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20009878.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-16 Thread Martin Höller
On Thursday 16 October 2008 Jan K wrote:
 I went through the site given by arnaud.It is really useful for as i am
 new maven.

Through the whole book? Really?

 It get the following message in the console:

 [INFO] OldArchetype created in dir:
 /home/jano/CVS/margadarsi/ct3/src/careertales
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 
 [INFO] Total time: 17 seconds
 [INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
 [INFO] Final Memory: 7M/13M

The build succeeds. The question is, what did you build? Accoring to the 
messages above I guess you executed some mvn archetype:create command, 
right? This does not compile anything, it generates a new project.

 I have placed my java files in src/main/java.I dont get the class files
 generated when i compile.What is wrong in my code?please help

How do you compile? As I explained earlier you should execute mvn compile 
to compile your classes. The result can be found in the folder 
target/classes.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: New to Maven - need help

2008-10-16 Thread sean chen(陈思淼)
the maven definitive book is very useful for the beginner of maven ,maybe
you should read it through.

2008/10/16 Jan K [EMAIL PROTECTED]


 Is there any possiblity of adding our own dependencies in maven?



 Thomas Lutz wrote:
 
  Jan K schrieb:
  First time i created a project using
   mvn archetype:create -DgroupId=com.careertales -DartifactId=careertales
  -DarchetypeArtifactId=maven-archetype-webapp.
 
  I got a folder structure as :
  src/main
   -- resources
   -- webapp
 
  In resources folder,i placed a simple java file(Test.java) which just
  prints
  a string.In webapp folder,I got some default index.jsp file and  a
  web-inf
  folder.Then i executed mvn install command.I got Build Successful in my
  console.I am able to see a target folder created.Inside this target
  folder i
  have war,classes,careertales.war folders.Then i executed mvn compile
  command.Inside classes folder, my point is i should see the  class file
  of
  Test.But instead i can see the same Test.java file in classes
 folder.What
  is
  going wrong?
 
 
  resources is not compiled.. it's for resources. place it in
  src/main/java...
 
  follow the maven in 5 minutes guide from http://maven.apache.org ...
  start with the standard java archetype... makes it easier :-)
 
 
 
  After that i placed a java file(This file prints a string)
 
 
  matinh wrote:
 
  On Thursday 16 October 2008 Jan K wrote:
 
  I went through the site given by arnaud.It is really useful for as i
 am
  new maven.
 
  Through the whole book? Really?
 
 
  It get the following message in the console:
 
  [INFO] OldArchetype created in dir:
  /home/jano/CVS/margadarsi/ct3/src/careertales
  [INFO]
 
 
  [INFO] BUILD SUCCESSFUL
  [INFO]
 
 
  [INFO] Total time: 17 seconds
  [INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
  [INFO] Final Memory: 7M/13M
 
  The build succeeds. The question is, what did you build? Accoring to
 the
  messages above I guess you executed some mvn archetype:create
 command,
  right? This does not compile anything, it generates a new project.
 
 
  I have placed my java files in src/main/java.I dont get the class
 files
  generated when i compile.What is wrong in my code?please help
 
  How do you compile? As I explained earlier you should execute mvn
  compile
  to compile your classes. The result can be found in the folder
  target/classes.
 
  hth,
  - martin
 
 
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/New-to-Maven---need-help-tp19971205p20013278.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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




Re: New to Maven - need help

2008-10-15 Thread Jan K

What are the mandatory fields(tags) to be used for settings.xml? 

Arnaud HERITIER wrote:
 
 You'll have more information in :
 - http://www.sonatype.com/community/definitive_guide.html
 - http://www.exist.com/better-build-maven
 
 Arnaud
 
 On Tue, Oct 14, 2008 at 12:54 PM, Jan K [EMAIL PROTECTED] wrote:
 

 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's
 and installed maven. I executed the following commands  in command
 prompt,

 mvn archetype:create \
  -DarchetypeGroupId=org.apache.maven.archetypes \
  -DgroupId=com.mycompany.app \
  -DartifactId=my-app


 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help
 me what should i do next?How to change it the project i am willing to
 run?

 --
 View this message in context:
 http://www.nabble.com/New-to-Maven---need-help-tp19971205p19971205.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

 
 
 
 -- 
 ..
 Arnaud HERITIER
 ..
 OCTO Technology - aheritier AT octo DOT com
 www.octo.com | blog.octo.com
 ..
 ASF - aheritier AT apache DOT org
 www.apache.org | maven.apache.org
 ...
 
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p19988056.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-15 Thread Martin Höller
On Wednesday 15 October 2008 Jan K wrote:
 What are the mandatory fields(tags) to be used for settings.xml?

You don't need a settings.xml file at all. A good overview is available at 
http://maven.apache.org/settings.html

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: New to Maven - need help

2008-10-14 Thread Arnaud HERITIER
You'll have more information in :
- http://www.sonatype.com/community/definitive_guide.html
- http://www.exist.com/better-build-maven

Arnaud

On Tue, Oct 14, 2008 at 12:54 PM, Jan K [EMAIL PROTECTED] wrote:


 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's
 and installed maven. I executed the following commands  in command prompt,

 mvn archetype:create \
  -DarchetypeGroupId=org.apache.maven.archetypes \
  -DgroupId=com.mycompany.app \
  -DartifactId=my-app


 I got a folder as my-app in my local path.I can see the pom.xml.Please help
 me what should i do next?How to change it the project i am willing to run?

 --
 View this message in context:
 http://www.nabble.com/New-to-Maven---need-help-tp19971205p19971205.html
 Sent from the Maven - Users mailing list archive at Nabble.com.




-- 
..
Arnaud HERITIER
..
OCTO Technology - aheritier AT octo DOT com
www.octo.com | blog.octo.com
..
ASF - aheritier AT apache DOT org
www.apache.org | maven.apache.org
...


Re: New to Maven - need help

2008-10-14 Thread Martin Höller
On Tuesday 14 October 2008 Jan K wrote:
 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's and installed maven. I executed the following commands  in command
 prompt,

 mvn archetype:create \
   -DarchetypeGroupId=org.apache.maven.archetypes \
   -DgroupId=com.mycompany.app \
   -DartifactId=my-app


 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help me what should i do next?

Depends on what you want to do.

You'll find the sources in my-app/src/main/java and the tests in 
my-app/src/test/java. Adapt both as you need.

To compile, package and install into your local repository cd into 'my-app' 
and run 'mvn compile', 'mvn package' resp. 'mvn install'.

As Arnaud poited out, more information can be found in the books Maven, The 
Definitve Guide and Better Builds with Maven.

hth,
- martin





signature.asc
Description: This is a digitally signed message part.


New to Maven - need help

2008-10-14 Thread Jan K

I am very new to maven.I have downloaded apache-maven-2.0.9.I read the doc's
and installed maven. I executed the following commands  in command prompt,

mvn archetype:create \
  -DarchetypeGroupId=org.apache.maven.archetypes \
  -DgroupId=com.mycompany.app \
  -DartifactId=my-app


I got a folder as my-app in my local path.I can see the pom.xml.Please help
me what should i do next?How to change it the project i am willing to run?

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p19971205.html
Sent from the Maven - Users mailing list archive at Nabble.com.