Re: Maven archetype struts2-archetype-blank

2011-11-23 Thread Łukasz Lenart
2011/11/22 David F. Newman d...@exchange.mit.edu:
 Interesting.  That worked.  I had tried 2.2.3 and 2.2.3.1 with the same
 results.  I had not tried going back to earlier versions.  I'll stick with
 that version for now.

Ok, I solved that problem, but have one more. I would like to create
archetype-catalog.xml file during building a site, but I cannot figure
out how to filter archetype-catalog.xml to replace ${project.version}.
Any idea ?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Maven archetype struts2-archetype-blank

2011-11-23 Thread Jeff Black
Lukasz -- I'm not a Maven guru but I found this blog post that may be helpful:

http://intellectualcramps.wordpress.com/2011/04/15/maven-archetype-creation-tips/

Best,

jb






 From: Łukasz Lenart lukasz.len...@googlemail.com
To: Struts Users Mailing List user@struts.apache.org 
Sent: Wednesday, November 23, 2011 4:59 AM
Subject: Re: Maven archetype struts2-archetype-blank
 
2011/11/22 David F. Newman d...@exchange.mit.edu:
 Interesting.  That worked.  I had tried 2.2.3 and 2.2.3.1 with the same
 results.  I had not tried going back to earlier versions.  I'll stick with
 that version for now.

Ok, I solved that problem, but have one more. I would like to create
archetype-catalog.xml file during building a site, but I cannot figure
out how to filter archetype-catalog.xml to replace ${project.version}.
Any idea ?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Re: Maven archetype struts2-archetype-blank

2011-11-22 Thread David F. Newman
Interesting.  That worked.  I had tried 2.2.3 and 2.2.3.1 with the same 
results.  I had not tried going back to earlier versions.  I'll stick 
with that version for now.


Thank you
-Dave

On 11/21/11 7:03 PM, Dave Newton wrote:

Appears to be an issue in 2.2.3; normally you'd want to explicitly specify
-DarchetypeVersion (or at least I generally do). For 2.2.1 it works, for
2.2.3 the property isn't filled in.

Dave

On Mon, Nov 21, 2011 at 6:11 PM, David F. Newmand...@exchange.mit.eduwrote:


mvn archetype:generate \
-DarchetypeGroupId=org.apache.**struts \
-DarchetypeArtifactId=struts2-**archetype-blank




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Maven archetype struts2-archetype-blank

2011-11-21 Thread David F. Newman

Hi there,
So I've been trying to use the struts2-archetype-blank maven archetype 
to create a new project and it seems to generate a pom file that doesn't 
work out of the box.


I run:

$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-blank

Define value for property 'groupId': : edu.mit.dfn.testapp
Define value for property 'artifactId': : testapp
Define value for property 'version':  1.0-SNAPSHOT: :
Define value for property 'package':  edu.mit.dfn.testapp: :
Confirm properties configuration:
groupId: edu.mit.dfn.testapp
artifactId: testapp
version: 1.0-SNAPSHOT
package: edu.mit.dfn.testapp
[INFO] Using following parameters for creating project from Archetype: 
struts2-archetype-blank:2.2.3


However trying to compile with mvn compile yields the following errors:

[ERROR]   The project edu.mit.dfn.testapp:testapp:${project.version} 
(/home/dfn/src/testapp/pom.xml) has 9 errors
[ERROR] Resolving expression: '${project.version}': Detected the 
following recursive expression cycle in 'project.version': [version] - 
[Help 2]

...
[ERROR] 'dependencies.dependency.version' for 
org.apache.struts:struts2-core:jar must be a valid version but is 
'${struts2.version}'. @ line 20, column 22
[ERROR] 'dependencies.dependency.version' for 
org.apache.struts:struts2-config-browser-plugin:jar must be a valid 
version but is '${struts2.version}'. @ line 26, column 22
[ERROR] 'dependencies.dependency.version' for 
org.apache.struts:struts2-junit-plugin:jar must be a valid version but 
is '${struts2.version}'. @ line 32, column 22


Looking at the pom.xml file I see

version${project.version}/version
properties
struts2.version${project.version}/struts2.version
/properties

So I change it to
version1.0-SNAPSHOT/version
properties
struts2.version2.2.3/struts2.version
/properties

And now everything works.  Has anyone else seen this and am I just doing 
something wrong?


-Dave
d...@mit.edu


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Maven archetype struts2-archetype-blank

