Sometime it works

Words are not enough

All | Java

20040511 Tuesday May 11, 2004

A Struts project maven+eclipse oriented My steps to create a new Struts project maven+eclipse oriented

First I try that Maven is working:

C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts>maven -v
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc2

C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts>
Using the plugin genapp with the template struts-jstl I create the project structure:

C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts>maven
 -Dmaven.genapp.param=mavenstruts,mavenstruts,net.vitale.filippo.mavenstruts,fillo genapp
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc2

Enter a project template to use: [default]
struts-jstl
build:start:

genapp:
    [copy] Copying 1 file to C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts\src\java
    [copy] Copying 1 file to C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts\src\test
    [copy] Copying 2 files to C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts\src\test-cactus
    [copy] Copying 6 files to C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts
    [copy] Copying 5 files to C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts
BUILD SUCCESSFUL
Total time: 20 seconds
Finished at: Tue May 11 10:09:11 GMT+01:00 2004

C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts>
I found 2 bugs (just notified to the issue tracking) here the workaround:

modify in project.xml:

      strutstest
      2.1.0

in:

      strutstestcase
      2.1-1.1-2.3

and replace these tag:

@ID@
@ID@
@NAME@
@PACKAGE@
After that invoke the eclipse plugin:

C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts>maven eclipse
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc2

eclipse:generate-project:
    [echo] Creating C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts/.project ...

eclipse:generate-classpath:
    [echo] Creating C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts/.classpath ...
    [echo] Contains JUnit tests
    [echo] Setting compile of src\test to target\test-classes
Plugin 'cactus-maven' in project '@NAME@' is not available
    [echo] Setting default output directory to target\classes

eclipse:
    [echo] Now refresh your project in Eclipse (right click on the project and select "Refresh")
BUILD SUCCESSFUL
Total time: 4 seconds
Finished at: Tue May 11 10:23:36 GMT+01:00 2004

C:\Eclipse\eclipse-3.0M8\workspace\MavenStruts>
Now in Eclipse: Import->"Existing project into Workspace" and browse to the right dir.

Setted also the variable "MAVEN_REPO" with "C:/Documents and Settings/Filippo/.maven/repository"


--Filippo

P.S. I didn't investigate yet about the message
"Tag library requested that is not present: 'cactus' in plugin:
'maven-eclipse-plugin-1.6' build:start:"
(2004-05-11 12:39:45.0) Permalink Comments [2]

Comments:

The message about the cactus taglib is just there because the eclipse plugin knows how to work with the cactus plugin, but it's not installed as part of the maven default installation.

Posted by dion gillard on May 11, 2004 at 09:56 PM PDT #

maven plugin:download -DartifactId=cactus-maven -DgroupId=cactus -Dversion=1.6.1

Posted by Filippo Vitale on May 28, 2004 at 03:29 AM PDT #

Post a Comment:

Comments are closed for this entry.

Calendar

« December 2009
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today

RSS Feeds

XML
All
/Java

Search

Links


Navigation



Referers

Today's Page Hits: 9