Using Maven outside of L/M/WAMP environment

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Maven outside of L/M/WAMP environment

New_Tech
I am a new programmer and have started the “on paper” design of my first
project.  While reading a tutorial on linking a Java program to a MySQL DB,
I was introduced to Maven as part of the conduit between Java and the DB. I
have a couple of questions about this.

1. Is Maven an absolute requirement to allow communication between those two
entities?

2. Can Maven be used outside of a *AMP environment? I may be misinterpreting
the use of Maven in this way but with it being a part of the Apache Project,
I’m assuming a *AMP server is required to create a system with Maven as a
part of it.

If this is the wrong place for this post please direct me to the correct
area. Any helpful resources to understand Maven’s purpose and necessity are
much appreciated.

Thank you



--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Using Maven outside of L/M/WAMP environment

Enrico Olivelli
Hello,

Il mer 30 ott 2019, 22:27 New_Tech <[hidden email]> ha scritto:

> I am a new programmer and have started the “on paper” design of my first
> project.  While reading a tutorial on linking a Java program to a MySQL DB,
> I was introduced to Maven as part of the conduit between Java and the DB. I
> have a couple of questions about this.
>
> 1. Is Maven an absolute requirement to allow communication between those
> two
> entities?
>

Usually you use a JDBC driver to connect to a database.
Maven is a build/project management tool

>
> 2. Can Maven be used outside of a *AMP environment? I may be
> misinterpreting
> the use of Maven in this way but with it being a part of the Apache
> Project,
> I’m assuming a *AMP server is required to create a system with Maven as a
> part of it.
>
Can you share a link to the doc you are reading about AMP?

>

> If this is the wrong place for this post please direct me to the correct
> area. Any helpful resources to understand Maven’s purpose and necessity are
> much appreciated.
>

You can start from the website
https://maven.apache.org



Enrico

>
> Thank you
>
>
>
> --
> Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Using Maven outside of L/M/WAMP environment

Jason Young
In reply to this post by New_Tech
These are good questions.

Two concepts to keep separate at all times are building the application and
running the application. Tools and environments used for one are not
necessarily present in the other. For example, Maven is used to make an
application, and a MySql DB is usually used by a running application.

OTOH, to simplify things, there are some entities you will use at both
times. For example, a Java .jar file contains both instructions which the
java executable can convert to machine code, and metadata that programs
like Maven can read to know how to fit them into a larger program. Also,
whatever is needed at runtime is _useful_ at development time for testing
the application, as the computer can run the code faster and more
accurately than any human can read the code and imagine what will happen
when it runs.

A MySql database usually serves the running application. Typically, Java
programs access relational databases (typical SQL databases, but not all
databases) with a JDBC driver. MySql is one such relational SQL database,
and there are MySql JDBC drivers.

Maven is not related to MySql in any specific way, but is a tool for
building an application (and need not be present when _running_ an
application or connecting to a database). There are JDBC drivers, including
MySql drivers, conveniently available in Maven Central (which you can
search at https://search.maven.org/). I imagine the example you saw
probably had a `<dependencies>` section in a `pom.xml` file that included a
MySql driver as a dependency--at least that's a typical way to tell Maven
that our program needs or _depends on_ that mysql driver.

So with that dependency declared, our program can now use that mysql driver
and successfully build--specifically, javac can compile the source files
that reference the classes and interfaces in the MySql driver, and make a
.jar or .war based on it. Also, with a few further steps I won't go into
now, you can run that .jar or .war, and the running program will try to
connect to a database as you dictate in your program.

HTH

On Wed, Oct 30, 2019 at 4:27 PM New_Tech <[hidden email]> wrote:

> I am a new programmer and have started the “on paper” design of my first
> project.  While reading a tutorial on linking a Java program to a MySQL DB,
> I was introduced to Maven as part of the conduit between Java and the DB. I
> have a couple of questions about this.
>
> 1. Is Maven an absolute requirement to allow communication between those
> two
> entities?
>
> 2. Can Maven be used outside of a *AMP environment? I may be
> misinterpreting
> the use of Maven in this way but with it being a part of the Apache
> Project,
> I’m assuming a *AMP server is required to create a system with Maven as a
> part of it.
>
> If this is the wrong place for this post please direct me to the correct
> area. Any helpful resources to understand Maven’s purpose and necessity are
> much appreciated.
>
> Thank you
>
>
>
> --
> Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

--
Reply | Threaded
Open this post in threaded view
|

Re: Using Maven outside of L/M/WAMP environment

Nick_S
In reply to this post by New_Tech
>
> 2. Can Maven be used outside of a *AMP environment? I may be
> misinterpreting
> the use of Maven in this way but with it being a part of the Apache
> Project,
> I’m assuming a *AMP server is required to create a system with Maven as a
> part of it.


The Apache Software Foundation (ASF, apache.org) is housing multiple
projects. The Apache HTTP server in AMP is only one of those projects,
others are for example, are Maven, but also Subversion.[1]

SO, no, you don't need Maven to run Apache HTTP server. You can use Maven
to build your Java projects, or even other types of projects. It is only
unfortunately so, that the ASF and Apache HTTP server are both called
'apache'.

With regards,

Nick Stolwijk

[1] https://projects.apache.org/projects.html

~~~ Try to leave this world a little better than you found it and, when
your turn comes to die, you can die happy in feeling that at any rate you
have not wasted your time but have done your best ~~~

Lord Baden-Powell


On Wed, Oct 30, 2019 at 10:27 PM New_Tech <[hidden email]> wrote:

> I am a new programmer and have started the “on paper” design of my first
> project.  While reading a tutorial on linking a Java program to a MySQL DB,
> I was introduced to Maven as part of the conduit between Java and the DB. I
> have a couple of questions about this.
>
> 1. Is Maven an absolute requirement to allow communication between those
> two
> entities?
>
>
>
> If this is the wrong place for this post please direct me to the correct
> area. Any helpful resources to understand Maven’s purpose and necessity are
> much appreciated.
>
> Thank you
>
>
>
> --
> Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Using Maven outside of L/M/WAMP environment

New_Tech
In reply to this post by Jason Young
That was my understanding as Maven being a build tool of sorts. I’m glad I
don’t have to use a *AMP server. I’ve been trying to avoid that in the case
I needed to transfer the program from one OS to another.  I haven’t had much
enjoyment working with *AMP at all and want to build the DB and Java program
and simply connect them regardless of the means.  Adding Maven into the
process seems helpful but necessary at this point.

Thanks for the answer. I can keep working without worry of needing Maven for
the time being.



--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]