2011-11-21 Thread Dave Newton
Appears to be an issue in 2.2.3; normally you'd want to explicitly specify
-DarchetypeVersion (or at least I generally do). For 2.2.1 it works, for
2.2.3 the property isn't filled in.

Dave

On Mon, Nov 21, 2011 at 6:11 PM, David F. Newman d...@exchange.mit.eduwrote:

 mvn archetype:generate \
 -DarchetypeGroupId=org.apache.**struts \
 -DarchetypeArtifactId=struts2-**archetype-blank



Re: Maven archetype struts2-archetype-blank

2011-11-21 Thread Łukasz Lenart
Could you register an issue about that ?

https://issues.apache.org/jira/browse/WW


Thanks in advance
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/


2011/11/22 David F. Newman d...@exchange.mit.edu:
 Hi there,
 So I've been trying to use the struts2-archetype-blank maven archetype to
 create a new project and it seems to generate a pom file that doesn't work
 out of the box.

 I run:

 $ mvn archetype:generate \
 -DarchetypeGroupId=org.apache.struts \
 -DarchetypeArtifactId=struts2-archetype-blank

 Define value for property 'groupId': : edu.mit.dfn.testapp
 Define value for property 'artifactId': : testapp
 Define value for property 'version':  1.0-SNAPSHOT: :
 Define value for property 'package':  edu.mit.dfn.testapp: :
 Confirm properties configuration:
 groupId: edu.mit.dfn.testapp
 artifactId: testapp
 version: 1.0-SNAPSHOT
 package: edu.mit.dfn.testapp
 [INFO] Using following parameters for creating project from Archetype:
 struts2-archetype-blank:2.2.3

 However trying to compile with mvn compile yields the following errors:

 [ERROR]   The project edu.mit.dfn.testapp:testapp:${project.version}
 (/home/dfn/src/testapp/pom.xml) has 9 errors
 [ERROR]     Resolving expression: '${project.version}': Detected the
 following recursive expression cycle in 'project.version': [version] -
 [Help 2]
 ...
 [ERROR]     'dependencies.dependency.version' for
 org.apache.struts:struts2-core:jar must be a valid version but is
 '${struts2.version}'. @ line 20, column 22
 [ERROR]     'dependencies.dependency.version' for
 org.apache.struts:struts2-config-browser-plugin:jar must be a valid version
 but is '${struts2.version}'. @ line 26, column 22
 [ERROR]     'dependencies.dependency.version' for
 org.apache.struts:struts2-junit-plugin:jar must be a valid version but is
 '${struts2.version}'. @ line 32, column 22

 Looking at the pom.xml file I see

 version${project.version}/version
 properties
 struts2.version${project.version}/struts2.version
 /properties

 So I change it to
 version1.0-SNAPSHOT/version
 properties
 struts2.version2.2.3/struts2.version
 /properties

 And now everything works.  Has anyone else seen this and am I just doing
 something wrong?

 -Dave
 d...@mit.edu


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



jsp's outside WEB-INF in maven archetype?

2011-05-10 Thread Miguel
The other day I tried out a simple maven archetype (either
struts2-archetype-starter or -convention, I don't recall). Anyway, it's
one that comes configured with sitemesh.

What stroke me as odd was that the sample jsp's were in the path
src/webapp/jsp, and not inside WEB-INF.

Isn't it preferable to store the jsp's inside WEB-INF (to reduce their
visibility)? If so, shouldn't the archetypes be changed in accordance? 

Regards,

Miguel Almeida


Maven Archetype

2008-09-18 Thread Yanis Kekatos
HI all,
I am trying to run the Struts Maven Archetype following the
instructions of the page
http://struts.apache.org/2.1.2/docs/ready-set-go.html but I get the
following error. Any help on this?

C:\dev\projectsmvn archetype:create -DgroupId=tutorial
-DartifactId=tutorial -DarchetypeGroupId=org.apache.struts
-DarchetypeArtifactId=struts2-archetype-starter
-DarchetypeVersion=2.0.9-SNAPSHOT
-DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] 
[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:create] (aggregator-style)
[INFO] 
[INFO] Setting property: classpath.resource.loader.class =
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on = 'false'.
[INFO] Setting property: resource.loader = 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound = 'false'.
[INFO] [archetype:create]
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO] Defaulting package to group ID: tutorial
[INFO] We are using command line specified remote repositories:
http://people.apache.org/repo/m2-snapshot-repository
[INFO] snapshot
org.apache.struts:struts2-archetype-starter:2.0.9-SNAPSHOT: checking
for updates from id0
Downloading: 
http://people.apache.org/repo/m2-snapshot-repository/org/apache/struts/struts2-archetype-starter/2.0.9-SNAPSHOT/struts2-archetype-starter-2.0.9-SNAPSHOT.jar
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Error creating from archetype

