Reinhard Poetz pisze:
The proposed release artifacts are available at
http://people.apache.org/builds/cocoon/.
Except for the archetypes the easiest way to test the artifacts is by
adding a
"cocoon-staging" profile to your ~/.m2/settings.xml:
<settings>
<profiles>
<profile>
<id>cocoon-staging</id>
<repositories>
<repository>
<id>cocoon.staging</id>
<name>Cocoon staging repository</name>
<url>http://people.apache.org/builds/cocoon</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>cocoon.staging</id>
<name>Cocoon staging repository</name>
<url>http://people.apache.org/builds/cocoon</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
Then change the version number of the artifacts that you use in your POMs
to the number of the proposed artifact and append "-P cocoon-staging" to
all
your Maven commands, e.g.
mvn install -P cocoon-staging
I really think that creating separate settings file with non-default local repository path is much better option. You don't mess your
original installation, you have clean local repo but do not loose ability to work with other projects, etc. I gave a model file:
http://article.gmane.org/gmane.text.xml.cocoon.devel/73498
Again, make sure that you use the
cocoon-staging profile for all your commands as explained above.
Otherwise the
referenced artifacts can't be found.
There is a problem with dependencies of org.apache.cocoon:cocoon-rcl-webapp-wrapper:1.0.0-M1 that was reported by Joakim Verona. There are
two problems:
1.
http://people.apache.org/builds/cocoon/org/apache/cocoon/cocoon/4/cocoon-4.pom
contains:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jci-fam</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
and it makes Maven going mad. It downloads both (SNAPSHOT and RC) versions but does not use any of them at runtime. I guess we must remove
it, right?
2. I fixed first problem locally and ran mvn jetty:run -X -s
testing-cocoon-settings.xml -X and got:
[INFO] [cocoon:rcl {execution: rcl}]
[INFO] Creating a reloading Cocoon web application.
[INFO] Deploying string-template to WEB-INF/log4j.xml
[DEBUG] unspecified:unspecified:jar:0.0 (selected for null)
[DEBUG] Trying repository cocoon.staging
Downloading:
http://people.apache.org/builds/cocoon/org/apache/cocoon/cocoon-rcl-webapp-wrapper/1.0.0-M1/cocoon-rcl-webapp-wrapper-1.0.0-M1.pom
[...]
4K downloaded
[DEBUG] Artifact resolved
[DEBUG] Retrieving parent-POM: org.apache.cocoon:cocoon-tools-modules::4 for project: null:cocoon-rcl-webapp-wrapper:jar:1.0.0-M1 from the
repository.
[DEBUG] Retrieving parent-POM: org.apache.cocoon:cocoon::4 for project:
null:cocoon-tools-modules:pom:4 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::4 for project:
org.apache.cocoon:cocoon:pom:4 from the repository.
[DEBUG] Adding managed depedendencies for unknown:cocoon-rcl-webapp-wrapper
[...]
[DEBUG] org.apache.cocoon:cocoon-rcl-webapp-wrapper:jar:1.0.0-M1:compile
(selected for compile)
[DEBUG] Trying repository cocoon.staging
Downloading:
http://people.apache.org/builds/cocoon/org/apache/commons/commons-jci-core/1.0-RC1/commons-jci-core-1.0-RC1.pom
[DEBUG] Unable to get resource 'org.apache.commons:commons-jci-core:pom:1.0-RC1' from repository cocoon.staging
(http://people.apache.org/builds/cocoon)
[DEBUG] Trying repository central
Downloading:
http://repo1.maven.org/maven2/org/apache/commons/commons-jci-core/1.0-RC1/commons-jci-core-1.0-RC1.pom
[DEBUG] Unable to get resource
'org.apache.commons:commons-jci-core:pom:1.0-RC1' from repository central
(http://repo1.maven.org/maven2)
[DEBUG] Artifact not found - using stub model: Unable to download the artifact
from any repository
org.apache.commons:commons-jci-core:pom:1.0-RC1
from the specified remote repositories:
cocoon.staging (http://people.apache.org/builds/cocoon),
central (http://repo1.maven.org/maven2)
[DEBUG] Using defaults for missing POM
org.apache.commons:commons-jci-core:pom:1.0-RC1:compile
[DEBUG] org.apache.commons:commons-jci-core:jar:1.0-RC1:compile (selected
for compile)
[DEBUG] commons-logging:commons-logging:jar:1.1:compile (selected for
compile)
[DEBUG] log4j:log4j:jar:1.2.12:compile (selected for compile)
[DEBUG] javax.servlet:servlet-api:jar:2.3:compile (selected for compile)
[DEBUG] log4j:log4j:jar:1.2.12:compile (removed - nearer found: 1.2.14)
[DEBUG] log4j:log4j:jar:1.2.14:compile (selected for compile)
[DEBUG] Trying repository cocoon.staging
Downloading:
http://people.apache.org/builds/cocoon/org/apache/commons/commons-jci-core/1.0-RC1/commons-jci-core-1.0-RC1.jar
[DEBUG] Unable to get resource 'org.apache.commons:commons-jci-core:jar:1.0-RC1' from repository cocoon.staging
(http://people.apache.org/builds/cocoon)
[DEBUG] Trying repository apache-m2-snapshot
Downloading:
http://people.apache.org/repo/m2-snapshot-repository/org/apache/commons/commons-jci-core/1.0-RC1/commons-jci-core-1.0-RC1.jar
[...]
26K downloaded
[DEBUG] Artifact resolved
POM file of commons-jci-core is not downloaded because apache-m2-snapshot is not used while searching for this pom file. However, when Maven
tries to download jar file it uses apache-m2-snpashot repository declared cocoon-rcl-webapp-wrapper.
Sight, I spent about two hours to discover things described above to only find
out that we again hit this issue:
https://issues.apache.org/jira/browse/COCOON-1975
Thoughts?
--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/