Hi Ivan,
Yes, that's the idea. It's strange that this method is not being called. I'll investigate further.
Another solution would be to create a new Forge's PersistenceProvider implementation in a separate addon and select that instead when running Jpa:Setup.
Best Regards,
George Gastaldi
> Em 24/11/2014, às 08:25, Ivan St. Ivanov <ivan.st.ivanov@gmail.com> escreveu:
> _______________________________________________>
> Hi everybody,
>
> I have the following usecase. I am developing a web application that uses JPA with Eclipse Link and will be deployed on SAP HANA Cloud Platform (think of it as Tomcat). Which means that I need the Eclipse Link dependencies in the pom.xml in the compile scope. When I generated the project and set up Eclipse Link, I got this in the pom:
>
> <dependencies>
> <dependency>
> <groupId>org.hibernate.javax.persistence</groupId>
> <artifactId>hibernate-jpa-2.0-api</artifactId>
> <scope>provided</scope>
> </dependency>
> </dependencies>
>
> However, I rather need something like:
>
> <dependency>
> <groupId>org.eclipse.persistence</groupId>
> <artifactId>javax.persistence</artifactId>
> </dependency>
> <dependency>
> <groupId>org.eclipse.persistence</groupId>
> <artifactId>eclipselink</artifactId>
> </dependency>
>
> I see in org.jboss.forge.addon.javaee.jpa.providers.EclipseLinkProvider:
>
>
> @Override
> public List<Dependency> listDependencies()
> {
> return Arrays.asList((Dependency) DependencyBuilder.create("org.eclipse.persistence:eclipselink"),
> (Dependency) DependencyBuilder.create("org.eclipse.persistence:javax.persistence"));
> }
>
> So we already have functionality on provider level that knows which are the dependencies. However, it seems that this method is not called. What was the idea of having it? How can I make sure that the dependencies are correctly configured?
>
> I think that it has something to do with the type of the container: if it is SAP HANA Cloud Platform, then find the dependencies for the JPA provider and add them in the default scope of the pom.xml instead of adding hibernate-jpa-2.0-api. If it is a full fledged application server, then we can go with the API in provided scope. Something like this.
>
> WDYT?
>
> Thanks,
> Ivan
> forge-dev mailing list
> forge-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-dev
_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev