dev@glassfish.java.net

About a problem of HK2 building

From: Tang Yong <tangyong_at_cn.fujitsu.com>
Date: Tue, 09 Oct 2012 17:22:14 +0900

Hi HK2)Team
CC: Sahoo

 Today, I met a hk2 1.1.15(hk2 earlier version) building problem and
want to ask a right solution.

[Problem]
After I checked out hk2 1.1.15[1], I plan to release a new hk2
version(1.1.15-gf-00007-SNAPSHOT) based 1.1.15. Then, I made the
following modification.

1) modify <version> in hk2-parent pom into 1.1.15-gf-00007-SNAPSHOT
2) modify <parent><version> in hk2-related modules into
1.1.15-gf-00007-SNAPSHOT

Then, I start to execute the following command:

  mvn -P release-phase1 install

However, the following execption happened on cmd shell,
...
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ external ---
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[INFO] Forking Inversion of Control / Autodependency mechanism
1.1.15-gf-00007-SNAPSHOT
...
[INFO] Reactor Summary:
[INFO]
[INFO] Modules Subsystem ................................. SUCCESS [1.234s]
[INFO] Class Model for Hk2 ............................... FAILURE [34.422s]
...
[ERROR] Failed to execute goal on project auto-depends: Could not
resolve dependencies for project
org.glassfish.hk2:auto-depends:jar:1.1.15-gf-00007-SNAPSHOT: Could not
find artifact
org.glassfish.hk2.external:asm-all-repackaged:jar:1.1.15-gf-00007-SNAPSHOT
...

[My Trying]
After seeing the above exception, I checked my maven local repo and have
not found class-model-1.1.15-gf-00007-SNAPSHOT.jar on there although
seeing from class-model's pom, class-model does not depend on
auto-depends and asm-all-repackaged.

Then, I tried to adjust building order in hk2-parent pom and put
<module>external</module> before <module>class-model</module>, but the
similar problem still happened.

Then, I tried to build the external module and other related modules
manually once simlar problems happened. As a result, anything is OK.
Then, I start to execute "mvn -P release-phase1 install" and this time,
executing is OK.

[My Analyse]
1) Before HK2 releases a hk2 version and source, whether team has
uploaded built jars of the version into remote maven repository in order
to make user can download these jars while executing "mvn -P
release-phase1 install" or not?

2) Maybe my modification way is not right at all.

[Request]
Could team please tell me a right doing way?

[1]: https://svn.java.net/svn/hk2~svn/tags/hk2-parent-1.1.15

Thanks
--Tang