struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David F. Newman" <...@exchange.mit.edu>
Subject Maven archetype struts2-archetype-blank
Date Mon, 21 Nov 2011 23:11:19 GMT
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
<version>1.0-SNAPSHOT</version>
<properties>
<struts2.version>2.2.3</struts2.version>
</properties>

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

-Dave
dfn@mit.edu


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


Mime
View raw message