Actually even simpler - there is a newer version. Just run:
mvn archetype:create -DarchetypeGroupId=info.magnolia \
-DarchetypeArtifactId=maven-archetype-magnolia-module \
-DarchetypeVersion=1.0.1-SNAPSHOT \
-DgroupId=com.foo.bar \
-DartifactId=my-module \
-DremoteRepositories=http://svn.magnolia-cms.com/snapshots
it still sets Magnolia reference to 3.5.2 (so you want to change that in
the generated pom), but at least code compiles straightaway.
Cheers,
Jan
On Tue, 2009-11-24 at 08:18 +0100, Jan Haderka wrote:
> Hi Abdul,
> the artifact is a bit outdated. To make build run, you need to replace
> repo link with the valid repo:
>
> mvn archetype:create -DarchetypeGroupId=info.magnolia \
> -DarchetypeArtifactId=maven-archetype-magnolia-module \
> -DarchetypeVersion=1.0.0-SNAPSHOT \
> -DgroupId=com.foo.bar \
> -DartifactId=my-module \
> -DremoteRepositories=http://svn.magnolia-cms.com/snapshots
>
> however the module it will generate will be configured to run against
> Magnolia 3.0, so you need to edit generated pom to change this to
> Magnolia 4.1.1, also need to update the repo reference to
> http://svn.magnolia-cms.com/m2
>
> After that you need to edit the generated MyModule.java and remove all
> references to AbstractModule and its exceptions as this thing doesn't
> exist anymore. In 4.x module class do not need to extend anything (at
> most you might want to have your module class to implement
> ModuleLifecycle interface if you want to have control over restart of
> the module).
>
> HTH,
> Jan
>
>
> On Mon, 2009-11-23 at 21:22 +0100, Abdul Nabi wrote:
> > Hello All,
> >
> > Hopefully a simple/stupid/newbie question (but also a good first start
> > at using the user list)...
> >
> > I’m ready to create my module and have tried the command from the
> > “Module QuickStart” Wiki section -
> > mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create
> > -DarchetypeGroupId=info.magnolia \
> > -DarchetypeArtifactId=maven-archetype-magnolia-module \
> > -DarchetypeVersion=1.0 \
> > -DremoteRepositories=http://maven.magnolia.info/m2 \
> > -DgroupId=com.foo.bar \
> > -DartifactId=my-module
> >
> > And from the excerise guide -
> > mvn archetype:create -DarchetypeGroupId=info.magnolia \
> > -DarchetypeArtifactId=maven-archetype-magnolia-module \
> > -DarchetypeVersion=1.0.0-SNAPSHOT \
> > -DgroupId=com.foo.bar \
> > -DartifactId=my-module \
> > -DremoteRepositories=http://svn.magnolia.info/maven/snapshots
> >
> > And in both cases get -
> > [INFO] Scanning for projects...
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD FAILURE
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Invalid task 'DarchetypeVersion=1.0.0-SNAPSHOT': you must
> > specify a valid lifecycle phase, or a goal in the format plugin:goal
> > or pluginGroupId:pluginArtifactId:pluginVersion:goal
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] For more information, run Maven with the -e switch
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Total time: < 1 second
> > [INFO] Finished at: Mon Nov 23 20:11:27 GMT+00:01 2009
> > [INFO] Final Memory: 1M/4M
> > [INFO]
> > ------------------------------------------------------------------------
> >
> > I’ve tried some variations, but to no avail... Before doing a deep
> > dive and getting three degrees away from my original goal just wanted
> > to check if folks had a quick pointer on this.
> >
> > Note – Using Maven 2.0.6 and Magnolia EE 4.1.1
> >
> > Thanks!
> >
> > Mit freundlichen Grüssen,
> > Kind regards
> >
> > Abdul Nabi
> > Technical Architect
> >
> > frog design europe gmbh
> > Kalkofenstr. 51
> > 71083 Herrenberg
> >
> >
> >
> > ______________________________________________________________________
> > ----------------------------------------------------------------
> > For list details see
> > http://www.magnolia-cms.com/home/community/mailing-lists.html
> > To unsubscribe, E-mail to: <[email protected]>
> > ----------------------------------------------------------------
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------