• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Maven, woapplication-archetype not found when using the local catalog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maven, woapplication-archetype not found when using the local catalog


  • Subject: Re: Maven, woapplication-archetype not found when using the local catalog
  • From: William Hatch <email@hidden>
  • Date: Sun, 07 Dec 2008 19:42:42 -0500


On Dec 7, 2008, at 4:38 PM, Lachlan Deck wrote:

Hi Will,

On 07/12/2008, at 5:46 AM, William Hatch wrote:

More playing around with getting this to fly; using latest WOLips, Eclipse 3.4 and I hope (not sure which version of WO you get when installing with maven) WO 5.4.3.

You can check on the versions installed by: $ ls ~/.m2/repository/com/webobjects/JavaWebObjects

I've got: 5.4.2 _SNAPSHOT 5.4.3 5.4.3_SNAPSHOT and six other maven-metadata*.xml files


You'll see a list of folders (one per version) for that framework each of which contain the relevant jar etc.

I've been able to successfully install the WO snapshots

Do you mean the nightlies from Apple? How did you install?
Just be careful if you copied the apple nightlies over the top of your current repo install of WO as it'll bork your catalog xml file (in the above dir for example).

I just ran the wobootstrap:install mojo as documented here: http://wiki.objectstyle.org/confluence/display/WOL/maven-wobootstrap-plugin I should have been more clear; I don't think this actually gives the nightly snapshots from apple, but rather installs your local libraries into the local repos, correct? Thanks for pointing out the distinction.


and build and install wonder into my local repository using maven, but when trying to use the woapplication-archetype as defined in my local archetype-catalog in ~/.m2/ to create a new project by doing the following:
mvn -e archetype:generate -DarchetypeCatalog=local
and then selecting "1" when presented with this prompt:
Choose archetype: 1: local -> woapplication-archetype (WebObjects Application Archetype) 2: local -> woframework-archetype (WebObjects Framework Archetype) Choose a number: (1/2): 1
as documented on the wiki here: http://wiki.objectstyle.org/confluence/display/WOL/woapplication-archetype
I"m getting: org.apache.maven.BuildFailureException: The desired archetype does not exist (org.objectstyle.woproject.maven2:woapplication-archetype:2.0.16)
it appears to be trying to grab this from here:
Downloading: http://repo1.maven.org/maven2/org/objectstyle/woproject/maven2/woapplication-archetype/2.0.16/woapplication-archetype-2.0.16.jar and it's not there.


Here's my archetype-catalog.xml:
<?xml version="1.0" encoding="UTF-8"?><archetype-catalog>
<archetypes>
  <archetype>
    <groupId>org.objectstyle.woproject.maven2</groupId>
    <artifactId>woapplication-archetype</artifactId>
    <version>2.0.16</version>
    <description>WebObjects Application Archetype</description>
  </archetype>
  <archetype>
    <groupId>org.objectstyle.woproject.maven2</groupId>
    <artifactId>woframework-archetype</artifactId>
    <version>2.0.16</version>
    <description>WebObjects Framework Archetype</description>
  </archetype>
</archetypes>
</archetype-catalog>

Do I need to define a different repository someplace, use a different version number, or... ?

You've got the settings.xml file in ~/.m2 right? i.e., the one found here:
http://wiki.objectstyle.org/confluence/display/WOL/Quick+Start

Yup, exactly as is appears with the downloaded file, which as an aside, does not download properly if you simply click the link; I had to explicitly "Save downloaded file as..." to get it to work; here's what mine looks like:


<settings xmlns="http://maven.apache.org/POM/4.0.0";
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd";>
	<pluginGroups>
		<pluginGroup>org.objectstyle.woproject.maven2</pluginGroup>
	</pluginGroups>

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<pluginRepositories>
				<pluginRepository>
					<id>mdimension.releases</id>
					<name>MDimension Releases Repository</name>
					<url>
						http://webobjects.mdimension.com/maven2/releases
					</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
				<pluginRepository>
					<id>mdimension.snapshots</id>
					<name>MDimension Snapshots Repository</name>
					<url>
						http://webobjects.mdimension.com/maven2/snapshots
					</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>
</settings>


I'm not able to wrap my head around the answer from reading the book or googling, so any help is appreciated. Any best practices about conventional places to define repositories for this sort of artifact would be helpful.

See the Quick+Start guide.

Yeah, I think the problem is either the archetype that's described in my archetype-catalog.xml file is not available where maven is looking, which would seems like it should be at the mdimension repos, OR, somehow, the repository location is not properly associated with the described archetype. And that's what I'm really trying to figure out ultimately. Well, that and how to solve it;-)


Should it go in my local settings.xml,

yes. Any plugins that are not in maven's main repository that you depend on for creating projects you should define the repositories for in your local settings.xml file in ~/.m2. This will additionally assist maven when it comes to building your project.

OK, so revisiting the original question, the problem I seem to be having is that maven is trying to locate the archetype from the central maven repository such that when I do this:


mvn -e archetype:generate -DarchetypeCatalog=local
and then selecting "1" when presented with this prompt:
Choose archetype: 1: local -> woapplication-archetype (WebObjects Application Archetype) 2: local -> woframework-archetype (WebObjects Framework Archetype) Choose a number: (1/2): 1

it ultimately fails with this:

org.apache.maven.BuildFailureException: The desired archetype does not exist (org.objectstyle.woproject.maven2:woapplication-archetype: 2.0.16)
it appears to be trying to grab this from here:
Downloading: http://repo1.maven.org/maven2/org/objectstyle/woproject/maven2/woapplication-archetype/2.0.16/woapplication-archetype-2.0.16.jar and it's not there.

It seems to me it's trying to add the actual archetype to the local repository, and not being able to find it as it's looking in the wrong place. Am I completely wrong here?


Thanks Lachlan, I'm sure I'm getting pretty close, just need to clear up these last few details.


with regards,
--

Lachlan Deck


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Maven, woapplication-archetype not found when using the local catalog
      • From: Lachlan Deck <email@hidden>
References: 
 >Maven, woapplication-archetype not found when using the local catalog (From: William Hatch <email@hidden>)
 >Re: Maven, woapplication-archetype not found when using the local catalog (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: Recreating Xcode project from deployed app
  • Next by Date: Missing ERXApplicationand ERXSession
  • Previous by thread: Re: Maven, woapplication-archetype not found when using the local catalog
  • Next by thread: Re: Maven, woapplication-archetype not found when using the local catalog
  • Index(es):
    • Date
    • Thread