ArchetypeCreateFromProject

HomePage | RecentChanges | Preferences

Difference (from prior major revision) (no other diffs)

Changed: 1,96c1
* Tried to run mvn archetype:create-from-project from an empty directory; it wants a Maven Project with a pom.
* cd to the struts2 blank app (which I'm trying to create an archetype from) and now it wants src/main/archetype/archetype.properties
* what goes in that? No idea. Follow the source code: CreateArchetypeFromProjectMojo? -> ArchetypeCreator? -> DefaultArchetypeCreator?
* DefaultArchetypeCreator?:270 String basePackage = properties.getProperty( "package" );
* Added src/main/archetype/archetype.properties with "package=example" (I think it's a directory path, not a package name with dots.)
* mvn archetype:create-from-project seems to have worked.

What did we get?

~/svn/struts/current/struts2/apps/blank
$ ll target
total 52
drwxr-xr-x+ 4 wsmoak None 0 Dec 24 08:48 .
drwxr-xr-x+ 5 wsmoak None 0 Dec 24 08:47 ..
drwxr-xr-x+ 3 wsmoak None 0 Dec 24 08:48 archetype-project
-rwxr-xr-x 1 wsmoak None 42033 Dec 24 08:48 archetype.jar
-rwxr-xr-x 1 wsmoak None 1342 Dec 24 08:48 archetype.xml
drwxr-xr-x+ 3 wsmoak None 0 Dec 24 08:47 filtered-project
-rwxr-xr-x 1 wsmoak None 1667 Dec 24 08:48 pom.xml


* The 'archetype.jar' seems to be the thing.
* It includes the .svn directories (need to run it from a svn export until that's fixed)


svn export https://svn.apache.org/repos/asf/struts/struts2/trunk/apps/blank
cd blank
mvn archetype:create-from-project


The layout of the 'archetype' jar doesn't seem right... the source code is duplicated under 'src' and 'archetype-resources', and none of the 'src/main/webapp' files show up:

$ jar -tf archetype.jar | sort
META-INF/
META-INF/MANIFEST.MF
META-INF/archetype.xml
META-INF/maven/
META-INF/maven/archetype.xml
archetype-resources/
archetype-resources/pom.xml
archetype-resources/src/
archetype-resources/src/main/
archetype-resources/src/main/java/
archetype-resources/src/main/java/ExampleSupport.java
archetype-resources/src/main/java/HelloWorld.java
archetype-resources/src/main/java/Login.java
archetype-resources/src/main/java/build.bat
archetype-resources/src/test/
archetype-resources/src/test/java/
archetype-resources/src/test/java/ConfigTest.java
archetype-resources/src/test/java/HelloWorldTest.java
archetype-resources/src/test/java/LoginTest.java
pom.xml
src/
src/main/
src/main/java/
src/main/java/ExampleSupport.java
src/main/java/HelloWorld.java
src/main/java/Login.java
src/main/java/build.bat
src/test/
src/test/java/
src/test/java/ConfigTest.java
src/test/java/HelloWorldTest.java
src/test/java/LoginTest.java


It should look more like this:


$ jar -tf struts-archetype-blank-1.3.5-SNAPSHOT.jar | sort
META-INF/
META-INF/MANIFEST.MF
META-INF/archetype.xml
META-INF/maven/
META-INF/maven/org.apache.struts/
META-INF/maven/org.apache.struts/struts-archetype-blank/
META-INF/maven/org.apache.struts/struts-archetype-blank/pom.properties
META-INF/maven/org.apache.struts/struts-archetype-blank/pom.xml
archetype-resources/
archetype-resources/pom.xml
archetype-resources/src/
archetype-resources/src/main/
archetype-resources/src/main/resources/
archetype-resources/src/main/resources/MessageResources.properties
archetype-resources/src/main/webapp/
archetype-resources/src/main/webapp/WEB-INF/
archetype-resources/src/main/webapp/WEB-INF/struts-config.xml
archetype-resources/src/main/webapp/WEB-INF/validation.xml
archetype-resources/src/main/webapp/WEB-INF/web.xml
archetype-resources/src/main/webapp/index.jsp
archetype-resources/src/main/webapp/pages/
archetype-resources/src/main/webapp/pages/Welcome.jsp


2006-12-24 Conclusion: Not done yet, especially not for webapps.
https://github.com/wendysmoak/wiki/wiki/Archetype-Create-From-Project

https://github.com/wendysmoak/wiki/wiki/Archetype-Create-From-Project

HomePage | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited December 21, 2019 11:23 am by 78-93-98-198.dsl.wavetel.us (diff)
Search: