[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Where is the javax.persistence API ?

Hi,
 
I want to compile a simple JPA HelloWorld example with EclipseLink and Maven. I've looked at the Maven repository (http://eclipse.ialto.org/rt/eclipselink/maven.repo/org/eclipse/persistence/) but I can't find the javax.persistence package (meaning it can't find @Entity, @Id...).
 
I've played with my pom.xml, changed artifactId and so on, but still doesn't work. Any idea ?
 
Thanks,
Antonio
 
 
my pom.xml
 
 
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.hello.samples</groupId>
    <artifactId>jpa</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>
    <name>jpa samples</name>
    <description>Samples showing how to use JPA 2.0</description>
 
    <dependencies>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>eclipselink</artifactId>
            <version>1.0.1</version>
        </dependency>
    </dependencies>
 
    <repositories>
        <repository>
            <id>EclipseLink Repo</id>
            <name>EclipseLink Repository</name>
            <url>http://www.eclipse.org/downloads/download.php?r=1&amp;nf=1&amp;file=/rt/eclipselink/maven.repo</url>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <inherited>true</inherited>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>