Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JDeveloper project libraries and Maven dependencies

Jan VerveckenNov 5 2008 — edited Nov 18 2008
hi

Using the Apache Trinidad Maven JDev Plugin, I am wondering how JDeveloper project libraries and Maven dependencies are supposed to be related (or "matched", or "kept in sync", or "work together", or ...).

With the Maven settings.xml configured like this ...
<settings>
  <!-- ... -->
  <localRepository>C:\my-maven-repository</localRepository>
  <!-- ... -->
</settings>
... I tried this ...
C:\projects>mvn -v
Maven version: 2.0.9
Java version: 1.6.0_05
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

C:\projects>mvn archetype:create -DgroupId=com.oracle.forums.mvnfirstproj -DartifactId=mvn-first-proj
...
[INFO] OldArchetype created in dir: C:\projects\mvn-first-proj
...

C:\projects>cd mvn-first-proj

C:\projects\mvn-first-proj>mvn org.apache.myfaces.trinidadbuild:maven-jdev-plugin:jdev
[INFO] Scanning for projects...
[INFO] artifact org.apache.myfaces.trinidadbuild:maven-jdev-plugin: checking for updates from central
Downloading: http://repo1.maven.org/maven2/org/apache/myfaces/trinidadbuild/maven-jdev-plugin/1.2.7/maven-jdev-plugin-1.2.7.pom
2K downloaded
...
[INFO] [jdev:jdev]
[INFO] Generating JDeveloper 10.1.3.0.4 Project mvn-first-proj
[INFO] Generating JDeveloper 10.1.3.0.4 Project mvn-first-proj-test
...
After this, the file C:\projects\mvn-first-proj\mvn-first-proj-test.jpr contains
      <!-- ... -->
      <list n="libraryDefinitions">
        <hash>
          <list n="classPath">
            <url path="../../my-maven-repository/junit/junit/3.8.1/junit-3.8.1.jar" jar-entry=""/>
          </list>
          <value v="true" n="deployedByDefault"/>
          <value v="junit:junit:jar:3.8.1" n="description"/>
          <value v="junit:junit:jar:3.8.1" n="id"/>
        </hash>
      </list>
      <!-- ... -->
Notice the path for the JAR file in my specific Maven repository, to be relative to my specific project location.

questions:
(1) This seems to severely limit the options to share such a JDeveloper project file between developers in a team (e.g. using Subversion), because they would need their Maven repository and their JDeveloper project to be in the same (relative) location. Is this intended? Are there any options to work around these limitations?
(2) If a project evolves, and additional libraries need to be configured in a JDeveloper project, what would be the preferred approach to keep these in sync with Maven dependency configurations?

many thanks
Jan Vervecken

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 16 2008
Added on Nov 5 2008
14 comments
5,087 views