Embedded error: OldArchetype does not exist.
Unable to download the artifact from any repository
[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time: 4 seconds
[INFO] Finished at: Thu Sep 18 13:45:03 EEST 2008
[INFO] Final Memory: 8M/15M
[INFO] 

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



Re: Maven Archetype

2008-09-18 Thread Lukasz Lenart
All the SNAPSHOT archetypes were removed from Maven repo, you can try
add one of this option below

-DarchetypeRepository=http://people.apache.org/repo/m2-snapshot-repository

-DarchetypeCatalog=http://www.lenart.org.pl/maven


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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



Re: Maven Archetype

2008-09-18 Thread Yanis Kekatos
Thanks Lukasz,
I've tried each of the options you refer but the error remains.

On Thu, Sep 18, 2008 at 1:58 PM, Lukasz Lenart
[EMAIL PROTECTED] wrote:
 All the SNAPSHOT archetypes were removed from Maven repo, you can try
 add one of this option below

 -DarchetypeRepository=http://people.apache.org/repo/m2-snapshot-repository

 -DarchetypeCatalog=http://www.lenart.org.pl/maven


 Regards
 --
 Lukasz
 http://www.lenart.org.pl/

 -
 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: Maven Archetype

2008-09-18 Thread Lukasz Lenart
But try only
mvn archetype:generate

with one of previous option



Regards
-- 
Lukasz
http://www.lenart.org.pl/

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



Re: Maven Archetype

2008-09-18 Thread Jeromy Evans

Yanis Kekatos wrote:

HI all,
I am trying to run the Struts Maven Archetype following the
instructions of the page
http://struts.apache.org/2.1.2/docs/ready-set-go.html but I get the
following error. Any help on this?

  


The starter archetype for 2.0.11.2 is here:

http://people.apache.org/builds/struts/struts-archetypes/2.0.11.2/starter-m2-staging-repository

awaiting formal release to the maven repository.

Something like this should work:
$mvn archetype:create -DgroupId=be.realdolmen.struts2 -DartifactId=tutorial
   \ -DarchetypeGroupId=org.apache.struts
   \ -DarchetypeArtifactId=struts2-archetype-starter
   \ -DarchetypeVersion=2.0.11.2
   
\-DremoteRepositories=http://people.apache.org/builds/struts/struts-archetypes/2.0.11.2/starter-m2-staging-repository


There's no 2.1.x archetype available except those that Lucasz has released 
himself.



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



Re: Maven Archetype

2008-09-18 Thread Yanis Kekatos
Thanks Jeromy.
It works.

On Thu, Sep 18, 2008 at 2:29 PM, Jeromy Evans
[EMAIL PROTECTED] wrote:
 Yanis Kekatos wrote:

 HI all,
 I am trying to run the Struts Maven Archetype following the
 instructions of the page
 http://struts.apache.org/2.1.2/docs/ready-set-go.html but I get the
 following error. Any help on this?



 The starter archetype for 2.0.11.2 is here:

 http://people.apache.org/builds/struts/struts-archetypes/2.0.11.2/starter-m2-staging-repository

 awaiting formal release to the maven repository.

 Something like this should work:
 $mvn archetype:create -DgroupId=be.realdolmen.struts2 -DartifactId=tutorial
   \ -DarchetypeGroupId=org.apache.struts
   \ -DarchetypeArtifactId=struts2-archetype-starter
   \ -DarchetypeVersion=2.0.11.2

 \-DremoteRepositories=http://people.apache.org/builds/struts/struts-archetypes/2.0.11.2/starter-m2-staging-repository


 There's no 2.1.x archetype available except those that Lucasz has released
 himself.



 -
 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: Maven Archetype

2008-09-18 Thread Wendy Smoak
On Thu, Sep 18, 2008 at 4:29 AM, Jeromy Evans
[EMAIL PROTECTED] wrote:

 The starter archetype for 2.0.11.2 is ...  awaiting formal release to the 
 maven repository.

It's done... 
http://repo1.maven.org/maven2/org/apache/struts/struts2-archetype-starter/2.0.11.2/

(And the staging repo has been removed.)

-- 
Wendy

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



Struts 2 Maven Archetype problem

2007-04-14 Thread Andreas Røsdal
I used the Maven Archetype to create a new web application for Struts 2, 
as described here:  http://struts.apache.org/2.x/docs/ready-set-go.html


I ran:
mvn archetype:create -DgroupId=tutorial \
   -DartifactId=tutorial \
   -DarchetypeGroupId=org.apache.struts \
   -DarchetypeArtifactId=struts2-archetype-starter \
   -DarchetypeVersion=2.0.5-SNAPSHOT \
   
-DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository

When deploying this application using Resin, I get a known bug,
which is described here:
http://opensource.atlassian.com/projects/spring/browse/SPR-2967

I have been able to resolve the problem, by upgrading to spring-framework 
version 1.2.9.  However, I did this by manually compiling and installing 
the jar files.


How do I change the Maven build scripts (eg. the generated pom.xml), to 
download and use spring version 1.2.9, instead of the old version which 
is installed by default using the above mvn archetype?


(This bug is affecting all users who setup Spring 2 using the above mvn 
archetype, so it would be a good idea if this archetype used the latest 
version of spring by default).


Thanks in advance.

 - Andreas

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



Re: [s2] maven archetype + jasper plug-in

2006-11-21 Thread David Durham

David Durham wrote:

Now my log4j.xml (relevant entries only):

  category name=org.apache additivity=false
  level value=debug/
  appender-ref ref=console/
  /category

  category name=com.opensymphony additivity=false
  level value=debug/
  appender-ref ref=console/
  /category


But I don't get DEBUG messages from struts in catalina.out.  I only see 
INFO messages.  I do see DEBUG messages from my action classes.  I 
haven't checked struts 2 source code to see if there are any DEBUG 
statements (just assuming that there are).  So, anyone working with 
struts 2 and jasper?  My biggest problem is not seeing log messages from 
these classes.  Thanks for any help,


Meh, classic mvn clean + mvn install vs. merely mvn install, problem.  I had a 
stale log4j.xml in my target.  I'm seeing a lot of debug messages at this 
point.  Anyway, still have the jasper issue.  Perhaps someone is working with 
struts2-jasper-plugin and can spot something from my previous e-mail.  
Otherwise, I'll indicate what I find out, as it may be useful for updating that 
tutorial.



-Dave


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



[s2] maven archetype + jasper plug-in

2006-11-21 Thread David Durham

A few questions all bundled into one e-mail.  First, I'm attempting to use the 
jasper plug-in for struts 2, and have a maven archetype as my starting point.  
I uncommented these lines in my pom.xml:

  dependency
  groupIdjasperreports/groupId
  artifactIdjasperreports/artifactId
  version1.2.1/version
  /dependency

I then followed this guide (I don't know of any difference between what I've 
done and what's in this tutorial):

 http://struts.apache.org/2.x/docs/jasperreports-tutorial.html

I get the following stack trace:

Error building results for action myJasperTest in namespace  - action - 
file:/home/ddurham/IdeaProjects/profileReports/target/profileReports/WEB-INF/classes/struts.xml:33:74
   
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:173)
   
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:248)
   
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:723)
   
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:121)
   
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:97)
   
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:46)
   
