Welcome Guest  |  Register  |  Login
Login Name Password
  Index  | Recent Threads  | Unanswered Threads  | Who's Online  | User List  | Help
  Search  


Quick Go »

No member browsing this thread
Thread Status: Active
Total posts in this thread: 17
Posts: 17   Pages: 2   [ 1 2 | Next Page ]
Post new Thread
Author
Previous Thread This topic has been viewed 936 times and has 16 replies Next Thread
Female groef
Newbie
Member's Avatar

Ireland
Joined: Jan 26, 2008
Post Count: 6
Status: Offline
Reply to this Post  Reply with Quote 
Maven 2 - 1.2.0-beta-5

I am currently trying to setup an Maven2 POM using the latest beta 5, version 1.2.0 of JPOX. But getting errors due to missing artifacts. The issue is with the POM files for the jpox version 1.2.0-beta-5 files checked into the Maven repository. There dependencies are incorrectly defined for the eclipse osgi dependencies. Yes, I know I can solve this issue be downloading these and installing them into my local repository, but that defeats the purpose of Maven, especially when these jar files are in a repository. It looks like your builds seems to work, which I can only think you are using Maven 1 maybe or that you have these eclipse osgi jar files defined into your local repository.

Getting: 5 required artifacts are missing.
from the specified remote repositories:


errors like:
Path to dependency:
1) org.dit:jpox-test1:jar:1.0
2) jpox:jpox-core:jar:1.2.0-beta-5
3) org.eclipse:org.eclipse.equinox.common:jar:3.2.0

I did some research and found that the dependencies are not defined correctly for the eclipse osgi dependencies. This is based on my investigation, but please correct me if I have gone wrong.

Example:
In jpox-core-1.2.0-beta-5.jar located at http://mirrors.ibiblio.org/pub/mirrors/maven2/jpox/jpox-core/1.2.0-beta-5/ has a POM file that Maven 2.0.9 will look at ensure that dependencies are resolved. For instance looking at the following dependency:

<dependency>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.equinox.registry</artifactId>
<version>3.2.0</version>
</dependency>

