-
Tutorial: Using Maven to build your J2EE Projects (35 messages)
- Posted by: Nate Borg
- Posted on: November 25 2003 12:39 EST
Maven is a high-level, project management, build and deployment tool from the Apache project that adds a layer of abstraction above Ant. Using extensive code samples, this article shows you how to use Maven to set up a project template, compile source files, create a JAR and publish the artifact into a repository. It covers inheritance in the Maven POM (Project Object Model), shows you how to set up a sample J2EE project, create WARs, EJB-JARs, dependency JARS, build the EAR file and how to use the Maven Reactor.
Read Maven MagicThreaded Messages (35)
- Tutorial: Using Maven to build your J2EE Projects by John Davies on November 25 2003 13:01 EST
- Tutorial: Using Maven to build your J2EE Projects by Xiaofan JIN on January 03 2012 18:53 EST
- Tutorial: Using Maven to build your J2EE Projects by Steve Lewis on November 25 2003 13:59 EST
- Tutorial: Using Maven to build your J2EE Projects by Eugen Kuleshov on November 25 2003 14:42 EST
- Tutorial: Using Maven to build your J2EE Projects by Brett Porter on November 25 2003 05:21 EST
- Tutorial: Using Maven to build your J2EE Projects by Xiaofan JIN on January 03 2012 06:57 EST
- Tutorial: Using Maven to build your J2EE Projects by Andy Jefferson on November 26 2003 05:24 EST
- Nice tool : needs a GUI and a dedicated admin by Laurent BEDE on November 26 2003 10:15 EST
- Tutorial: Using Maven to build your J2EE Projects by Eugen Kuleshov on November 25 2003 14:42 EST
- Tutorial: Using Maven to build your J2EE Projects by Race Condition on November 25 2003 17:28 EST
- Tutorial: Using Maven to build your J2EE Projects by Peter Cheng on November 25 2003 21:27 EST
- Maven seems good but.... by gaetan zoritchak on November 27 2003 14:57 EST
- ... but try this by Andy Jefferson on November 28 2003 08:22 EST
-
... but try this by gaetan zoritchak on December 01 2003 06:12 EST
- Re: ... but try this by Srikanth Shenoy on December 01 2003 10:32 EST
-
... but try this by gaetan zoritchak on December 01 2003 06:12 EST
- ... but try this by Andy Jefferson on November 28 2003 08:22 EST
- Error building the sample code by Ken Yu on November 30 2003 21:54 EST
- Error building the sample code by Andy Jefferson on December 01 2003 04:16 EST
-
RE: Error building the sample code by Srikanth Shenoy on December 01 2003 10:37 EST
-
RE: Error building the sample code by Ken Yu on December 02 2003 04:31 EST
- RE: Error building the sample code by Andy Jefferson on December 02 2003 04:33 EST
-
RE: Error building the sample code by Ken Yu on December 02 2003 04:36 EST
-
My Fixes When Building by K T on February 12 2004 05:43 EST
- My Fixes When Building by J Tigger on May 21 2004 04:07 EDT
-
My Fixes When Building by K T on February 12 2004 05:43 EST
-
RE: Error building the sample code by Ken Yu on December 02 2003 04:31 EST
-
RE: Error building the sample code by Srikanth Shenoy on December 01 2003 10:37 EST
- Proxy-Settings by Jan Mat?rne on December 04 2003 09:24 EST
- Error building the sample code by Andy Jefferson on December 01 2003 04:16 EST
- Problem running the maven java:compile by sreram kumar on December 04 2003 23:56 EST
- Problem running the maven java:compile by sreram kumar on December 05 2003 00:11 EST
-
Make Maven connect to our own central server instead of ibiblio by Vivek Venugopalan on December 05 2003 06:17 EST
-
thats easy too by Andy Jefferson on December 06 2003 03:30 EST
-
thats easy too - but how? by sreram kumar on December 08 2003 02:25 EST
- using a proxy by Klaas van der Ploeg on December 09 2003 01:28 EST
-
thats easy too - but how? by sreram kumar on December 08 2003 02:25 EST
-
hi by Rama Sarma on February 03 2005 01:00 EST
- JEE maven skeleton project by Marc de Kwant on November 04 2009 06:42 EST
-
thats easy too by Andy Jefferson on December 06 2003 03:30 EST
- Problem running the maven java:compile by Dhanya Kairali on April 28 2004 05:48 EDT
-
Make Maven connect to our own central server instead of ibiblio by Vivek Venugopalan on December 05 2003 06:17 EST
- Problem running the maven java:compile by sreram kumar on December 05 2003 00:11 EST
- Tutorial: Using Maven to build your J2EE Projects by jason williams on May 28 2004 04:11 EDT
- Error No goal [xdoclet:XXXXX] by diego ll on June 17 2004 08:17 EDT
- Opportunity: Maven / Nexus Implementation / customization by Oliver Eaton on August 22 2010 05:24 EDT
-
Tutorial: Using Maven to build your J2EE Projects[ Go to top ]
- Posted by: John Davies
- Posted on: November 25 2003 13:01 EST
- in response to Nate Borg
My God! This is more documentation on Maven than I've ever seen, does this mean it's getting close to being finished at long last? Great tool, highly recommended!
-John-
C24.biz -
Tutorial: Using Maven to build your J2EE Projects[ Go to top ]
- Posted by: Xiaofan JIN
- Posted on: January 03 2012 18:53 EST
- in response to John Davies
My God! This is more documentation on Maven than I've ever seen, does this mean it's getting close to being finished at long last? Great tool, highly recommended!
-John-
C24.biz -
Tutorial: Using Maven to build your J2EE Projects[ Go to top ]
- Posted by: Steve Lewis
- Posted on: November 25 2003 13:59 EST
- in response to Nate Borg
"Maven on the other hand mandates certain directories and file names, but it provides plugins to make life easier."
One question I have is does a jar/war/ear have to be in a certain directory structure, or can you tell Maven where each src might be? Looking at it, it looks like it's smart enough so you can tell it where the source is in each project.xml.
Steve -
Tutorial: Using Maven to build your J2EE Projects[ Go to top ]
- Posted by: Eugen Kuleshov
- Posted on: November 25 2003 14:42 EST
- in response to Steve Lewis
For this you'll have to define a number of undocumented properties (read Jelly code for default Maven plugins) or you can write your custom plugin (that's what I did). -
Tutorial: Using Maven to build your J2EE Projects[ Go to top ]
- Posted by: Brett Porter
- Posted on: November 25 2003 17:21 EST
- in response to Eugen Kuleshov
Which properties are considered undocumented?
http://maven.apache.org/reference/project-descriptor.html
http://maven.apache.org/reference/plugins/war/properties.html
http://maven.apache.org/reference/plugins/jar/properties.html
These seem to cover it... -
Tutorial: Using Maven to build your J2EE Projects[ Go to top ]
- Posted by: Xiaofan JIN
- Posted on: January 03 2012 18:57 EST
- in response to Eugen Kuleshov
For this you'll have to define a number of undocumented properties (read Jelly code for default Maven plugins) or you can write your custom plugin (that's what I did).
-
Tutorial: Using Maven to build your J2EE Projects[ Go to top ]
- Posted by: Andy Jefferson
- Posted on: November 26 2003 05:24 EST
- in response to Steve Lewis
Basically each deliverable has its own project ... and you have the multi-project structure that Srikanth outlined (and so in each project.xml you specify where the source is for that part).
Good article and useful in getting people started on Maven with a real example that they can associate with. Srikanth didn't touch on the website generation capabilities of Maven and in particular the "multiproject" plugin (which uses the Reactor). The "multiproject" plugin is a first stab at linking together multiple (dependent) projects (and since Maven guides people to have separate projects for each deliverable, is necessary). -
Nice tool : needs a GUI and a dedicated admin[ Go to top ]
- Posted by: Laurent BEDE
- Posted on: November 26 2003 10:15 EST
- in response to Andy Jefferson
We are making intensive use of Maven since a year.
We manage to continuously integrate the code from 110 devers each two hours.
It has many plugins, some OS, some not (like clover for test coverage).
But it would need a GUI to administer all the scripts and our experience shows you must dedicate one full time equivalent people per 50 devers...
I would suggest, IDE vendors take that in consideration and propose some kind of propriatary build engines or at least GUI for Maven.
I think AntHill is a $product that intends to do the same; see also cruise control (Os).
Laurent. -
Tutorial: Using Maven to build your J2EE Projects[ Go to top ]
- Posted by: Race Condition
- Posted on: November 25 2003 17:28 EST
- in response to Nate Borg
Main Entry: ma·ven
Variant(s): or ma·vin /'mA-v&n/
Function: noun
Etymology: Yiddish meyvn, from Late Hebrew mEbhIn
Date: circa 1952
: one who is experienced or knowledgeable : EXPERT; also : FREAK 4 -
Tutorial: Using Maven to build your J2EE Projects[ Go to top ]
- Posted by: Peter Cheng
- Posted on: November 25 2003 21:27 EST
- in response to Nate Borg
Many thanks
Recently , i am using maven to build, integrate, manage our project , it's pretty good!
more resources
www.onjava.com/pub/a/onjava/2003/10/22/maven.html
www.javausergroup.at/events/maven.pdf
http://www-106.ibm.com/developerworks/java/library/j-maven/
maven chinese site
www.huangdong.com
founder_chen
www.huihoo.org
Open Source Middleware Community -
Maven seems good but....[ Go to top ]
- Posted by: gaetan zoritchak
- Posted on: November 27 2003 14:57 EST
- in response to Nate Borg
I've been interested by the article because everybody around me tell me that maven is a great tool that simplifies the build process. I wanted to have more documentation before spending time on evaluating this tool.
This article help me understanting the concepts but I still have some doubts.
Explain me how MAVEN would resolve this practical build process:
I have a project which deals with client and server sources. The server sources are used to produce a war file. The client sources are used to produce a jar client file. Some of the sources (4 classes )are shared by both server and client.
When I want to test my project I must use my WAR file with an ejb JAR to deploy a testing EAR. Then my client test code can perform some call on my server to validate the war.
To understand the script in detail you can have a look at the actual ant build file at :
http://cvs.sourceforge.net/viewcvs.py/*checkout*/bsframework/fwk2/remoting/build.xml?content-type=text%2Fplain&rev=1.5
How does MAVEN handles this kind of problem with its limitation of producing only one artifact per project?
Gaetan Zoritchak,
Bright Side Factory,
http://www.bs-factory.com -
... but try this[ Go to top ]
- Posted by: Andy Jefferson
- Posted on: November 28 2003 08:22 EST
- in response to gaetan zoritchak
OK, to give you an *idea* of how you could handle your system, try a project structure like this
project.xml - TopLevel project
common/project.xml - Shared source project (creates JAR)
client/project.xml - Creates client (dependent on "common", creates JAR)
server/project.xml - Creates server (dependent on "common", creates WAR)
The testing parts of each project can be configured to bundle in things that are needed - specified in a separate part of the project.xml. Are you testing with JUnit, or with some other tool ? Its likely that in the Maven plugin for your testing tool (JUnit, Clover, etc) that you can create the EAR no problem.
The bottom line is that Maven targets you to create a single deliverable per project, so you use multiple projects with interdependencies. You CAN create multiple deliverables in a project by use of the maven.xml file, particularly for one-off type situations.
I'd have no doubt that your situation can be handled easily enough, using the above as a template. If in doubt try the maven users mailing list and you'll get an answer from someone who has done it.
HTH -
... but try this[ Go to top ]
- Posted by: gaetan zoritchak
- Posted on: December 01 2003 06:12 EST
- in response to Andy Jefferson
Thanks for your answer.
I find this solution quite "heavy". In this example, the commons classes represents 7 classes, the server adds 4 classes, the client 3 classes. I don't find that using 3 projects to handle few classes helps a lot!!!
Gaetan Zoritchak, -
Re: ... but try this[ Go to top ]
- Posted by: Srikanth Shenoy
- Posted on: December 01 2003 10:32 EST
- in response to gaetan zoritchak
Thanks for your answer.
>
> I find this solution quite "heavy". In this example, the commons classes represents 7 classes, the server adds 4 classes, the client 3 classes. I don't find that using 3 projects to handle few classes helps a lot!!!
>
> Gaetan Zoritchak,
The example project was meant to illustrate the interdependency among projects.
Hence the three projects were created.
It does in no way mean that number of projects is proportional to the number of classes.
I would put it like this: The number of projects is dependent only on the granularity of dependency that you want.
Niothing prevents you from having a common project with perhaps 1000 classes in it.
Hope that helps,
Srikanth -
Error building the sample code[ Go to top ]
- Posted by: Ken Yu
- Posted on: November 30 2003 21:54 EST
- in response to Nate Borg
Perhaps I am missing something from the example but I am getting the following error when I execute maven foobar:build-all
Attempting to download xdoclet-web-module-1.2b4.jar.
WARNING: Failed to download xdoclet-web-module-1.2b4.jar.
Attempting to download jakarta-struts-1.0.2.jar.
WARNING: Failed to download jakarta-struts-1.0.2.jar.
Attempting to download ldapjdk-1.0.jar.
WARNING: Failed to download ldapjdk-1.0.jar.
Any insights? -
Error building the sample code[ Go to top ]
- Posted by: Andy Jefferson
- Posted on: December 01 2003 04:16 EST
- in response to Ken Yu
The author used ver 1.2b4 of xdoclet, yet that is not currently on IBiblio (Mavens download site). As a result it can't find the JAR's to put in the Maven repository on your machine. You can alleviate this by going to the xdoclet site (xdoclet.sf.net) and download it manually (they have a Maven info page over there).
The other jars you can do something similar with ... grab them manually and put them in your Maven repository.
If in doubt, go to the Maven users mailing list -
RE: Error building the sample code[ Go to top ]
- Posted by: Srikanth Shenoy
- Posted on: December 01 2003 10:37 EST
- in response to Andy Jefferson
The author used ver 1.2b4 of xdoclet, yet that is not currently on IBiblio (Mavens download site). As a result it can't find the JAR's to put in the Maven repository on your machine. You can alleviate this by going to the xdoclet site (xdoclet.sf.net) and download it manually (they have a Maven info page over there).
>
> The other jars you can do something similar with ... grab them manually and put them in your Maven repository.
>
You are right Andy. I should have perhaps mentioned this in the tutorial.
The ldapjdk.jar is not necessary. When I created the example by cutting and pasting from another project of mine, it must have been included by oversight. Sorry ;-(
It should be removed from the project.xml's dependency sections.
Hope that helps,
Srikanth -
RE: Error building the sample code[ Go to top ]
- Posted by: Ken Yu
- Posted on: December 02 2003 04:31 EST
- in response to Srikanth Shenoy
Thanks for the insights and perhaps you can provide further insights by providing the information.
1) Looking at the Maven plug-in link for the the XDoclet, it seems to show 1.2b2
2) Looking at the available downloads from SourceSourge, only 1.2b3 is available
Question. Where can I download 1.2b4? and/or what step did I miss?
I don't mean to be a pain but I am interested in getting xdoclet and maven to work but was having a hard time so I was excited to see a tutorial about it.
I tried modifying the version number to 1.2b2 (per XDoclet website) and I get the following error
BUILD FAILED
File...... file:/C:/Documents and Settings/Administrator/.maven/plugins/maven-xdoclet-plugin-1.2b2/
Element... deploymentdescriptor
Line...... 2467
Column.... 39
java.lang.NullPointerException -
RE: Error building the sample code[ Go to top ]
- Posted by: Andy Jefferson
- Posted on: December 02 2003 04:33 EST
- in response to Ken Yu
1.2b3 contains 1.2b4 jars (for some reason, better ask the XDoclet people :-). Get that and add to your repository -
RE: Error building the sample code[ Go to top ]
- Posted by: Ken Yu
- Posted on: December 02 2003 04:36 EST
- in response to Srikanth Shenoy
Andy/Srikanth,
Thanks for the insights and perhaps you can provide further insights.
1) Looking at the Maven plug-in link for the the XDoclet, it seems to show 1.2b2
2) Looking at the available downloads from SourceSourge, only 1.2b3 is available
ie neither shows seems to show 1.2b4 so I guess my real question was where can I download 1.2b4? and/or what step did I miss?
I don't mean to be a pain but I have worked with maven and xdoclet but had trouble integrating the two so I was excited to see a tutorial about it.
I tried modifying the version number to 1.2b2 (per XDoclet website) and I get the following error
BUILD FAILED
File...... file:/C:/Documents and Settings/Administrator/.maven/plugins/maven-xdoclet-plugin-1.2b2/
Element... deploymentdescriptor
Line...... 2467
Column.... 39
java.lang.NullPointerException -
My Fixes When Building[ Go to top ]
- Posted by: K T
- Posted on: February 12 2004 17:43 EST
- in response to Ken Yu
ear\project.xml
Remove lpdapjdk references (or change to something that exists on server e.g. ldapsdk V4.1)
Change:
<ear.appxml.ear.context-root>foobar-web</ear.appxml.ear.context-root>
To:
<ear.appxml.war.context-root>foobar-web</ear.appxml.war.context-root>
Foobar-Web/project.xml
Again, remove lpdapjdk references (or change to something that exists on server e.g. ldapsdk V4.1)
'Jakarta-struts' seems to just be struts now...
Changed:
<groupId>jakarta-struts</groupId>
<artifactId>jakarta-struts</artifactId>
<version>1.0.2</version>
To:
<groupId>struts</groupId>
<artifactId>struts</artifactId>
<version>1.1</version>
Override in properties file, not in plugin.
Foobar-Web/project.properties
maven.xdoclet.webdoclet.deploymentdescriptor.0=false
maven.xdoclet.webdoclet.jsptaglib.0.destDir=${maven.build.dir}/${pom.artifactId}/WEB-INF/tld
maven.xdoclet.webdoclet.jsptaglib.0.filename=taglib.tld
Download an install maven-xdoclet-plugin-1.2b4 manually (mine would only download maven-xdoclet-plugin-1.2 automatically and it didn't work).
Edit maven-xdoclet-plugin-1.2b4/plugin.jelly
Comment out:
<path id="webdoclet.java.compile.src.set" location="${maven.xdoclet.webdoclet.destDir}"/>
<maven:addPath id="maven.compile.src.set" refid="webdoclet.java.compile.src.set"/>
This was causing an attempted java compilation at an invalid source path. May be better way to solve - will email the xdoclet folks. -
My Fixes When Building[ Go to top ]
- Posted by: J Tigger
- Posted on: May 21 2004 16:07 EDT
- in response to K T
...{sniparoo}...
Yup..Yup. I was getting the same error. Actually, with Maven 1.0-RC3, xdoclet 1.2b4, I simply omitted the <code>maven.xdoclet.webdoclet.jsptaglib.0.destDir</code> setting and it worked. It DID create a separate directory in the <code>maven.build.dir</code> (aka "/target") called "xdoclet/webdoclet/WEB-INF/tlds/" and put the TLD there. However it makes it in the WAR, so no worries.
Override in properties file, not in plugin.
Foobar-Web/project.properties
maven.xdoclet.webdoclet.deploymentdescriptor.0=false
maven.xdoclet.webdoclet.jsptaglib.0.destDir=${maven.build.dir}/${pom.artifactId}/WEB-INF/tld
maven.xdoclet.webdoclet.jsptaglib.0.filename=taglib.tld
Download an install maven-xdoclet-plugin-1.2b4 manually (mine would only download maven-xdoclet-plugin-1.2 automatically and it didn't work).
Edit maven-xdoclet-plugin-1.2b4/plugin.jelly
Comment out:
<path id="webdoclet.java.compile.src.set" location="${maven.xdoclet.webdoclet.destDir}"/>
<maven:addPath id="maven.compile.src.set" refid="webdoclet.java.compile.src.set"/>
This was causing an attempted java compilation at an invalid source path. May be better way to solve - will email the xdoclet folks. -
Proxy-Settings[ Go to top ]
- Posted by: Jan Mat?rne
- Posted on: December 04 2003 09:24 EST
- in response to Ken Yu
When I tried to execute the first example I got a proxy error. Mavens FAQ gave the answer:
set maven.proxy.host and maven.proxy.port (e.g. in project.properties in the project directory) -
Problem running the maven java:compile[ Go to top ]
- Posted by: sreram kumar
- Posted on: December 04 2003 23:56 EST
- in response to Nate Borg
I am a first timer for MAVEN. I followed the steps provided by srikant in the article. I created a directory as follows:
C:/maventest/TestProject -
Problem running the maven java:compile[ Go to top ]
- Posted by: sreram kumar
- Posted on: December 05 2003 00:11 EST
- in response to sreram kumar
I am sorry. I pressed reply before I can complete the message. please bear with me.
I am a first timer of MAVEN. I am learning how to user maven for project and deployment management so that I can effectively deploy my projects.
I followed the steps provided by srikant in his article. I created a new directory as follows:
C:\MavenTest\TestProject.then these are the steps I followed:
1. I placed project.xml in the directory mentioned above. the xml file is as follows:
<?xml version="1.0"?>
<project>
<pomVersion>3</pomVersion>
<groupId>TestProject</groupId>
<id>sample-project</id>
<currentVersion>1.0</currentVersion>
<name>TestProject</name>
<!-- Project Management section goes here -->
<organization>
<name>MyOrganization</name>
<url/>
<logo/>
</organization>
<inceptionYear/>
<package>test.*</package>
<logo/>
<description>This is just a test description</description>
<shortDescription>this is short description</shortDescription>
<url/>
<issueTrackingUrl/>
<siteAddress/>
<siteDirectory>C:\MavenTest\TestProject</siteDirectory>
<distributionDirectory>C:\MavenTest\TestProject</distributionDirectory>
<repository>
<connection></connection>
<url></url>
</repository>
<mailingLists>
<mailingList>
<name>Dev List</name>
<subscribe/>
<unsubscribe/>
</mailingList>
</mailingLists>
<developers>
<developer>
<name>sreram kumar</name>
<id>sreram</id>
<email>myname.mydomain.com</email>
</developer>
</developers>
<!-- Project Dependency section goes here -->
<dependencies/>
<!-- Project Build section goes here -->
<build>
<nagEmailAddress>myname at mydomain dot com</nagEmailAddress>
<sourceDirectory>C:/MavenTest/TestProject</sourceDirectory>
<!--<unitTestSourceDirectory>${basedir}/test/java</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>-->
<resources/>
<!--<resource>
<directory>${basedir}/src/conf</directory>
<includes>
<include>*.properties</include>
</includes>
</resource>
</resources>-->
</build>
<!-- Project Reports section goes here -->
<reports>
<report>maven-changes-plugin</report>
<report>maven-jdepend-plugin</report>
<report>maven-checkstyle-plugin</report>
<report>maven-pmd-plugin</report>
<report>maven-junit-report-plugin</report>
<report>maven-clover-plugin</report>
<report>maven-changelog-plugin</report>
<report>maven-file-activity-plugin</report>
<report>maven-developer-activity-plugin</report>
<report>maven-file-activity-plugin</report>
<report>maven-license-plugin</report>
<report>maven-linkcheck-plugin</report>
<report>maven-jxr-plugin</report>
</reports>
</project>
2. I created a folder test.
3. I created a java file with package test.
4. I copied the java source file to test directory within the directory mentioned above.
5. I entered the directory cd C:\MavenTest\TestProject
6. I entered the following command
C:\MavenTest\TestProject>maven java:compile
I got the following error in the dos prompt. could srikant or somebody proficient in using MAVEN help me out.
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0-rc1-SNAPSHOT
Attempting to download commons-jelly-tags-antlr-20030211.143720.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-jelly/jars/commons-jelly-tags-antlr-20030211.143720.jar]: java.net.ConnectExcepti
on: Connection refused: connect
WARNING: Failed to download commons-jelly-tags-antlr-20030211.143720.jar.
Attempting to download commons-lang-1.0.1.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-1.0.1.jar]: java.net.ConnectException: Connection refused:
connect
WARNING: Failed to download commons-lang-1.0.1.jar.
Attempting to download antlr-2.7.2.jar.
Error retrieving artifact from [http://www.ibiblio.org/maven/antlr/jars/antlr-2.7.2.jar]: java.net.ConnectException: Connection refused: connect
WARNING: Failed to download antlr-2.7.2.jar.
The build cannot continue because of the following unsatisfied dependencies:
commons-jelly-tags-antlr-20030211.143720.jar (no download url specified)
commons-lang-1.0.1.jar (no download url specified)
antlr-2.7.2.jar (no download url specified)
Total time: 7 seconds
Finished at: Fri Dec 05 10:20:47 GMT+05:30 2003 -
Make Maven connect to our own central server instead of ibiblio[ Go to top ]
- Posted by: Vivek Venugopalan
- Posted on: December 05 2003 18:17 EST
- in response to sreram kumar
The problem that people seem to face is that Maven attempts to automatically connect to iBiblio to download certain artifacts whereas ideally I would like it to use a central server that is behind the coroporate firewall. How do we make Maven do that? -
thats easy too[ Go to top ]
- Posted by: Andy Jefferson
- Posted on: December 06 2003 03:30 EST
- in response to Vivek Venugopalan
Set the property
maven.repo.remote
to point to an alternative repository.
You can also set maven.repo.local to point to a local machine
Please ask your questions on the maven users mailing list and you will get a more detailed reply -
thats easy too - but how?[ Go to top ]
- Posted by: sreram kumar
- Posted on: December 08 2003 02:25 EST
- in response to Andy Jefferson
Set the property
>
> maven.repo.remote
>
> to point to an alternative repository.
>
> You can also set maven.repo.local to point to a local machine
>
> Please ask your questions on the maven users mailing list and you will get a more detailed reply
I tried setting the maven.repo.remote to point to my local ip address and same for maven.repo.local i.e.
maven.repo.local=<MyIPAddress>
maven.repo.remote=<MyIPAddress>
still it seems to connect to the http://www.ibiblio.org/maven/commons-jelly/jars. could you please tell me how to change this. probably give me some steps to change them. -
using a proxy[ Go to top ]
- Posted by: Klaas van der Ploeg
- Posted on: December 09 2003 13:28 EST
- in response to sreram kumar
If you are behind a proxy you can add the following properties to your build.properties:
maven.proxy.host = PROXY-HOST
maven.proxy.port = PROXY-PORT
maven.proxy.username = PROXY-USER
maven.proxy.password = PROXY-PASSWORD
That's it.
(When you have a pretty complete local repository, you can setup a local repository pretty easily with a simple website (like ibibilio.org/maven) and use a property:
maven.repo.remote = http://local-server/maven
Rgrds,
Klaas -
hi[ Go to top ]
- Posted by: Rama Sarma
- Posted on: February 03 2005 01:00 EST
- in response to Vivek Venugopalan
hi,
i think u have to check the network connections in the build.xml file of each to get it downloaded from the internet.... -
JEE maven skeleton project[ Go to top ]
- Posted by: Marc de Kwant
- Posted on: November 04 2009 06:42 EST
- in response to Rama Sarma
bit late, but see my JEE maven reference project deployable on glassfish http://www.wowww.nl/wordpress/2009/11/04/jee-5-getting-started-tutorial/ -
Problem running the maven java:compile[ Go to top ]
- Posted by: Dhanya Kairali
- Posted on: April 28 2004 05:48 EDT
- in response to sreram kumar
i got the same problem too and none of the solutions suggested in this page helped. Here is what I did.
Added a file build.properties at the same level as project.xml.
with the following contents
maven.repo.remote.enabled=true
maven.mode.online=true
maven.repo.remote=file:///D:/Dhanya/test/repository
I copied all the jars required to repository each in its own folder.
ie.
test\repository\ant\jars
test\repository\antlr\jars
test\repository\commons-jelly\jars
test\repository\commons-lang\jars
test\repository\commons-net\jars
The compilation worked -
Tutorial: Using Maven to build your J2EE Projects[ Go to top ]
- Posted by: jason williams
- Posted on: May 28 2004 04:11 EDT
- in response to Nate Borg
I'm new to maven and try to learn from the sameple. Yet when building sample proeject, it states error as follow. What may cause such problem? I've marked ldapjdk and put j2ee-1.3.1.jar and jakarta-struts-1.0.2.jar in appropreate folder in ~/.maven/ dir.
I appreciate any suggestions, sincerely.
========== ERROR ==========BEG
BUILD FAILED
File...... file:/C:/unzipped/Foobar-Travels/maven.xml
Element... maven:reactor
Line...... 12
Column.... 49
Unable to obtain goal [foobar-dist] -- file:/C:/unzipped/Foobar-Travels/Foobar-W
eb/maven.xml:9:45: <attainGoal> No goal [xdoclet:webdoclet]
Total time: 6 seconds
Finished at: Fri May 28 16:07:17 GMT+08:00 2004
========== ERROR ==========END -
Error No goal [xdoclet:XXXXX][ Go to top ]
- Posted by: diego ll
- Posted on: June 17 2004 08:17 EDT
- in response to jason williams
Hello, first of all, I want to apologize for my english.
Well, like others new to maven, I've got the following problem executing maven: "<attainGoal> No goal [xdoclet:webdoclet]" or "<attainGoal> No goal [xdoclet:ejbdoclet]"
When you install maven, you install a lot of plugins and dependencies but you don't install the plugin that supports xdoclet goal.
There are 2 principals sites where you can find a plugin http://maven.apache.org/reference/plugins/index.html and http://www.ibiblio.org/maven
After you have found the plugin, you have to install it. How? it's very easy, in this case, we need maven-xdoclet-plugin (artifactId) which belongs to xdoclet group (groupid)
maven -DartifactId=maven-xdoclet-plugin -DgroupId=xdoclet -Dversion=1.2 plugin:download -
Opportunity: Maven / Nexus Implementation / customization[ Go to top ]
- Posted by: Oliver Eaton
- Posted on: August 22 2010 05:24 EDT
- in response to Nate Borg
Practice Area Lead - Continuous Build Integration Tools
We are currently recruiting for a Practice Area Lead who has experience in open-source Continuous Build Integration Tools, such as Maven, Hudson, Nexus, etc. One of the upcoming projects this resource will support, is a Maven and Nexus implementation/conversion we are performing for a client in NJ. This project could be done on a consulting basis, or as a FTE opportunity to join our practice. Please let me know if you are interested in a career opportunity with CMI (or converting to Maven/Hudson in a consulting capacity at our client). There is a lot more information available at our website http://www.cmi.com.
Please contact:
Oliver Eaton
Recruiting Manager CMI
732-450-1100 ext. 114
oliver dot eaton at cmi dot com