我正在尝试设置项目以部署到内部nexus存储库时遇到问题.由于我对Maven一般都是新手,所以我希望在构建分发管理方面我真的不会理解.
基本问题是,当我执行"mvn deploy"时,工件已成功部署到快照存储库,但Maven也在尝试将其部署到发布存储库,而这正在失败......应该如此.我对当前配置的理解是它不应该将它部署到发布存储库中.
我已经包含了下面的各种配置元素,但我想知道我是否应该使用配置文件管理该部分,以便快照构建仅定义,并且发布版本仅定义.
对此的任何帮助/澄清将非常感激.
我的POM中有以下内容用于分发管理:
<distributionManagement>
<repository>
<id>internal-releases</id>
<name>Internal Releases</name>
<url>http://localhost:8081/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>internal-snapshots</id>
<name>Internal Snapshots</name>
<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
Run Code Online (Sandbox Code Playgroud)
在POM的其他地方,我有以下设置允许使用这些存储库来获取工件:
<repositories>
<repository>
<id>internal-releases</id>
<url>http://localhost:8081/nexus/content/repositories/releases</url>
<snapshots><enabled>false</enabled></snapshots>
</repository>
<repository>
<id>internal-snapshots</id>
<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<!-- other repos, etc, etc -->
</repositories>
Run Code Online (Sandbox Code Playgroud)
我在settings.xml中有正确的设置,以提供能够发布到我的计算机上运行的此测试nexus实例的凭据,并且它实际上已成功部署快照.
问题是它还尝试将快照部署到发布存储库,该存储库配置为禁止快照.
"mvn deploy"的输出包括以下内容:
[INFO] [deploy:deploy {execution: default-deploy}]
[INFO] Retrieving previous build number from internal-snapshots
Uploading: http://localhost:8081/nexus/content/repositories/snapshots/com/internal/service/1.0.0-SNAPSHOT/service-1.0.0-20101104.170338-8.war
405K uploaded (service-1.0.0-20101104.170338-8.war)
[INFO] Retrieving previous metadata from internal-snapshots
[INFO] Uploading repository metadata for: 'snapshot com.internal:service:1.0.0-SNAPSHOT'
[INFO] Retrieving previous metadata from internal-snapshots
[INFO] Uploading …
Run Code Online (Sandbox Code Playgroud) 我正在解析XML文件并填充表视图.XML的格式如下:
<article>
<title>Title 1</title>
<last-modified>MM/DD/YYY</last-modified>
</article>
...
Run Code Online (Sandbox Code Playgroud)
我目前使用它NSMutableString
来收集所有文章标题并在- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
方法中附加字符串.然后在适当的时候,我正在添加articleTitle
一个NSMutableArray
包含所有文章标题,并从数组中填充表格,正如您所期望的那样.
但是,现在我想切换到使用带有字幕的表格视图单元格(我想将最后修改日期作为detailTextLabel
标题和标题textLabel
).通过将解析分解为多种方法(即2 parser
种方法和foundCharacters
方法)的方式,我不确定如何"收集"数据,并从该数据中填充表格.
对此最好的方法是什么?我可以以某种方式填充NSDictionary或其他东西,并在构建表格单元格时按键检索项目吗?
我似乎无法找出解决这个问题的最佳方法.
提前致谢!