This dependency can not be found. I did some digging around and found that this dependency requires repository eclipse (http://repo1.maven.org/eclipse), and within this repository the following dependency definition should be used to find the correct jar

<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.registry</artifactId>
<version>3.2.0</version>
</dependency>


I have had a quick look at previous beta versions and find it strange that they all define these eclipse osgi dependencies like this. Is this a problem on my side or is it that no one is using Maven 2 or is it that people are installing these JAR files manually?

I think all the eclipse osgi dependencies should be defined as follow:

<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.registry</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.common</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.runtime</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>3.2.0</version>
</dependency>


Regards,
Francois Groenewald
----------------------------------------
-- Francois --
[Aug 10, 2008 11:12:45 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Female groef
Newbie
Member's Avatar

Ireland
Joined: Jan 26, 2008
Post Count: 6
Status: Offline
Reply to this Post  Reply with Quote 
Re: Maven 2 - 1.2.0-beta-5

The issue still exist if I try and use the beta-5 version, but I have a work around by adding the nightly snapshot build as a LEGACY repository to my POM and then point to the version 2.1-SNAPSHOT, but for the JDO I had to be pointed to the 2.1 release version.

<dependency>
<groupId>jpox</groupId>
<artifactId>jpox-core</artifactId>
<!--version>1.2.0-beta-5</version-->
<version>1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>jpox</groupId>
<artifactId>jpox-rdbms</artifactId>
<!--version>1.2.0-beta-5</version-->
<version>1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo2-api</artifactId>
<version>2.1</version>
</dependency>

Additional Repositories that I required:
https://maven-repository.dev.java.net/repository/, was for the javax.transaction api version 1.1

<repository>
<id>java.net</id>
<url>https://maven-repository.dev.java.net/repository/</url>
<layout>legacy</layout>
</repository>
<repository>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<id>jpoxNightly</id>
<name>JPOX Maven 1 Nightly Repository</name>
<url>http://www.jpox.org/downloads/maven-nightly/</url>
<layout>legacy</layout>
</repository>

----------------------------------------
-- Francois --
[Aug 10, 2008 2:12:52 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male andy
Expert
Member's Avatar

UK / España
Joined: Mar 13, 2004
Post Count: 4882
Status: Offline
Reply to this Post  Reply with Quote 
Re: Maven 2 - 1.2.0-beta-5

using the latest beta 5, version 1.2.0 of JPOX.

But the latest is not beta-5, nor is it 1.2.0, nor is it JPOX. JPOX development has finished.
Also this particular forum (where you posted the issue) is for people developing DataNucleus, not for usage issues, so we have to assume that you are wanting to contribute code and build DataNucleus. Anyone building DataNucleus would have downloaded "local.repository" and would have no such build issues.
The issue is with the POM files for the jpox version 1.2.0-beta-5 files checked into the Maven repository.

By the "Maven repository" you presumably mean the central Maven repo that is nothing to do with us, nor where we advertise our jars. We provide our own Maven repo(s) - stated in the docs as Maven1 type, hence legacy. Maven1 doesn't support optional deps. Access Platform is provided with all required jars for running anyway.

Eclipse jars were never in any public repo when we started using it so we provided a group id for them. Ok, some Maven person has (finally) bothered to put them in a repo now and chosen a different groupId to what we guessed. AccessPlatform 1.0 final will use this new groupId when it is released - thx for letting us know about it.

As we've said for the last 4 yrs, if people want an M2 repo with our jars in it then they should contribute their time so that the full DataNucleus build process works using Maven2. It currently doesn't, e.g jdo.connector project doesnt create a rar, e.g some test projects don't have POMs.
----------------------------------------
-Andy smile

[Aug 10, 2008 6:56:53 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Female groef
Newbie
Member's Avatar

Ireland
Joined: Jan 26, 2008
Post Count: 6
Status: Offline
Reply to this Post  Reply with Quote 
Re: Maven 2 - 1.2.0-beta-5

Hi Andy, I am willing to contribute my time to getting DataNucleus Maven2 compliant. I have obtained the latest source code, but I will have to spend some time to familiarise myself a bit more with it.

My goal would be to create Maven2 archtypes for DataNucleus to enable newcomers or experienced developers to quickly create new DataNucleus projects.

Regards,
Francois
----------------------------------------
-- Francois --
[Aug 13, 2008 10:20:36 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male jfrantzius
Advanced Member
Member's Avatar

Germany
Joined: Jun 18, 2004
Post Count: 405
Status: Offline
Reply to this Post  Reply with Quote 
Re: Maven 2 - 1.2.0-beta-5

If you want to build datanucleus itself using maven2, the docs on doing that most conveniently aren't up-to-date, unfortunately. In case you didn't figure out yourself already, there are two parent POMs now:

  • platform/maven2-parent/trunk/pom.xml
  • test/test.maven2.parent/trunk/pom.xml

(yes we should settle for either "-" or "." in the names ;)

If you do a "mvn clean install" of both in the given order, the platform and tests are built and installed. Precondition is a SVN checkout that preserves the directory structure in SVN (aka "deep checkout").
[Aug 16, 2008 10:23:50 AM] Show Printable Version of Post    View Member Profile    Send Private Message    http://www.artnology.com [Link] Report threatening or abusive post: please login first  Go to top 
Female groef
Newbie
Member's Avatar

Ireland
Joined: Jan 26, 2008
Post Count: 6
Status: Offline
Reply to this Post  Reply with Quote 
Re: Maven 2 - 1.2.0-beta-5

Thanks, I have started looking at these.

Francois
----------------------------------------
-- Francois --
[Aug 16, 2008 9:04:21 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male karlmdavis
Novice



USA
Joined: Dec 15, 2007
Post Count: 31
Status: Offline
Reply to this Post  Reply with Quote 
Re: Maven 2 - 1.2.0-beta-5

Is there a convenient way to perform Maven2 builds of releases? Last time I looked at this, it seemed I'd have to go manually roll each project back to the appropriate "released" revision. Is there a simpler way?

Thanks,
Karl
[Aug 17, 2008 12:30:12 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male jfrantzius
Advanced Member
Member's Avatar

Germany
Joined: Jun 18, 2004
Post Count: 405
Status: Offline
Reply to this Post  Reply with Quote 
Re: Maven 2 - 1.2.0-beta-5

I guess not. Alternatively, you could do a fresh checkout of the revision in question and build from there.
[Aug 20, 2008 9:18:12 AM] Show Printable Version of Post    View Member Profile    Send Private Message    http://www.artnology.com [Link] Report threatening or abusive post: please login first  Go to top 
Male karlmdavis
Novice



USA
Joined: Dec 15, 2007
Post Count: 31
Status: Offline
Reply to this Post  Reply with Quote 
Re: Maven 2 - 1.2.0-beta-5

Yeah, I was actually looking to build the whole accessplatform. As I recall, each release of that isn't one revision, but rather a separate revision for each of the sub-projects.
[Aug 22, 2008 8:49:07 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male andy
Expert
Member's Avatar

UK / España
Joined: Mar 13, 2004
Post Count: 4882
Status: Offline
Reply to this Post  Reply with Quote 
Re: Maven 2 - 1.2.0-beta-5

When someone finally provides a working M2 setup for DataNucleus they really ought to consider whether having a parent POM is of much use in these two places :-

Plugin Development
People developing DataNucleus are typically working on one plugin at a time, hence can build that plugin with a single command and no need for parentage. A shell script can provide whatever build automation is required. Use of parentage here complicates things because each plugin has its own lifecycle and hence its own space in SVN. When you branch plugin X then its source resides under
pluginX/branches/{version}/
yet trunk for the plugin is at
pluginX/trunk/
so the use of relativePath in the parent and plugin POMs don't work.

Also dependencies are on a plugin-by-plugin basis, so no benefit from having a parent POM.
Conclusion thus far : strip out parentage for plugins


Testing
People want to run all tests (in general). In this situation parentage can be useful since it would trigger the run of all tests, and the dependencies across the test projects are similar. In terms of SVN, all test scenarios are in the same part of SVN so when they are branched the parent POM is branched in the same area so relativePaths work still.
Conclusion : leave parentage as is



Comments ?
----------------------------------------
-Andy smile

[Aug 26, 2008 7:59:23 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 17   Pages: 2   [ 1 2 | Next Page ]
Show Printable Version of Thread  Post new Thread