class School(object):
def __init__(self, students: List[Student], online: bool):
self.students: List[Student] = students
self.online: bool = online
def __repr_json__(self):
return self.__dict__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
venv/** | |
.idea/** |
While building the package set the profile
$ mvn -Pdev clean install
When the jar is built you can simply run by
$ java -jar target/<your jar name>.jar
You'll see output as below
Below command recursively counts number of lines in current directory.
It excludes certain directories such as ./target/
, ./.idea/
, etc.
find . ! -path "./target/*" ! -path "./.mvn/*" ! -path "./.idea/*" -name "*" | xargs wc -l
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
import ma.glasnost.orika.CustomMapper; | |
import ma.glasnost.orika.Mapper; | |
import ma.glasnost.orika.MapperFactory; | |
import ma.glasnost.orika.MappingContext; | |
import ma.glasnost.orika.impl.ConfigurableMapper; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Component; | |
import org.springframework.util.CollectionUtils; |
For example, you want to write a plugin for files exactly named abc.json
, or in more practical scenarios Jenkinsfile
- Write
FileMatcherType
class
class MyFileType extends LanguageFileTyp {
public static final MyFileType INSTANCE = new MyFileType();
private MyFileType() {
super(MyLanguage.INSTANCE);
}
Steps to configure PR jobs on Jenkins This job will run every time someone creates a pull request on your Github repository
- On Jenkins
- Install Jenkins PR Plugin https://plugins.jenkins.io/ghprb/
- Create a freestyle project
- Add Github project link
- In Source code management > branch specifier add
${ghprbActualCommit}
- Click on advance and add Refspec as "+refs/pull/:refs/remotes/origin/pr/" (because we want to run only for PRs)
- In Triggers, select "Github Pull Request Builder"