Code Monkey home page Code Monkey logo

trip's Introduction

skullabs

Skullabs site

trip's People

Contributors

miere avatar selonke avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ladraum

trip's Issues

The 'trip-all' artifact is too heavyweight

The trip-processor depends on JMustache to generate classes at compile time. It makes an artifact with 2Mb of size. To make the usage of this artifact viable, it should have at most 150Kb.

Remove "naming" support

The use of names to refer to a service is a deprecated practice. @Name annotation, for sake of example, is discouraged to be used as injection classifier, but still pretty useful when using with JSF.

tRip has no intent to be a CDI provider, but a SPI provider. To keep its code simple, @Stateless.name and @Singleton.name attributes will be removed in this version.

Erro compilação usando @Stateless e generics

Tenho a classe:

package com.test;

@trip.spi.Stateless
public class StatelessTest {

    protected <T> Iterable<T> generic( Class<T> clazz ) {
        return null;
    }

}

E ela gera erro de compilação:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3:compile (default-compile) on project ttm-cobol-maven-plugin: Compilation failure: Compilation failure:
[ERROR] \Projetos\ttm-server\ttm-cobol\ttm-cobol-maven-plugin\target\generated-sources\annotations\com\test\StatelessTestStateless2463568548.java:[10,55] error: cannot find symbol
[ERROR]
[ERROR] \Projetos\ttm-server\ttm-cobol\ttm-cobol-maven-plugin\target\generated-sources\annotations\com\test\StatelessTestStateless2463568548.java:[10,27] error: cannot find symbol
[ERROR] -> [Help 1]
[ERROR]

Verifiquei e o metodo da classe StatelessTestStateless2463568548 ficou:

public java.lang.Iterable<T> generic( java.lang.Class<T> arg0 ) {

onde o correto seria:

public <T> java.lang.Iterable<T> generic( java.lang.Class<T> arg0 ) {

Problema ServiceProvider jUnit eclipse

Quando utilizada a classe DefaultServiceProvider em um teste unitário e o teste unitário é executado diretamente pelo eclipse esta classe não funciona corretamente.

Abaixo as classes utilizadas para simular o problema:

`
package provider;

@trip.spi.Singleton
public class ProvidedClass implements ProvidedClassAnnotation {

}
package provider;

public interface ProvidedClassAnnotation {

}

package provider;

import java.util.ArrayList;
import java.util.List;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import trip.spi.DefaultServiceProvider;
import trip.spi.Provided;
import trip.spi.ServiceProvider;

public class ProvidedClassTest {

@Provided
ServiceProvider provider;

@Before
public void before(){
	ServiceProvider serviceProvider = new DefaultServiceProvider();
	serviceProvider.providerFor( ServiceProvider.class, serviceProvider );
	serviceProvider.provideOn( this );
}

@Test
public void getClasses(){ 
	Iterable<Class<ProvidedClassAnnotation>> iterable = ((DefaultServiceProvider)provider).loadClassesImplementing( ProvidedClassAnnotation.class );
	List<Class<ProvidedClassAnnotation>> list = new ArrayList<>();
	iterable.forEach( list::add );
	Assert.assertFalse( "Lista está vazia", list.isEmpty() );
}

}
test-project-trip.zip

`

Change exposition rule for @Singleton and @Stateless annotated services

After some usage tests, becomes clear that developers wasn't understanding the exposition mechanism that choose which will be the supperclass ( or superinterface ) which a service is exposed and could be retrieved by ServiceProvider.

Definition of done:
The new exposition rule will be defined as:

  • when the attribute exposedAs from @Stateless and @Singleton is empty, so the service is exposed by its own class
  • when the attribute exposedAs from @Stateless and @Singleton is not empty, so the service is exposed by the class defined in exposedAs attribute

tRip Continuous Delivery

Definition of done:

  • Configure Git repository to use Git Flow
  • Create a Jenkins instance
  • Configure a deploy job for tRip on Jenkins
  • Ensure that a build job it will be automatically run after merge features with master branch
  • Ensure that a deploy build is dispatched when the master branch build was finished with success

Remove 'trip-project' artifact

Although it was useful in the last months, when trip-project is used in a multi-module maven project, all trip dependencies are forced as dependency under all modules. The propose of this feature was to make easy to use trip under Maven projects. Developers will be encouraged to download the trip-boilderplate project instead of use trip-project.

Allow define name in @Singleton and @Stateless annotations

Todays naming mechanism to avoid ambiguations are done by @Name annotation. Learning some users usage of tRip becomes clear that this approach are never found by devs. Instead, the test point out that they look for parameters on annotations.

Definition of done:

  • Include a name attribute in @Singleton and @Stateless annotations, and let users to use ServiceProvider.load( MyClass.class, "my-disambiguation-name" ) method as they are already using
  • Include a name attribute in @Provided annotation and let users to define which data will be provided matching the name defined on this attribute.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.