org.apache.struts2.dispatcher.mapper.DefaultActionMapper.getMapping(DefaultActionMapper.java:238)
   
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:227)
   
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
   
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
   
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:118)

This indicates there's a problem in this section of struts.xml:

  action name=myJasperTest class=com.vailsys.dba.JasperAction
  result name=success type=jasper
  param name=location/jasper/compiled_template.jasper/param
  param name=dataSourcemyList/param
  param name=formatPDF/param
  /result
  /action

I checked that the struts2 jasper reports plugin and jasper reports jars are in my 
WEB-INF/lib directory, just in case the root cause is no class definition 
found.  Speaking of root cause, I can't find it.  Here's my logging configuration.  
First the pom.xml modification:

  dependency
  groupIdlog4j/groupId
  artifactIdlog4j/artifactId
  version1.2.13/version
  /dependency

Now my log4j.xml (relevant entries only):

  category name=org.apache additivity=false
  level value=debug/
  appender-ref ref=console/
  /category

  category name=com.opensymphony additivity=false
  level value=debug/
  appender-ref ref=console/
  /category


But I don't get DEBUG messages from struts in catalina.out.  I only see INFO 
messages.  I do see DEBUG messages from my action classes.  I haven't checked 
struts 2 source code to see if there are any DEBUG statements (just assuming 
that there are).  So, anyone working with struts 2 and jasper?  My biggest 
problem is not seeing log messages from these classes.  Thanks for any help,

Dave

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