ignore eclipse lauch files

2016-01-08 Thread Paul Escobar
Hello,

I downloaded the apache isis simpleapp archtype(1.11.0) but the files to
launch the application from eclipse ide not found (there are .gitignore
file), Is this an forgetfulness?

\webapp\ide\eclipse\launch\.gitignore:

/SimpleApp-PROTOTYPE-jrebel.launch
/SimpleApp-PROTOTYPE-no-fixtures.launch
/SimpleApp-PROTOTYPE-with-fixtures.launch
/SimpleApp-SERVER-no-fixtures.launch
/SimpleApp-PROTOTYPE-jrebel.launch
/SimpleApp-PROTOTYPE-no-fixtures.launch
/SimpleApp-PROTOTYPE-with-fixtures.launch
/SimpleApp-SERVER-no-fixtures.launch

Thanks,

-- 
Paul Escobar Mossos
skype: paulescom
telefono: +57 1 3006815404


Re: Apache Isis version 1.11.0 JAVA 1.7 Error

2016-01-08 Thread Martin Grigorov
Hi,

If Java 7 is the minimum supported then why not use Java 7 to build? This
is the cleanest way to make sure everything is fine.

I thought that Java 8 is the minimum since a while.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Jan 8, 2016 at 12:35 PM, Dan Haywood 
wrote:

> Hi Nacho,
>
> Thanks for reporting this, which is obviously a problem.
>
> I think we should issue a patch (1.11.1) to fix that.  And obviously I need
> to look at the release procedures so that this error doesn't occur in the
> future.
>
> I'll try to get a vote out this weekend.
>
> Thx
> Dan
>
>
>
>
>
>
>
> On 8 January 2016 at 11:28, Nacho Cánovas Rejón <
> n.cano...@gesconsultor.com>
> wrote:
>
> > Hi everybody.
> >
> >
> >
> > I updated Apache ISIS version to 1.11 and I have a Java Version Problem.
> >
> >
> >
> > Apache ISIS is compatible with Java 1.7 and 1.8, but in two changes
> > (ISIS-1257: c6c3066e3b7e58dc1d338e44ba4ca926dc29d1ef and ISIS-1213:
> > 6ec46332ef2ad50959148751e90222d13a8eecf3) you use a method that only
> exists
> > in Java 1.8 (
> > <
> >
> https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html#get
> > ParameterCount--> getParameterCount())
> >
> >
> >
> > We don’t want to migrate to 1.8 because it requires so many changes on
> our
> > app, so if you can change code to be compatible, these are the changes I
> > made:
> >
> >
> >
> >
> >
> isis\core\metamodel\src\main\java\org\apache\isis\core\metamodel\facets\Anno
> > tations.java
> >
> >
> >
> > private static  void appendEvaluators(
> >
> > final Class cls,
> >
> > final Class annotationClass,
> >
> > final List> evaluators) {
> >
> >
> >
> > for (Method method : cls.getDeclaredMethods()) {
> >
> > if(MethodScope.OBJECT.matchesScopeOf(method) &&
> >
> > method.getParameterCount()
> > method.getParameterTypes().length == 0) {
> >
> > final Annotation annotation =
> > method.getAnnotation(annotationClass);
> >
> > if(annotation != null) {
> >
> > evaluators.add(new MethodEvaluator(method,
> > annotation));
> >
> > }
> >
> > }
> >
> > }
> >
> >
> >
> >
> >
> isis\core\metamodel\src\main\java\org\apache\isis\core\metamodel\services\co
> > ntainer\DomainObjectContainerDefault.java
> >
> >
> >
> > public  T mixin(final Class mixinClass, final Object mixedIn) {
> >
> > final ObjectSpecification objectSpec =
> > getSpecificationLoader().loadSpecification(mixinClass);
> >
> > final MixinFacet mixinFacet =
> > objectSpec.getFacet(MixinFacet.class);
> >
> > if(mixinFacet == null) {
> >
> > throw new NonRecoverableException("Class '" +
> > mixinClass.getName() + " is not a mixin");
> >
> > }
> >
> > if(!mixinFacet.isMixinFor(mixedIn.getClass())) {
> >
> > throw new NonRecoverableException("Mixin class '" +
> > mixinClass.getName() + " is not a mixin for supplied object '" + mixedIn
> +
> > "'");
> >
> > }
> >
> > final Constructor[] constructors =
> mixinClass.getConstructors();
> >
> > for (Constructor constructor : constructors) {
> >
> > if(constructor.getParameterCount()
> > constructor.getParameterTypes().length == 1 &&
> >
> >
> > constructor.getParameterTypes()[0].isAssignableFrom(mixedIn.getClass()))
> {
> >
> > final Object mixin;
> >
> > try {
> >
> > mixin = constructor.newInstance(mixedIn);
> >
> > return (T)injectServicesInto(mixin);
> >
> > } catch (InstantiationException | IllegalAccessException
> |
> > InvocationTargetException e) {
> >
> > throw new NonRecoverableException(e);
> >
> > }
> >
> > }
> >
> > }
> >
> >
> >
> > This is the documentation of JAVA with allowed methods depending on
> > version:
> >
> > https://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Method.html
> >
> > https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html
> >
> >
> >
> > Best regards and happy new year.
> >
> >
> >
> >
>


Re: Apache Isis version 1.11.0 JAVA 1.7 Error

2016-01-08 Thread Dan Haywood
Hi Nacho,

Thanks for reporting this, which is obviously a problem.

I think we should issue a patch (1.11.1) to fix that.  And obviously I need
to look at the release procedures so that this error doesn't occur in the
future.

I'll try to get a vote out this weekend.

Thx
Dan







On 8 January 2016 at 11:28, Nacho Cánovas Rejón 
wrote:

> Hi everybody.
>
>
>
> I updated Apache ISIS version to 1.11 and I have a Java Version Problem.
>
>
>
> Apache ISIS is compatible with Java 1.7 and 1.8, but in two changes
> (ISIS-1257: c6c3066e3b7e58dc1d338e44ba4ca926dc29d1ef and ISIS-1213:
> 6ec46332ef2ad50959148751e90222d13a8eecf3) you use a method that only exists
> in Java 1.8 (
> <
> https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html#get
> ParameterCount--> getParameterCount())
>
>
>
> We don’t want to migrate to 1.8 because it requires so many changes on our
> app, so if you can change code to be compatible, these are the changes I
> made:
>
>
>
>
> isis\core\metamodel\src\main\java\org\apache\isis\core\metamodel\facets\Anno
> tations.java
>
>
>
> private static  void appendEvaluators(
>
> final Class cls,
>
> final Class annotationClass,
>
> final List> evaluators) {
>
>
>
> for (Method method : cls.getDeclaredMethods()) {
>
> if(MethodScope.OBJECT.matchesScopeOf(method) &&
>
> method.getParameterCount()
> method.getParameterTypes().length == 0) {
>
> final Annotation annotation =
> method.getAnnotation(annotationClass);
>
> if(annotation != null) {
>
> evaluators.add(new MethodEvaluator(method,
> annotation));
>
> }
>
> }
>
> }
>
>
>
>
> isis\core\metamodel\src\main\java\org\apache\isis\core\metamodel\services\co
> ntainer\DomainObjectContainerDefault.java
>
>
>
> public  T mixin(final Class mixinClass, final Object mixedIn) {
>
> final ObjectSpecification objectSpec =
> getSpecificationLoader().loadSpecification(mixinClass);
>
> final MixinFacet mixinFacet =
> objectSpec.getFacet(MixinFacet.class);
>
> if(mixinFacet == null) {
>
> throw new NonRecoverableException("Class '" +
> mixinClass.getName() + " is not a mixin");
>
> }
>
> if(!mixinFacet.isMixinFor(mixedIn.getClass())) {
>
> throw new NonRecoverableException("Mixin class '" +
> mixinClass.getName() + " is not a mixin for supplied object '" + mixedIn +
> "'");
>
> }
>
> final Constructor[] constructors = mixinClass.getConstructors();
>
> for (Constructor constructor : constructors) {
>
> if(constructor.getParameterCount()
> constructor.getParameterTypes().length == 1 &&
>
>
> constructor.getParameterTypes()[0].isAssignableFrom(mixedIn.getClass())) {
>
> final Object mixin;
>
> try {
>
> mixin = constructor.newInstance(mixedIn);
>
> return (T)injectServicesInto(mixin);
>
> } catch (InstantiationException | IllegalAccessException |
> InvocationTargetException e) {
>
> throw new NonRecoverableException(e);
>
> }
>
> }
>
> }
>
>
>
> This is the documentation of JAVA with allowed methods depending on
> version:
>
> https://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Method.html
>
> https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html
>
>
>
> Best regards and happy new year.
>
>
>
>


Apache Isis version 1.11.0 JAVA 1.7 Error

2016-01-08 Thread Nacho Cánovas Rejón
Hi everybody.

 

I updated Apache ISIS version to 1.11 and I have a Java Version Problem.

 

Apache ISIS is compatible with Java 1.7 and 1.8, but in two changes
(ISIS-1257: c6c3066e3b7e58dc1d338e44ba4ca926dc29d1ef and ISIS-1213:
6ec46332ef2ad50959148751e90222d13a8eecf3) you use a method that only exists
in Java 1.8 (
 getParameterCount())

 

We don’t want to migrate to 1.8 because it requires so many changes on our
app, so if you can change code to be compatible, these are the changes I
made:

 

isis\core\metamodel\src\main\java\org\apache\isis\core\metamodel\facets\Anno
tations.java

 

private static  void appendEvaluators(

final Class cls,

final Class annotationClass,

final List> evaluators) {

 

for (Method method : cls.getDeclaredMethods()) {

if(MethodScope.OBJECT.matchesScopeOf(method) &&

method.getParameterCount()
method.getParameterTypes().length == 0) {

final Annotation annotation =
method.getAnnotation(annotationClass);

if(annotation != null) {

evaluators.add(new MethodEvaluator(method, annotation));

}

}

}

 

isis\core\metamodel\src\main\java\org\apache\isis\core\metamodel\services\co
ntainer\DomainObjectContainerDefault.java

 

public  T mixin(final Class mixinClass, final Object mixedIn) {

final ObjectSpecification objectSpec =
getSpecificationLoader().loadSpecification(mixinClass);

final MixinFacet mixinFacet = objectSpec.getFacet(MixinFacet.class);

if(mixinFacet == null) {

throw new NonRecoverableException("Class '" +
mixinClass.getName() + " is not a mixin");

}

if(!mixinFacet.isMixinFor(mixedIn.getClass())) {

throw new NonRecoverableException("Mixin class '" +
mixinClass.getName() + " is not a mixin for supplied object '" + mixedIn +
"'");

}

final Constructor[] constructors = mixinClass.getConstructors();

for (Constructor constructor : constructors) {

if(constructor.getParameterCount()
constructor.getParameterTypes().length == 1 &&

 
constructor.getParameterTypes()[0].isAssignableFrom(mixedIn.getClass())) {

final Object mixin;

try {

mixin = constructor.newInstance(mixedIn);

return (T)injectServicesInto(mixin);

} catch (InstantiationException | IllegalAccessException |
InvocationTargetException e) {

throw new NonRecoverableException(e);

}

}

}

 

This is the documentation of JAVA with allowed methods depending on version:

https://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Method.html

https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html

 

Best regards and happy new year.