Apache Archiva 2.2.1仅为Maven 2生成一个-(NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems
{
//Here I need to rename the title of default menu from
//"Open Link In New Window" to "Open Link In New Tab".
NSMutableArray *modifiedMenuItems=[[NSMutableArray alloc]init];
modifiedMenuItems=[defaultMenuItems mutableCopy];
NSMenuItem *mItem=[[NSMenuItem alloc]init];
int i=0;
while(i<[modifiedMenuItems count])
{
mItem=[modifiedMenuItems objectAtIndex:i];
if([mItem tag]==WebMenuItemTagOpenLinkInNewWindow)
{
[mItem setTitle:@"Open Link in New Tab"];
[modifiedMenuItems replaceObjectAtIndex:i withObject:mItem];
//Here I renamed the title and replaced. But it doesn't works.
//It is showing like a disabled one.
//So I added the next line code prior to replacement.
[mItem setEnabled:YES];
}
i++;
}
//For adding new menu item.
//[mItem setTitle:@"Your Title"];
//[mItem setTarget:self];
//[mItem setAction:@selector(yourActionMethod)];
//[mItem setTag:/*your desired enum tag value*/];
//[mItem setEnabled:YES];
//Then add or insert to any position you want in the modifiedMenuItems array.
return (NSArray *)modifiedMenuItems; //Changed the type.
}
,而没有指定与Repository Metadata Model of Maven 3相对的分类器。因此,无法从包含分类器的档案中下载快照工件,因为Maven 3尝试仅通过时间戳而不是每个分类器的时间戳来解析最新快照。我查看了较新的Archiva版本的发行说明,但似乎元数据生成仍与Maven 3不兼容。我错过了什么吗?