You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Miren <mi...@tinieblas.com> on 2006/08/19 17:48:31 UTC

new using maven., please help me

hello
i am begining using maven.
i hve use ant and i am trying using maven but i dont know how towork or
beging using maven.
i am reading "better builds with maven" but i cannot begin, i dont work
fine with it.

i have one proyect in java.
the structure of my proyect is this:
/myproyect
-src
-WebContent
into ther rc directory i have the java sources
into the Webcontent i have the web part (jsp, web.xml, tld...)
the output for thi proyect must to be one war file
can anyody helps me to make one pom file, correct file for using ths with
maven?
can anybody send me one example for using with my proyect? for using as
demo and with my dcumenttion know how works maven.

other questios:
1.- m pryect uses some lib, jar files. i must to put it into the pom file
.. but must i to put them into some directories?
2.- when i execute my pom file appears this error:
[INFO] the pluging org.apache.maven.plugins:maven-archetype-pluging dos
not exist or not valid version could be found.

Why pears this error?
i have nstall the file from the apache site, maven site (2.0.4


thanks

please help me with one example

THANKS


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


Re: new using maven., please help me

Posted by Valerio Schiavoni <va...@gmail.com>.
Hi Miren,

On 8/22/06, Miren <mi...@tinieblas.com> wrote:
>
> How can i overwrite he default source and webapp drectory?


something like:

<build>
   <sourceDirectory>
      src/YOUR/DIRECTORY
   </sourceDirectory>
   ...
</build>

By the way, you should think carefully about adopting maven conventions,
which is strongly suggested (not to mention that some plugin could possibly
not work).

cheers,
valerio
-- 
http://valerioschiavoni.blogspot.com
http://jroller.com/page/vschiavoni

Re: new using maven., please help me

Posted by Alex Turner <ar...@gmail.com>.
The point of using maven is to use convention over configuration - if you
override the conventions, you loose half the benefit of using maven.  Move
your source directory rather than configuration maven.

Alex.

On 8/22/06, Miren <mi...@tinieblas.com> wrote:
>
> How can i overwrite he default source and webapp drectory?
> this:
> my app drectories are:
> JavaSource for one proyect and java.javs.... for other (this into the java
> sorces)
> and
> html or WebContent or WebApplication for the web application
>
> How can i use maven 2 for using this directories for the sorce files?
>
> thanks
> plese help me
>
>
>
> > Unfortunately the default maven repository does not work, you will have
> to
> > configure a mirror:
> >
> > create a file ~/.m2/settings.xml:
> >
> > <settings>
> >    <mirrors>
> >       <mirror>
> >          <id>isu.edu</id>
> >          <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
> >          <mirrorOf>central</mirrorOf>
> >       </mirror>
> >       <mirror>
> >          <id>ibiblio.org</id>
> >          <url>http://www.ibiblio.org/maven2</url>
> >          <mirrorOf>central</mirrorOf>
> >       </mirror>
> >    </mirrors>
> > </settings>
> >
> >
> > Then you must re-arrange your code to match the maven layout.  Source
> code
> > goes in src/main/java/
> > web app code goes in src/main/webapp
> >
> > Then your pom might look something like this:
> > <project>
> >    <modelVersion>4.0.0</modelVersion>
> >    <parent>
> >       <groupId>com.mydomain.myproject</groupId>
> >       <artifactId>myproject</artifactId>
> >       <version>1.0</version>
> >    </parent>
> >    <artifactId>myproject</artifactId>
> >    <name>myproject web app</name>
> >    <packaging>war</packaging>
> >    <description>Web App</description>
> >    <dependencies>
> >       <!-- Commons Libraries -->
> >       <dependency>
> >          <groupId>commons-email</groupId>
> >          <artifactId>commons-email</artifactId>
> >          <version>1.0</version>
> >          <scope>provided</scope>
> >       </dependency>
> >       <dependency>
> >          <groupId>commons-fileupload</groupId>
> >          <artifactId>commons-fileupload</artifactId>
> >          <version>1.1</version>
> >          <scope>provided</scope>
> >       </dependency>
> >       <!-- Database Library -->
> >       <dependency>
> >          <groupId>postgresql</groupId>
> >          <artifactId>postgresql</artifactId>
> >          <version>8.1-404.jdbc3</version>
> >          <scope>provided</scope>
> >       </dependency>
> >       <!-- javax -->
> >       <dependency>
> >          <groupId>javax.mail</groupId>
> >          <artifactId>mail</artifactId>
> >          <version>1.4</version>
> >          <scope>provided</scope>
> >       </dependency>
> >       <!-- JSTL -->
> >       <dependency>
> >          <groupId>javax.servlet</groupId>
> >          <artifactId>jsp-api</artifactId>
> >          <version>2.0</version>
> >          <scope>provided</scope>
> >       </dependency>
> >       <dependency>
> >          <groupId>javax.servlet</groupId>
> >          <artifactId>servlet-api</artifactId>
> >          <version>2.4</version>
> >          <scope>provided</scope>
> >       </dependency>
> >       <dependency>
> >          <groupId>javax.servlet</groupId>
> >          <artifactId>jstl</artifactId>
> >          <version>1.1.2</version>
> >          <scope>provided</scope>
> >       </dependency>
> >       <dependency>
> >          <groupId>taglibs</groupId>
> >          <artifactId>standard</artifactId>
> >          <version>1.1.2</version>
> >          <scope>provided</scope>
> >       </dependency>
> >       <dependency>
> >          <groupId>taglibs</groupId>
> >          <artifactId>c</artifactId>
> >          <version>1.1.2</version>
> >          <type>tld</type>
> >       </dependency>
> >       <dependency>
> >          <groupId>taglibs</groupId>
> >          <artifactId>sql</artifactId>
> >          <version>1.1.2</version>
> >          <type>tld</type>
> >       </dependency>
> >    </dependencies>
> > </project>
> >
> > Alex
> >
> >
> > On 8/19/06, Miren <mi...@tinieblas.com> wrote:
> >>
> >> hello
> >> i am begining using maven.
> >> i hve use ant and i am trying using maven but i dont know how towork or
> >> beging using maven.
> >> i am reading "better builds with maven" but i cannot begin, i dont work
> >> fine with it.
> >>
> >> i have one proyect in java.
> >> the structure of my proyect is this:
> >> /myproyect
> >> -src
> >> -WebContent
> >> into ther rc directory i have the java sources
> >> into the Webcontent i have the web part (jsp, web.xml, tld...)
> >> the output for thi proyect must to be one war file
> >> can anyody helps me to make one pom file, correct file for using ths
> >> with
> >> maven?
> >> can anybody send me one example for using with my proyect? for using as
> >> demo and with my dcumenttion know how works maven.
> >>
> >> other questios:
> >> 1.- m pryect uses some lib, jar files. i must to put it into the pom
> >> file
> >> .. but must i to put them into some directories?
> >> 2.- when i execute my pom file appears this error:
> >> [INFO] the pluging org.apache.maven.plugins:maven-archetype-pluging dos
> >> not exist or not valid version could be found.
> >>
> >> Why pears this error?
> >> i have nstall the file from the apache site, maven site (2.0.4
> >>
> >>
> >> thanks
> >>
> >> please help me with one example
> >>
> >> THANKS
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: new using maven., please help me

Posted by Miren <mi...@tinieblas.com>.
How can i overwrite he default source and webapp drectory?
this:
my app drectories are:
JavaSource for one proyect and java.javs.... for other (this into the java
sorces)
and
html or WebContent or WebApplication for the web application

How can i use maven 2 for using this directories for the sorce files?

thanks
plese help me



> Unfortunately the default maven repository does not work, you will have to
> configure a mirror:
>
> create a file ~/.m2/settings.xml:
>
> <settings>
>    <mirrors>
>       <mirror>
>          <id>isu.edu</id>
>          <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
>          <mirrorOf>central</mirrorOf>
>       </mirror>
>       <mirror>
>          <id>ibiblio.org</id>
>          <url>http://www.ibiblio.org/maven2</url>
>          <mirrorOf>central</mirrorOf>
>       </mirror>
>    </mirrors>
> </settings>
>
>
> Then you must re-arrange your code to match the maven layout.  Source code
> goes in src/main/java/
> web app code goes in src/main/webapp
>
> Then your pom might look something like this:
> <project>
>    <modelVersion>4.0.0</modelVersion>
>    <parent>
>       <groupId>com.mydomain.myproject</groupId>
>       <artifactId>myproject</artifactId>
>       <version>1.0</version>
>    </parent>
>    <artifactId>myproject</artifactId>
>    <name>myproject web app</name>
>    <packaging>war</packaging>
>    <description>Web App</description>
>    <dependencies>
>       <!-- Commons Libraries -->
>       <dependency>
>          <groupId>commons-email</groupId>
>          <artifactId>commons-email</artifactId>
>          <version>1.0</version>
>          <scope>provided</scope>
>       </dependency>
>       <dependency>
>          <groupId>commons-fileupload</groupId>
>          <artifactId>commons-fileupload</artifactId>
>          <version>1.1</version>
>          <scope>provided</scope>
>       </dependency>
>       <!-- Database Library -->
>       <dependency>
>          <groupId>postgresql</groupId>
>          <artifactId>postgresql</artifactId>
>          <version>8.1-404.jdbc3</version>
>          <scope>provided</scope>
>       </dependency>
>       <!-- javax -->
>       <dependency>
>          <groupId>javax.mail</groupId>
>          <artifactId>mail</artifactId>
>          <version>1.4</version>
>          <scope>provided</scope>
>       </dependency>
>       <!-- JSTL -->
>       <dependency>
>          <groupId>javax.servlet</groupId>
>          <artifactId>jsp-api</artifactId>
>          <version>2.0</version>
>          <scope>provided</scope>
>       </dependency>
>       <dependency>
>          <groupId>javax.servlet</groupId>
>          <artifactId>servlet-api</artifactId>
>          <version>2.4</version>
>          <scope>provided</scope>
>       </dependency>
>       <dependency>
>          <groupId>javax.servlet</groupId>
>          <artifactId>jstl</artifactId>
>          <version>1.1.2</version>
>          <scope>provided</scope>
>       </dependency>
>       <dependency>
>          <groupId>taglibs</groupId>
>          <artifactId>standard</artifactId>
>          <version>1.1.2</version>
>          <scope>provided</scope>
>       </dependency>
>       <dependency>
>          <groupId>taglibs</groupId>
>          <artifactId>c</artifactId>
>          <version>1.1.2</version>
>          <type>tld</type>
>       </dependency>
>       <dependency>
>          <groupId>taglibs</groupId>
>          <artifactId>sql</artifactId>
>          <version>1.1.2</version>
>          <type>tld</type>
>       </dependency>
>    </dependencies>
> </project>
>
> Alex
>
>
> On 8/19/06, Miren <mi...@tinieblas.com> wrote:
>>
>> hello
>> i am begining using maven.
>> i hve use ant and i am trying using maven but i dont know how towork or
>> beging using maven.
>> i am reading "better builds with maven" but i cannot begin, i dont work
>> fine with it.
>>
>> i have one proyect in java.
>> the structure of my proyect is this:
>> /myproyect
>> -src
>> -WebContent
>> into ther rc directory i have the java sources
>> into the Webcontent i have the web part (jsp, web.xml, tld...)
>> the output for thi proyect must to be one war file
>> can anyody helps me to make one pom file, correct file for using ths
>> with
>> maven?
>> can anybody send me one example for using with my proyect? for using as
>> demo and with my dcumenttion know how works maven.
>>
>> other questios:
>> 1.- m pryect uses some lib, jar files. i must to put it into the pom
>> file
>> .. but must i to put them into some directories?
>> 2.- when i execute my pom file appears this error:
>> [INFO] the pluging org.apache.maven.plugins:maven-archetype-pluging dos
>> not exist or not valid version could be found.
>>
>> Why pears this error?
>> i have nstall the file from the apache site, maven site (2.0.4
>>
>>
>> thanks
>>
>> please help me with one example
>>
>> THANKS
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>



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


Re: new using maven., please help me

Posted by Alex Turner <ar...@gmail.com>.
Unfortunately the default maven repository does not work, you will have to
configure a mirror:

create a file ~/.m2/settings.xml:

<settings>
   <mirrors>
      <mirror>
         <id>isu.edu</id>
         <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
         <mirrorOf>central</mirrorOf>
      </mirror>
      <mirror>
         <id>ibiblio.org</id>
         <url>http://www.ibiblio.org/maven2</url>
         <mirrorOf>central</mirrorOf>
      </mirror>
   </mirrors>
</settings>


Then you must re-arrange your code to match the maven layout.  Source code
goes in src/main/java/
web app code goes in src/main/webapp

Then your pom might look something like this:
<project>
   <modelVersion>4.0.0</modelVersion>
   <parent>
      <groupId>com.mydomain.myproject</groupId>
      <artifactId>myproject</artifactId>
      <version>1.0</version>
   </parent>
   <artifactId>myproject</artifactId>
   <name>myproject web app</name>
   <packaging>war</packaging>
   <description>Web App</description>
   <dependencies>
      <!-- Commons Libraries -->
      <dependency>
         <groupId>commons-email</groupId>
         <artifactId>commons-email</artifactId>
         <version>1.0</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>commons-fileupload</groupId>
         <artifactId>commons-fileupload</artifactId>
         <version>1.1</version>
         <scope>provided</scope>
      </dependency>
      <!-- Database Library -->
      <dependency>
         <groupId>postgresql</groupId>
         <artifactId>postgresql</artifactId>
         <version>8.1-404.jdbc3</version>
         <scope>provided</scope>
      </dependency>
      <!-- javax -->
      <dependency>
         <groupId>javax.mail</groupId>
         <artifactId>mail</artifactId>
         <version>1.4</version>
         <scope>provided</scope>
      </dependency>
      <!-- JSTL -->
      <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>jsp-api</artifactId>
         <version>2.0</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>servlet-api</artifactId>
         <version>2.4</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>jstl</artifactId>
         <version>1.1.2</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>taglibs</groupId>
         <artifactId>standard</artifactId>
         <version>1.1.2</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>taglibs</groupId>
         <artifactId>c</artifactId>
         <version>1.1.2</version>
         <type>tld</type>
      </dependency>
      <dependency>
         <groupId>taglibs</groupId>
         <artifactId>sql</artifactId>
         <version>1.1.2</version>
         <type>tld</type>
      </dependency>
   </dependencies>
</project>

Alex


On 8/19/06, Miren <mi...@tinieblas.com> wrote:
>
> hello
> i am begining using maven.
> i hve use ant and i am trying using maven but i dont know how towork or
> beging using maven.
> i am reading "better builds with maven" but i cannot begin, i dont work
> fine with it.
>
> i have one proyect in java.
> the structure of my proyect is this:
> /myproyect
> -src
> -WebContent
> into ther rc directory i have the java sources
> into the Webcontent i have the web part (jsp, web.xml, tld...)
> the output for thi proyect must to be one war file
> can anyody helps me to make one pom file, correct file for using ths with
> maven?
> can anybody send me one example for using with my proyect? for using as
> demo and with my dcumenttion know how works maven.
>
> other questios:
> 1.- m pryect uses some lib, jar files. i must to put it into the pom file
> .. but must i to put them into some directories?
> 2.- when i execute my pom file appears this error:
> [INFO] the pluging org.apache.maven.plugins:maven-archetype-pluging dos
> not exist or not valid version could be found.
>
> Why pears this error?
> i have nstall the file from the apache site, maven site (2.0.4
>
>
> thanks
>
> please help me with one example
>
> THANKS
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>