├── .github
└── workflows
│ ├── publish.yml
│ └── verify.yml
├── .gitignore
├── CHANGELOG.commits
├── CHANGELOG.markdown
├── Dockerfile
├── LICENSE.txt
├── README.markdown
├── RELEASE.markdown
├── build.gradle
├── changelogs-sdk.gradle
├── cli
├── .gitignore
├── blade-jar-smoke-tests.gradle
├── bnd.bnd
├── build.gradle
├── installers
│ ├── biz.aQute.jpm.run-4.0.0-20201026.162724-24.jar
│ ├── global
│ ├── local
│ └── local_jpm_only
├── mvnw.cmd
├── source-formatter-suppressions.xml
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── liferay
│ │ │ │ ├── blade
│ │ │ │ ├── cli
│ │ │ │ │ ├── BladeCLI.java
│ │ │ │ │ ├── BladeCLIDefaultProvider.java
│ │ │ │ │ ├── BladeSettings.java
│ │ │ │ │ ├── Extensions.java
│ │ │ │ │ ├── ExtensionsClassLoaderSupplier.java
│ │ │ │ │ ├── LiferayBundleDeployer.java
│ │ │ │ │ ├── StringConverter.java
│ │ │ │ │ ├── StringPrintStream.java
│ │ │ │ │ ├── WorkspaceConstants.java
│ │ │ │ │ ├── WorkspaceProvider.java
│ │ │ │ │ ├── aether
│ │ │ │ │ │ └── AetherClient.java
│ │ │ │ │ ├── command
│ │ │ │ │ │ ├── BaseArgs.java
│ │ │ │ │ │ ├── BaseCommand.java
│ │ │ │ │ │ ├── BladeProfile.java
│ │ │ │ │ │ ├── CommandType.java
│ │ │ │ │ │ ├── ConvertArgs.java
│ │ │ │ │ │ ├── ConvertCommand.java
│ │ │ │ │ │ ├── ConvertServiceBuilderCommand.java
│ │ │ │ │ │ ├── ConvertThemeCommand.java
│ │ │ │ │ │ ├── CreateArgs.java
│ │ │ │ │ │ ├── CreateCommand.java
│ │ │ │ │ │ ├── DeployArgs.java
│ │ │ │ │ │ ├── DeployCommand.java
│ │ │ │ │ │ ├── GradleWrapperArgs.java
│ │ │ │ │ │ ├── GradleWrapperCommand.java
│ │ │ │ │ │ ├── HelpArgs.java
│ │ │ │ │ │ ├── HelpCommand.java
│ │ │ │ │ │ ├── InitArgs.java
│ │ │ │ │ │ ├── InitCommand.java
│ │ │ │ │ │ ├── InstallExtensionArgs.java
│ │ │ │ │ │ ├── InstallExtensionCommand.java
│ │ │ │ │ │ ├── ListProjectTemplatesArgs.java
│ │ │ │ │ │ ├── ListProjectTemplatesCommand.java
│ │ │ │ │ │ ├── LocalServer.java
│ │ │ │ │ │ ├── OpenArgs.java
│ │ │ │ │ │ ├── OpenCommand.java
│ │ │ │ │ │ ├── OutputsArgs.java
│ │ │ │ │ │ ├── OutputsCommand.java
│ │ │ │ │ │ ├── SamplesArgs.java
│ │ │ │ │ │ ├── SamplesClientExtensionArgs.java
│ │ │ │ │ │ ├── SamplesClientExtensionCommand.java
│ │ │ │ │ │ ├── SamplesCommand.java
│ │ │ │ │ │ ├── SamplesVisitor.java
│ │ │ │ │ │ ├── ServerInitArgs.java
│ │ │ │ │ │ ├── ServerInitCommand.java
│ │ │ │ │ │ ├── ServerRunArgs.java
│ │ │ │ │ │ ├── ServerRunCommand.java
│ │ │ │ │ │ ├── ServerStartArgs.java
│ │ │ │ │ │ ├── ServerStartCommand.java
│ │ │ │ │ │ ├── ServerStopArgs.java
│ │ │ │ │ │ ├── ServerStopCommand.java
│ │ │ │ │ │ ├── ShellArgs.java
│ │ │ │ │ │ ├── ShellCommand.java
│ │ │ │ │ │ ├── UninstallExtensionArgs.java
│ │ │ │ │ │ ├── UninstallExtensionCommand.java
│ │ │ │ │ │ ├── UpdateArgs.java
│ │ │ │ │ │ ├── UpdateCommand.java
│ │ │ │ │ │ ├── UpgradePropsArgs.java
│ │ │ │ │ │ ├── UpgradePropsCommand.java
│ │ │ │ │ │ ├── VersionArgs.java
│ │ │ │ │ │ ├── VersionCommand.java
│ │ │ │ │ │ ├── WatchArgs.java
│ │ │ │ │ │ ├── WatchCommand.java
│ │ │ │ │ │ └── validator
│ │ │ │ │ │ │ ├── JsProjectTargetValidator.java
│ │ │ │ │ │ │ ├── JsProjectTypeValidator.java
│ │ │ │ │ │ │ ├── LiferayDefaultVersionValidator.java
│ │ │ │ │ │ │ ├── LiferayMoreVersionValidator.java
│ │ │ │ │ │ │ ├── ParameterDepdendencyValidator.java
│ │ │ │ │ │ │ ├── ParameterDependenciesValidator.java
│ │ │ │ │ │ │ ├── ParameterPossibleValues.java
│ │ │ │ │ │ │ ├── ParameterValidator.java
│ │ │ │ │ │ │ ├── ParametersValidator.java
│ │ │ │ │ │ │ ├── TemplateNameValidator.java
│ │ │ │ │ │ │ ├── UpdateArgsValidator.java
│ │ │ │ │ │ │ ├── ValidatorFunctionPredicate.java
│ │ │ │ │ │ │ └── ValidatorSupplier.java
│ │ │ │ │ ├── gradle
│ │ │ │ │ │ ├── GradleExec.java
│ │ │ │ │ │ ├── GradleExecutionException.java
│ │ │ │ │ │ ├── GradleTooling.java
│ │ │ │ │ │ ├── GradleWorkspaceProvider.java
│ │ │ │ │ │ ├── LiferayBundleDeployerImpl.java
│ │ │ │ │ │ └── ProcessResult.java
│ │ │ │ │ ├── jmx
│ │ │ │ │ │ ├── IDEConnector.java
│ │ │ │ │ │ ├── JMXBundleDeployer.java
│ │ │ │ │ │ └── JMXLocalConnector.java
│ │ │ │ │ └── util
│ │ │ │ │ │ ├── AnsiLinePrinter.java
│ │ │ │ │ │ ├── ArrayUtil.java
│ │ │ │ │ │ ├── BladeUtil.java
│ │ │ │ │ │ ├── BladeVersions.java
│ │ │ │ │ │ ├── BndProperties.java
│ │ │ │ │ │ ├── BndPropertiesValue.java
│ │ │ │ │ │ ├── CamelCaseUtil.java
│ │ │ │ │ │ ├── CombinedClassLoader.java
│ │ │ │ │ │ ├── Constants.java
│ │ │ │ │ │ ├── CopyDirVisitor.java
│ │ │ │ │ │ ├── FileUtil.java
│ │ │ │ │ │ ├── FileWatcher.java
│ │ │ │ │ │ ├── LinkDownloader.java
│ │ │ │ │ │ ├── ListUtil.java
│ │ │ │ │ │ ├── NodeUtil.java
│ │ │ │ │ │ ├── OSDetector.java
│ │ │ │ │ │ ├── Pair.java
│ │ │ │ │ │ ├── ProcessesUtil.java
│ │ │ │ │ │ ├── ProductInfo.java
│ │ │ │ │ │ ├── Prompter.java
│ │ │ │ │ │ ├── ReleaseUtil.java
│ │ │ │ │ │ ├── ServerUtil.java
│ │ │ │ │ │ ├── StringPool.java
│ │ │ │ │ │ └── StringUtil.java
│ │ │ │ └── gradle
│ │ │ │ │ └── model
│ │ │ │ │ └── GradleDependency.java
│ │ │ │ └── properties
│ │ │ │ └── locator
│ │ │ │ ├── ConfigurationClassData.java
│ │ │ │ ├── PropertiesLocator.java
│ │ │ │ ├── PropertiesLocatorArgs.java
│ │ │ │ ├── PropertyProblem.java
│ │ │ │ └── PropertyProblemType.java
│ │ └── resources
│ │ │ ├── META-INF
│ │ │ └── services
│ │ │ │ ├── com.liferay.blade.cli.WorkspaceProvider
│ │ │ │ └── com.liferay.blade.cli.command.BaseCommand
│ │ │ ├── com
│ │ │ └── liferay
│ │ │ │ └── blade
│ │ │ │ └── cli
│ │ │ │ ├── gradle
│ │ │ │ ├── dep.gradle
│ │ │ │ └── init.gradle
│ │ │ │ └── util
│ │ │ │ └── dependencies
│ │ │ │ ├── liferay-cli.json
│ │ │ │ ├── yo-10.x.json
│ │ │ │ ├── yo-8.x.json
│ │ │ │ └── yo-9.x.json
│ │ │ ├── jpm_install.bat
│ │ │ ├── migrated-dependencies-7.1.properties
│ │ │ ├── migrated-dependencies-7.2.properties
│ │ │ ├── migrated-dependencies-7.3.properties
│ │ │ ├── migrated-dependencies-7.4.properties
│ │ │ ├── portal-dependency-jars-62.properties
│ │ │ └── release-api
│ │ │ ├── 7.0.10.x-versions.txt
│ │ │ ├── 7.0.x-versions.txt
│ │ │ ├── 7.1.10.x-versions.txt
│ │ │ ├── 7.1.x-versions.txt
│ │ │ ├── 7.2.10.x-versions.txt
│ │ │ ├── 7.2.x-versions.txt
│ │ │ ├── 7.3.10.x-versions.txt
│ │ │ ├── 7.3.x-versions.txt
│ │ │ ├── 7.4.10.x-versions.txt
│ │ │ ├── 7.4.11.x-versions.txt
│ │ │ ├── 7.4.13.x-versions.txt
│ │ │ └── 7.4.x-versions.txt
│ └── test
│ │ ├── java
│ │ └── com
│ │ │ └── liferay
│ │ │ ├── blade
│ │ │ └── cli
│ │ │ │ ├── BladeCliTest.java
│ │ │ │ ├── BladeIOTest.java
│ │ │ │ ├── BladeTest.java
│ │ │ │ ├── BladeTestResults.java
│ │ │ │ ├── DownloadFromGithubTest.java
│ │ │ │ ├── ExtensionsTest.java
│ │ │ │ ├── FileWatcherTest.java
│ │ │ │ ├── GradleRunnerUtil.java
│ │ │ │ ├── PrompterTest.java
│ │ │ │ ├── StringTestUtil.java
│ │ │ │ ├── TargetPlatformTest.java
│ │ │ │ ├── TestUtil.java
│ │ │ │ ├── UtilTest.java
│ │ │ │ ├── XMLTestUtil.java
│ │ │ │ ├── ZipSlipTest.java
│ │ │ │ ├── aether
│ │ │ │ └── AetherClientTest.java
│ │ │ │ ├── command
│ │ │ │ ├── ConvertCommandTest.java
│ │ │ │ ├── ConvertServiceBuilderCommandTest.java
│ │ │ │ ├── ConvertThemeCommandTest.java
│ │ │ │ ├── CreateCommandTest.java
│ │ │ │ ├── DeployCommandTest.java
│ │ │ │ ├── HelpCommandTest.java
│ │ │ │ ├── InitCommandTest.java
│ │ │ │ ├── InstallExtensionCommandTest.java
│ │ │ │ ├── JavaProcess.java
│ │ │ │ ├── JavaProcesses.java
│ │ │ │ ├── SamplesCommandTest.java
│ │ │ │ ├── ServerStartCommandTest.java
│ │ │ │ ├── UninstallExtensionCommandTest.java
│ │ │ │ └── validator
│ │ │ │ │ ├── LiferayDefaultVersionValidatorTest.java
│ │ │ │ │ └── LiferayMoreVersionValidatorTest.java
│ │ │ │ └── gradle
│ │ │ │ ├── GradleExecTest.java
│ │ │ │ ├── GradleToolingTest.java
│ │ │ │ └── WorkspaceProvideGradleTest.java
│ │ │ └── properties
│ │ │ └── locator
│ │ │ └── PropertiesLocatorTest.java
│ │ └── resources
│ │ └── com
│ │ └── liferay
│ │ └── blade
│ │ └── cli
│ │ ├── dependencies
│ │ ├── action.command.portlet.jar
│ │ └── jsp-war-portlet.war
│ │ ├── no-zip-slip.zip
│ │ └── zip-slip.zip
├── test-resources
│ ├── 6.2-fix-pack-131
│ │ └── portal.properties
│ ├── checkProperties.out
│ ├── localrepo
│ │ └── com
│ │ │ └── liferay
│ │ │ └── com.liferay.gradle.plugins.workspace
│ │ │ ├── 1.0.8
│ │ │ ├── com.liferay.gradle.plugins.workspace-1.0.8-sources.jar
│ │ │ ├── com.liferay.gradle.plugins.workspace-1.0.8-sources.jar.md5
│ │ │ └── com.liferay.gradle.plugins.workspace-1.0.8-sources.jar.sha1
│ │ │ ├── maven-metadata.xml
│ │ │ ├── maven-metadata.xml.md5
│ │ │ └── maven-metadata.xml.sha1
│ ├── originalProperties.properties
│ ├── projects
│ │ ├── invalid-plugins-sdk-path.zip
│ │ ├── plugins-sdk-with-git.zip
│ │ ├── tasks-plugins-sdk
│ │ │ ├── build.properties
│ │ │ ├── hooks
│ │ │ │ └── build.xml
│ │ │ └── portlets
│ │ │ │ ├── build.xml
│ │ │ │ └── tasks-portlet
│ │ │ │ ├── build.xml
│ │ │ │ └── docroot
│ │ │ │ ├── WEB-INF
│ │ │ │ ├── .gitignore
│ │ │ │ ├── client
│ │ │ │ │ └── tms-portlet-client.jar
│ │ │ │ ├── liferay-display.xml
│ │ │ │ ├── liferay-hook.xml
│ │ │ │ ├── liferay-plugin-package.properties
│ │ │ │ ├── liferay-portlet.xml
│ │ │ │ ├── portlet.xml
│ │ │ │ ├── service.xml
│ │ │ │ ├── service
│ │ │ │ │ └── com
│ │ │ │ │ │ └── liferay
│ │ │ │ │ │ └── tasks
│ │ │ │ │ │ ├── exception
│ │ │ │ │ │ ├── NoSuchTasksEntryException.java
│ │ │ │ │ │ ├── TasksEntryDueDateException.java
│ │ │ │ │ │ └── TasksEntryTitleException.java
│ │ │ │ │ │ ├── model
│ │ │ │ │ │ ├── TasksEntry.java
│ │ │ │ │ │ ├── TasksEntryClp.java
│ │ │ │ │ │ ├── TasksEntryConstants.java
│ │ │ │ │ │ ├── TasksEntryModel.java
│ │ │ │ │ │ ├── TasksEntrySoap.java
│ │ │ │ │ │ └── TasksEntryWrapper.java
│ │ │ │ │ │ └── service
│ │ │ │ │ │ ├── ClpSerializer.java
│ │ │ │ │ │ ├── TasksEntryLocalService.java
│ │ │ │ │ │ ├── TasksEntryLocalServiceClp.java
│ │ │ │ │ │ ├── TasksEntryLocalServiceUtil.java
│ │ │ │ │ │ ├── TasksEntryLocalServiceWrapper.java
│ │ │ │ │ │ ├── TasksEntryService.java
│ │ │ │ │ │ ├── TasksEntryServiceClp.java
│ │ │ │ │ │ ├── TasksEntryServiceUtil.java
│ │ │ │ │ │ ├── TasksEntryServiceWrapper.java
│ │ │ │ │ │ ├── messaging
│ │ │ │ │ │ └── ClpMessageListener.java
│ │ │ │ │ │ ├── permission
│ │ │ │ │ │ ├── TasksEntryPermission.java
│ │ │ │ │ │ └── TasksPermission.java
│ │ │ │ │ │ └── persistence
│ │ │ │ │ │ ├── TasksEntryFinder.java
│ │ │ │ │ │ ├── TasksEntryFinderUtil.java
│ │ │ │ │ │ ├── TasksEntryPersistence.java
│ │ │ │ │ │ └── TasksEntryUtil.java
│ │ │ │ ├── sql
│ │ │ │ │ ├── indexes.sql
│ │ │ │ │ ├── sequences.sql
│ │ │ │ │ └── tables.sql
│ │ │ │ ├── src
│ │ │ │ │ ├── META-INF
│ │ │ │ │ │ ├── portlet-hbm.xml
│ │ │ │ │ │ ├── portlet-model-hints.xml
│ │ │ │ │ │ └── portlet-spring.xml
│ │ │ │ │ ├── com
│ │ │ │ │ │ └── liferay
│ │ │ │ │ │ │ └── tasks
│ │ │ │ │ │ │ ├── asset
│ │ │ │ │ │ │ ├── TasksEntryAssetRenderer.java
│ │ │ │ │ │ │ └── TasksEntryAssetRendererFactory.java
│ │ │ │ │ │ │ ├── model
│ │ │ │ │ │ │ └── impl
│ │ │ │ │ │ │ │ ├── TasksEntryBaseImpl.java
│ │ │ │ │ │ │ │ ├── TasksEntryCacheModel.java
│ │ │ │ │ │ │ │ ├── TasksEntryImpl.java
│ │ │ │ │ │ │ │ └── TasksEntryModelImpl.java
│ │ │ │ │ │ │ ├── portlet
│ │ │ │ │ │ │ ├── TasksPortlet.java
│ │ │ │ │ │ │ └── tasks-user-notification-definitions.xml
│ │ │ │ │ │ │ ├── service
│ │ │ │ │ │ │ ├── base
│ │ │ │ │ │ │ │ ├── TasksEntryLocalServiceBaseImpl.java
│ │ │ │ │ │ │ │ ├── TasksEntryLocalServiceClpInvoker.java
│ │ │ │ │ │ │ │ ├── TasksEntryServiceBaseImpl.java
│ │ │ │ │ │ │ │ └── TasksEntryServiceClpInvoker.java
│ │ │ │ │ │ │ ├── http
│ │ │ │ │ │ │ │ ├── TasksEntryServiceHttp.java
│ │ │ │ │ │ │ │ └── TasksEntryServiceSoap.java
│ │ │ │ │ │ │ ├── impl
│ │ │ │ │ │ │ │ ├── TasksEntryLocalServiceImpl.java
│ │ │ │ │ │ │ │ └── TasksEntryServiceImpl.java
│ │ │ │ │ │ │ └── persistence
│ │ │ │ │ │ │ │ └── impl
│ │ │ │ │ │ │ │ ├── TasksEntryFinderBaseImpl.java
│ │ │ │ │ │ │ │ ├── TasksEntryFinderImpl.java
│ │ │ │ │ │ │ │ └── TasksEntryPersistenceImpl.java
│ │ │ │ │ │ │ ├── social
│ │ │ │ │ │ │ └── TasksActivityKeys.java
│ │ │ │ │ │ │ └── util
│ │ │ │ │ │ │ ├── TasksPortletKeys.java
│ │ │ │ │ │ │ └── WebKeys.java
│ │ │ │ │ ├── content
│ │ │ │ │ │ ├── Language.properties
│ │ │ │ │ │ ├── Language_ar.properties
│ │ │ │ │ │ ├── Language_bg.properties
│ │ │ │ │ │ ├── Language_ca.properties
│ │ │ │ │ │ ├── Language_cs.properties
│ │ │ │ │ │ ├── Language_da.properties
│ │ │ │ │ │ ├── Language_de.properties
│ │ │ │ │ │ ├── Language_el.properties
│ │ │ │ │ │ ├── Language_en.properties
│ │ │ │ │ │ ├── Language_es.properties
│ │ │ │ │ │ ├── Language_et.properties
│ │ │ │ │ │ ├── Language_eu.properties
│ │ │ │ │ │ ├── Language_fa.properties
│ │ │ │ │ │ ├── Language_fi.properties
│ │ │ │ │ │ ├── Language_fr.properties
│ │ │ │ │ │ ├── Language_fr_CA.properties
│ │ │ │ │ │ ├── Language_gl.properties
│ │ │ │ │ │ ├── Language_hi_IN.properties
│ │ │ │ │ │ ├── Language_hr.properties
│ │ │ │ │ │ ├── Language_hu.properties
│ │ │ │ │ │ ├── Language_in.properties
│ │ │ │ │ │ ├── Language_it.properties
│ │ │ │ │ │ ├── Language_iw.properties
│ │ │ │ │ │ ├── Language_ja.properties
│ │ │ │ │ │ ├── Language_ko.properties
│ │ │ │ │ │ ├── Language_lo.properties
│ │ │ │ │ │ ├── Language_lt.properties
│ │ │ │ │ │ ├── Language_nb.properties
│ │ │ │ │ │ ├── Language_nl.properties
│ │ │ │ │ │ ├── Language_nl_BE.properties
│ │ │ │ │ │ ├── Language_pl.properties
│ │ │ │ │ │ ├── Language_pt_BR.properties
│ │ │ │ │ │ ├── Language_pt_PT.properties
│ │ │ │ │ │ ├── Language_ro.properties
│ │ │ │ │ │ ├── Language_ru.properties
│ │ │ │ │ │ ├── Language_sk.properties
│ │ │ │ │ │ ├── Language_sl.properties
│ │ │ │ │ │ ├── Language_sr_RS.properties
│ │ │ │ │ │ ├── Language_sr_RS_latin.properties
│ │ │ │ │ │ ├── Language_sv.properties
│ │ │ │ │ │ ├── Language_tr.properties
│ │ │ │ │ │ ├── Language_uk.properties
│ │ │ │ │ │ ├── Language_vi.properties
│ │ │ │ │ │ ├── Language_zh_CN.properties
│ │ │ │ │ │ └── Language_zh_TW.properties
│ │ │ │ │ ├── custom-sql
│ │ │ │ │ │ └── default.xml
│ │ │ │ │ ├── portlet.properties
│ │ │ │ │ ├── resource-actions
│ │ │ │ │ │ └── default.xml
│ │ │ │ │ └── service.properties
│ │ │ │ └── web.xml
│ │ │ │ ├── init.jsp
│ │ │ │ ├── tasks
│ │ │ │ ├── asset
│ │ │ │ │ ├── abstract.jsp
│ │ │ │ │ └── full_content.jsp
│ │ │ │ ├── css
│ │ │ │ │ ├── .sass-cache
│ │ │ │ │ │ ├── main.css
│ │ │ │ │ │ └── main_rtl.css
│ │ │ │ │ └── main.css
│ │ │ │ ├── edit_task.jsp
│ │ │ │ ├── icon.png
│ │ │ │ ├── images
│ │ │ │ │ ├── priority_high.png
│ │ │ │ │ ├── priority_low.png
│ │ │ │ │ ├── priority_normal.png
│ │ │ │ │ ├── selected.png
│ │ │ │ │ └── unselected.png
│ │ │ │ ├── js
│ │ │ │ │ └── main.js
│ │ │ │ ├── tabs1.jspf
│ │ │ │ ├── view.jsp
│ │ │ │ ├── view_comments.jspf
│ │ │ │ ├── view_task.jsp
│ │ │ │ ├── view_tasks.jsp
│ │ │ │ └── view_tasks_filter.jspf
│ │ │ │ └── upcoming_tasks
│ │ │ │ └── view.jsp
│ │ └── testws1
│ │ │ ├── build.gradle
│ │ │ ├── configs
│ │ │ ├── common
│ │ │ │ └── .touch
│ │ │ ├── dev
│ │ │ │ └── portal-ext.properties
│ │ │ ├── local
│ │ │ │ └── portal-ext.properties
│ │ │ ├── prod
│ │ │ │ ├── osgi
│ │ │ │ │ └── configs
│ │ │ │ │ │ └── com.liferay.portal.search.elasticsearch.configuration.ElasticsearchConfiguration.cfg
│ │ │ │ └── portal-ext.properties
│ │ │ └── uat
│ │ │ │ ├── osgi
│ │ │ │ └── configs
│ │ │ │ │ └── com.liferay.portal.search.elasticsearch.configuration.ElasticsearchConfiguration.cfg
│ │ │ │ └── portal-ext.properties
│ │ │ ├── gradle.properties
│ │ │ ├── modules
│ │ │ ├── .touch
│ │ │ └── testportlet
│ │ │ │ ├── .gitignore
│ │ │ │ ├── bnd.bnd
│ │ │ │ ├── build.gradle
│ │ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── java
│ │ │ │ └── testportlet
│ │ │ │ │ └── portlet
│ │ │ │ │ └── TestportletPortlet.java
│ │ │ │ └── resources
│ │ │ │ ├── META-INF
│ │ │ │ └── resources
│ │ │ │ │ ├── init.jsp
│ │ │ │ │ └── view.jsp
│ │ │ │ └── content
│ │ │ │ └── Language.properties
│ │ │ ├── settings.gradle
│ │ │ └── themes
│ │ │ └── .touch
│ └── upgradeProperties.out
└── test.file
├── copyright.txt
├── extensions
├── README.markdown
├── bad-command
│ ├── bnd.bnd
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── liferay
│ │ │ └── extensions
│ │ │ └── bad
│ │ │ └── command
│ │ │ ├── BadArgs.java
│ │ │ └── BadCommand.java
│ │ └── resources
│ │ └── META-INF
│ │ └── services
│ │ └── com.liferay.blade.cli.command.BaseCommand
├── build.gradle
├── maven-profile
│ ├── bnd.bnd
│ ├── build.gradle
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── liferay
│ │ │ │ └── blade
│ │ │ │ └── extensions
│ │ │ │ └── maven
│ │ │ │ └── profile
│ │ │ │ ├── BuildServiceArgsMaven.java
│ │ │ │ ├── BuildServiceCommandMaven.java
│ │ │ │ ├── CreateCommandMaven.java
│ │ │ │ ├── DeployCommandMaven.java
│ │ │ │ ├── InitCommandMaven.java
│ │ │ │ ├── LocalServerMaven.java
│ │ │ │ ├── MavenWorkspaceProvider.java
│ │ │ │ ├── ServerInitCommandMaven.java
│ │ │ │ ├── ServerRunCommandMaven.java
│ │ │ │ ├── ServerStartCommandMaven.java
│ │ │ │ ├── ServerStopCommandMaven.java
│ │ │ │ └── internal
│ │ │ │ ├── MavenExecutor.java
│ │ │ │ └── MavenUtil.java
│ │ └── resources
│ │ │ └── META-INF
│ │ │ └── services
│ │ │ ├── com.liferay.blade.cli.WorkspaceProvider
│ │ │ └── com.liferay.blade.cli.command.BaseCommand
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── liferay
│ │ └── blade
│ │ └── extensions
│ │ └── maven
│ │ └── profile
│ │ ├── BuildServiceCommandMavenTest.java
│ │ ├── CreateCommandMavenTest.java
│ │ ├── DeployCommandMavenTest.java
│ │ ├── InitCommandMavenTest.java
│ │ ├── MavenTestUtil.java
│ │ ├── RetryRule.java
│ │ ├── ServerCommandsMavenTest.java
│ │ ├── ServerStartCommandMavenTest.java
│ │ └── XMLTestUtil.java
├── project-templates-js-theme
│ ├── bnd.bnd
│ ├── build.gradle
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── liferay
│ │ │ │ └── project
│ │ │ │ └── templates
│ │ │ │ └── js
│ │ │ │ └── theme
│ │ │ │ └── internal
│ │ │ │ └── JSThemeProjectTemplateCustomizer.java
│ │ └── resources
│ │ │ ├── META-INF
│ │ │ ├── maven
│ │ │ │ └── archetype-metadata.xml
│ │ │ └── services
│ │ │ │ └── com.liferay.project.templates.extensions.ProjectTemplateCustomizer
│ │ │ └── archetype-resources
│ │ │ ├── build.gradle
│ │ │ ├── config.json
│ │ │ ├── gitignore
│ │ │ └── pom.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── liferay
│ │ └── project
│ │ └── templates
│ │ └── js
│ │ └── theme
│ │ └── JSThemeProjectTemplateTest.java
├── project-templates-js-widget
│ ├── bnd.bnd
│ ├── build.gradle
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── liferay
│ │ │ │ └── project
│ │ │ │ └── templates
│ │ │ │ └── js
│ │ │ │ └── widget
│ │ │ │ └── internal
│ │ │ │ ├── JSWidgetProjectTemplateCustomizer.java
│ │ │ │ └── JSWidgetProjectTemplatesArgsExt.java
│ │ └── resources
│ │ │ ├── META-INF
│ │ │ ├── archetype-post-generate.groovy
│ │ │ ├── maven
│ │ │ │ └── archetype-metadata.xml
│ │ │ └── services
│ │ │ │ ├── com.liferay.project.templates.extensions.ProjectTemplateCustomizer
│ │ │ │ └── com.liferay.project.templates.extensions.ProjectTemplatesArgsExt
│ │ │ ├── archetype-resources
│ │ │ ├── build.gradle
│ │ │ ├── gitignore
│ │ │ └── pom.xml
│ │ │ └── config.json
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── liferay
│ │ └── project
│ │ └── templates
│ │ └── js
│ │ └── widget
│ │ └── JSWidgetProjectTemplateTest.java
├── project-templates-npm-angular-portlet
│ ├── bnd.bnd
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── liferay
│ │ │ └── project
│ │ │ └── templates
│ │ │ └── npm
│ │ │ └── angular
│ │ │ └── portlet
│ │ │ └── internal
│ │ │ └── NPMAngularPortletProjectTemplateCustomizer.java
│ │ └── resources
│ │ ├── META-INF
│ │ ├── archetype-post-generate.groovy
│ │ ├── maven
│ │ │ └── archetype-metadata.xml
│ │ └── services
│ │ │ └── com.liferay.project.templates.extensions.ProjectTemplateCustomizer
│ │ └── archetype-resources
│ │ ├── .babelrc
│ │ ├── .npmbundlerrc
│ │ ├── bnd.bnd
│ │ ├── build.gradle
│ │ ├── gitignore
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── pom.xml
│ │ ├── src
│ │ └── main
│ │ │ ├── java
│ │ │ ├── constants
│ │ │ │ └── __className__PortletKeys.java
│ │ │ └── portlet
│ │ │ │ └── __className__Portlet.java
│ │ │ └── resources
│ │ │ ├── META-INF
│ │ │ └── resources
│ │ │ │ ├── init.jsp
│ │ │ │ ├── lib
│ │ │ │ ├── angular-loader.ts
│ │ │ │ ├── app
│ │ │ │ │ ├── app.component.ts
│ │ │ │ │ ├── app.module.ts
│ │ │ │ │ └── dynamic.loader.ts
│ │ │ │ └── main.ts
│ │ │ │ └── view.jsp
│ │ │ └── content
│ │ │ └── Language.properties
│ │ └── tsconfig.json
├── project-templates-social-bookmark
│ ├── bnd.bnd
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ └── resources
│ │ ├── META-INF
│ │ ├── archetype-post-generate.groovy
│ │ └── maven
│ │ │ └── archetype-metadata.xml
│ │ └── archetype-resources
│ │ ├── bnd.bnd
│ │ ├── build.gradle
│ │ ├── gitignore
│ │ ├── pom.xml
│ │ └── src
│ │ └── main
│ │ ├── java
│ │ └── social
│ │ │ └── bookmark
│ │ │ └── __className__SocialBookmark.java
│ │ └── resources
│ │ ├── META-INF
│ │ └── resources
│ │ │ ├── icons.svg
│ │ │ ├── init.jsp
│ │ │ └── page.jsp
│ │ └── content
│ │ └── Language.properties
├── remote-deploy-command
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── liferay
│ │ │ └── blade
│ │ │ └── extensions
│ │ │ └── remote
│ │ │ └── deploy
│ │ │ └── command
│ │ │ ├── RemoteDeployArgs.java
│ │ │ └── RemoteDeployCommand.java
│ │ └── resources
│ │ └── META-INF
│ │ └── services
│ │ └── com.liferay.blade.cli.command.BaseCommand
├── sample-command
│ ├── bnd.bnd
│ ├── build.gradle
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── liferay
│ │ │ │ └── extensions
│ │ │ │ └── sample
│ │ │ │ └── command
│ │ │ │ ├── Hello.java
│ │ │ │ ├── HelloArgs.java
│ │ │ │ ├── HelloMaven.java
│ │ │ │ └── util
│ │ │ │ └── HelloUtil.java
│ │ └── resources
│ │ │ └── META-INF
│ │ │ └── services
│ │ │ └── com.liferay.blade.cli.command.BaseCommand
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── liferay
│ │ └── extensions
│ │ └── sample
│ │ └── command
│ │ └── SampleCommandsTest.java
├── sample-profile
│ ├── bnd.bnd
│ ├── build.gradle
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── liferay
│ │ │ │ └── extensions
│ │ │ │ └── sample
│ │ │ │ └── profile
│ │ │ │ ├── NewArgs.java
│ │ │ │ ├── NewCommand.java
│ │ │ │ ├── OverriddenArgs.java
│ │ │ │ └── OverriddenCommand.java
│ │ └── resources
│ │ │ └── META-INF
│ │ │ └── services
│ │ │ └── com.liferay.blade.cli.command.BaseCommand
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── liferay
│ │ └── extensions
│ │ └── sample
│ │ └── profile
│ │ └── ProfilesTest.java
├── sample-template
│ ├── bnd.bnd
│ ├── build.gradle
│ └── src
│ │ ├── main
│ │ └── resources
│ │ │ ├── META-INF
│ │ │ ├── archetype-post-generate.groovy
│ │ │ └── maven
│ │ │ │ └── archetype-metadata.xml
│ │ │ └── archetype-resources
│ │ │ ├── bnd.bnd
│ │ │ ├── build.gradle
│ │ │ ├── gitignore
│ │ │ ├── pom.xml
│ │ │ └── src
│ │ │ └── main
│ │ │ ├── java
│ │ │ ├── constants
│ │ │ │ └── __className__PortletKeys.java
│ │ │ └── portlet
│ │ │ │ └── __className__Portlet.java
│ │ │ └── resources
│ │ │ ├── META-INF
│ │ │ └── resources
│ │ │ │ ├── init.jsp
│ │ │ │ └── view.jsp
│ │ │ └── content
│ │ │ └── Language.properties
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── liferay
│ │ └── project
│ │ └── templates
│ │ └── sample
│ │ └── SampleTemplatesTest.java
└── sample-workspace-template
│ ├── bnd.bnd
│ ├── build.gradle
│ └── src
│ ├── main
│ └── resources
│ │ ├── META-INF
│ │ ├── archetype-post-generate.groovy
│ │ └── maven
│ │ │ └── archetype-metadata.xml
│ │ └── archetype-resources
│ │ ├── build.gradle
│ │ ├── configs
│ │ ├── common
│ │ │ └── .touch
│ │ ├── dev
│ │ │ └── portal-ext.properties
│ │ ├── local
│ │ │ └── portal-ext.properties
│ │ ├── prod
│ │ │ ├── osgi
│ │ │ │ └── configs
│ │ │ │ │ └── com.liferay.portal.search.elasticsearch.configuration.ElasticsearchConfiguration.cfg
│ │ │ └── portal-ext.properties
│ │ └── uat
│ │ │ ├── osgi
│ │ │ └── configs
│ │ │ │ └── com.liferay.portal.search.elasticsearch.configuration.ElasticsearchConfiguration.cfg
│ │ │ └── portal-ext.properties
│ │ ├── gitignore
│ │ ├── gradle-local.properties
│ │ ├── gradle.properties
│ │ ├── modules
│ │ └── pom.xml
│ │ ├── pom.xml
│ │ ├── settings.gradle
│ │ ├── themes
│ │ └── pom.xml
│ │ └── wars
│ │ └── pom.xml
│ └── test
│ └── java
│ └── com
│ └── liferay
│ └── project
│ └── templates
│ └── sample
│ └── SampleWorkspaceTemplateTest.java
├── gradle-tooling
├── build.gradle
└── src
│ └── main
│ └── java
│ └── com
│ └── liferay
│ └── blade
│ └── gradle
│ └── tooling
│ ├── DefaultModel.java
│ ├── ProjectInfo.java
│ └── ProjectInfoPlugin.java
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── libs
├── com.liferay.project.templates.npm.angular.portlet-1.0.196-SNAPSHOT.jar
├── org.objectweb.asm-6.0.0.jar
├── org.objectweb.asm.analysis-6.0.0.jar
├── org.objectweb.asm.commons-6.0.0.jar
├── org.objectweb.asm.tree-6.0.0.jar
└── org.objectweb.asm.util-6.0.0.jar
├── nexus.sh
├── publish.sh
├── run-tests.bat
├── run-tests.sh
├── settings.gradle
├── source-formatter-suppressions.xml
├── source-formatter.properties
└── tests.zip
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | paths-ignore:
8 | - '*.commits'
9 | - '*.markdown'
10 | - '**/*.markdown'
11 |
12 | env:
13 | LC_ALL: en_US.UTF-8
14 |
15 | jobs:
16 | Publish:
17 | if: (github.repository == 'liferay/liferay-blade-cli')
18 | name: Publish
19 | runs-on: ubuntu-latest
20 | steps:
21 | - name: Checkout
22 | uses: actions/checkout@v1
23 | - name: Set up JDK8
24 | uses: actions/setup-java@v1
25 | with:
26 | java-version: 1.8
27 | - name: Cache
28 | uses: actions/cache@v4
29 | with:
30 | path: ~/.gradle/caches
31 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
32 | restore-keys: |
33 | ${{ runner.os }}-gradle-
34 | - name: Build
35 | env:
36 | GITHUB_CI: "true"
37 | LIFERAY_NEXUS_USERNAME: ${{ secrets.liferay_nexus_username }}
38 | LIFERAY_NEXUS_PASSWORD: ${{ secrets.liferay_nexus_password }}
39 | shell: bash
40 | run: |
41 | ./publish.sh --remote
42 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .classpath
3 | .gradle
4 | .idea
5 | .project
6 | .settings
7 | .vscode
8 | .DS_store
9 | bin
10 | build
11 | mavenRepo
12 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-stretch
2 |
3 | ENV JAVA_TOOL_OPTIONS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Xmx4096m
4 | ENV GRADLE_OPTS -Xmx4G
5 |
6 | CMD ["mkdir", "-p", "/root/.gradle/"]
7 |
8 | COPY . /liferay-blade-cli
9 |
10 | WORKDIR /liferay-blade-cli
11 |
12 | ENTRYPOINT ["./publish.sh"]
13 |
14 | CMD ["snapshots"]
--------------------------------------------------------------------------------
/README.markdown:
--------------------------------------------------------------------------------
1 | # Blade CLI
2 |
3 | The Blade CLI is a command line Java tool that can be used to help bootstrap
4 | Liferay development
5 |
6 | Please refer to the documentation on Liferay Learn for information on how to
7 | download and use Blade CLI:
8 |
9 | https://learn.liferay.com/web/guest/w/dxp/liferay-development/tooling/blade-cli
10 |
11 | ## License
12 |
13 | All source to this project is available under
14 | [Apache 2.0 License](/LICENSE.txt).
--------------------------------------------------------------------------------
/RELEASE.markdown:
--------------------------------------------------------------------------------
1 | # How to Release
2 |
3 | ## Create a stable release
4 |
5 | 1. Create a BLADE jira ticket for the new release
6 |
7 | 1. Create a new branch based on ticket
8 |
9 | 1. Run `gradlew prepareRelease`
10 |
11 | 1. Commit the changes
12 |
13 | 1. Generate changelog`./gradlew -b changelogs-sdk.gradle buildChangelogs`
14 |
15 | 1. Commit the changelog
16 |
17 | 1. Create PR on `liferay/liferay-blade-cli` repo from this branch
18 |
19 | 1. If the PR passes all the tests, merge the PR to master.
20 |
21 | 1. Generate a new tag based on the new version `git tag 4.1.2`
22 |
23 | 1. Push the tags to upstream `git push --tags upstream`
24 |
25 | By merging this PR to master, and since all of the versions of the components are set to stable versions, this will cause the GitHub workflow to release the binaries to nexus which will cause the existing blade CLIs to report a new stable release/version is available and anyone who runs `blade update` will get the new version. See [Create a snapshot release](#create-a-snapshot-release) right after releasing a stable version.
26 |
27 | ## Create a snapshot release
28 |
29 | 1. Create a new branch based for updating to new snapshot release
30 |
31 | 1. Run `gradlew prepareSnapshot`
32 |
33 | 1. Commit the changes using the release ticket
34 |
35 | 1. Create a PR
36 |
37 | 1. If it passes CI, merge the PR
38 |
39 | By merging this PR to master with all the version numbers for components that end in `-SNAPSHOT` this will cause the GitHub workflow to release the binaries for a new snapshot release.
--------------------------------------------------------------------------------
/cli/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .classpath
3 | .gradle
4 | .idea
5 | .project
6 | .settings
7 | .vscode
8 | .DS_store
9 | bin
10 | build
11 | mavenRepo
12 | out/
13 |
--------------------------------------------------------------------------------
/cli/installers/biz.aQute.jpm.run-4.0.0-20201026.162724-24.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/installers/biz.aQute.jpm.run-4.0.0-20201026.162724-24.jar
--------------------------------------------------------------------------------
/cli/installers/global:
--------------------------------------------------------------------------------
1 | curl -sL https://raw.githubusercontent.com/liferay/liferay-blade-cli/master/cli/installers/biz.aQute.jpm.run-4.0.0-20201026.162724-24.jar > tmp.jar && JPM_BIN_DIR=`java -jar tmp.jar -g init | grep -e "Bin[ \t]*dir" | awk '{print $3}'` && rm -f tmp.jar && curl -o bladelatest.jar 'https://repository-cdn.liferay.com/nexus/service/local/artifact/maven/content?r=liferay-public-releases&g=com.liferay.blade&a=com.liferay.blade.cli&v=LATEST' && ${JPM_BIN_DIR}/jpm install -f bladelatest.jar && rm -f bladelatest.jar && echo "blade installed successfully into ${JPM_BIN_DIR}/blade"
--------------------------------------------------------------------------------
/cli/installers/local:
--------------------------------------------------------------------------------
1 | curl -sL https://raw.githubusercontent.com/liferay/liferay-blade-cli/master/cli/installers/biz.aQute.jpm.run-4.0.0-20201026.162724-24.jar > tmp.jar && JPM_BIN_DIR=`java -jar tmp.jar -u init | grep -e "Bin[ \t]*dir" | awk '{print $3}'` && rm -f tmp.jar && curl -o bladelatest.jar 'https://repository-cdn.liferay.com/nexus/service/local/artifact/maven/content?r=liferay-public-releases&g=com.liferay.blade&a=com.liferay.blade.cli&v=LATEST' && ${JPM_BIN_DIR}/jpm install -f bladelatest.jar && rm -f bladelatest.jar && echo "blade installed successfully into ${JPM_BIN_DIR}/blade"
--------------------------------------------------------------------------------
/cli/installers/local_jpm_only:
--------------------------------------------------------------------------------
1 | curl -sL https://raw.githubusercontent.com/liferay/liferay-blade-cli/master/cli/installers/biz.aQute.jpm.run-4.0.0-20201026.162724-24.jar > tmp.jar && \
2 | JPM_BIN_DIR=`java -jar tmp.jar -u init | grep -e "Bin[ \t]*dir" | awk '{print $3}'` && \
3 | rm -f tmp.jar
4 |
--------------------------------------------------------------------------------
/cli/source-formatter-suppressions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/BladeCLIDefaultProvider.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli;
7 |
8 | import com.beust.jcommander.IDefaultProvider;
9 |
10 | import java.util.Arrays;
11 | import java.util.Objects;
12 |
13 | /**
14 | * @author Gregory Amerson
15 | */
16 | public class BladeCLIDefaultProvider implements IDefaultProvider {
17 |
18 | public BladeCLIDefaultProvider(String[] args) {
19 | _args = args;
20 | }
21 |
22 | @Override
23 | public String getDefaultValueFor(String optionName) {
24 | if ((Objects.equals(optionName, "-v") || Objects.equals(optionName, "--version")) && (_args.length > 0) &&
25 | Objects.equals(_args[0], "init") &&
26 | Arrays.stream(
27 | _args
28 | ).filter(
29 | arg -> Objects.equals(arg, "-l") || Objects.equals(arg, "--list")
30 | ).findAny(
31 | ).isPresent()) {
32 |
33 | return "7.4";
34 | }
35 |
36 | return null;
37 | }
38 |
39 | private String[] _args;
40 |
41 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/WorkspaceProvider.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli;
7 |
8 | import com.liferay.blade.cli.command.BaseArgs;
9 |
10 | import java.io.File;
11 |
12 | /**
13 | * @author Gregory Amerson
14 | */
15 | public interface WorkspaceProvider {
16 |
17 | public default String getLiferayVersion(File dir) {
18 | return null;
19 | }
20 |
21 | public default String getProduct(File dir) {
22 | return null;
23 | }
24 |
25 | public default File getWorkspaceDir(BladeCLI blade) {
26 | BaseArgs args = blade.getArgs();
27 |
28 | return getWorkspaceDir(args.getBase());
29 | }
30 |
31 | public File getWorkspaceDir(File dir);
32 |
33 | public default boolean isDependencyManagementEnabled(File dir) {
34 | return false;
35 | }
36 |
37 | public default boolean isWorkspace(BladeCLI blade) {
38 | File dirToCheck;
39 |
40 | if (blade == null) {
41 | dirToCheck = new File(".");
42 |
43 | dirToCheck = dirToCheck.getAbsoluteFile();
44 | }
45 | else {
46 | BaseArgs args = blade.getArgs();
47 |
48 | dirToCheck = args.getBase();
49 | }
50 |
51 | return isWorkspace(dirToCheck);
52 | }
53 |
54 | public boolean isWorkspace(File dir);
55 |
56 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/BaseCommand.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.liferay.blade.cli.BladeCLI;
9 |
10 | /**
11 | * @author Christopher Bryan Boyd
12 | */
13 | public abstract class BaseCommand {
14 |
15 | public BaseCommand() {
16 | }
17 |
18 | public BaseCommand(BladeCLI blade, T args) {
19 | _blade = blade;
20 | _args = args;
21 | }
22 |
23 | public abstract void execute() throws Exception;
24 |
25 | public T getArgs() {
26 | return _args;
27 | }
28 |
29 | public abstract Class getArgsClass();
30 |
31 | public BladeCLI getBladeCLI() {
32 | return _blade;
33 | }
34 |
35 | public ClassLoader getClassLoader() {
36 | return _classLoader;
37 | }
38 |
39 | public void setArgs(BaseArgs commandArgs) {
40 | _args = getArgsClass().cast(commandArgs);
41 | }
42 |
43 | public void setBlade(BladeCLI blade) {
44 | _blade = blade;
45 | }
46 |
47 | public void setClassLoader(ClassLoader classLoader) {
48 | _classLoader = classLoader;
49 | }
50 |
51 | private T _args;
52 | private BladeCLI _blade;
53 | private ClassLoader _classLoader;
54 |
55 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/BladeProfile.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import java.lang.annotation.ElementType;
9 | import java.lang.annotation.Retention;
10 | import java.lang.annotation.RetentionPolicy;
11 | import java.lang.annotation.Target;
12 |
13 | /**
14 | * @author Christopher Bryan Boyd
15 | */
16 | @Retention(RetentionPolicy.RUNTIME)
17 | @Target(ElementType.TYPE)
18 | public @interface BladeProfile {
19 |
20 | String value();
21 |
22 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/CommandType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | /**
9 | * @author David Truong
10 | */
11 | public enum CommandType {
12 |
13 | GLOBAL, HIDDEN, NON_WORKSPACE, WORKSPACE_ONLY
14 |
15 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/DeployArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | /**
12 | * @author Gregory Amerson
13 | */
14 | @Parameters(commandDescription = "Builds and deploys bundles to the Liferay module framework.", commandNames = "deploy")
15 | public class DeployArgs extends BaseArgs {
16 |
17 | public CommandType getCommandType() {
18 | return CommandType.WORKSPACE_ONLY;
19 | }
20 |
21 | public boolean isWatch() {
22 | return _watch;
23 | }
24 |
25 | @Parameter(
26 | description = "Watches the deployed file for changes and will automatically redeploy", names = {"-w", "--watch"}
27 | )
28 | private boolean _watch;
29 |
30 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/GradleWrapperArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | import java.util.ArrayList;
12 | import java.util.List;
13 |
14 | /**
15 | * @author Gregory Amerson
16 | */
17 | @Parameters(
18 | commandDescription = "Execute gradle command using the gradle wrapper if detected. Example: blade gw -- --help",
19 | commandNames = "gw"
20 | )
21 | public class GradleWrapperArgs extends BaseArgs {
22 |
23 | public List getArgs() {
24 | return _args;
25 | }
26 |
27 | public CommandType getCommandType() {
28 | return CommandType.WORKSPACE_ONLY;
29 | }
30 |
31 | @Parameter(description = "[arguments]")
32 | private List _args = new ArrayList<>();
33 |
34 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/GradleWrapperCommand.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.liferay.blade.cli.BladeCLI;
9 | import com.liferay.blade.cli.gradle.GradleExec;
10 |
11 | import java.util.List;
12 | import java.util.stream.Collectors;
13 |
14 | /**
15 | * @author David Truong
16 | * @author Gregory Amerson
17 | */
18 | public class GradleWrapperCommand extends BaseCommand {
19 |
20 | public GradleWrapperCommand() {
21 | }
22 |
23 | @Override
24 | public void execute() throws Exception {
25 | GradleWrapperArgs gradleWrapperArgs = getArgs();
26 |
27 | List args = gradleWrapperArgs.getArgs();
28 |
29 | String gradleCommand = args.stream(
30 | ).collect(
31 | Collectors.joining(" ")
32 | );
33 |
34 | BladeCLI bladeCLI = getBladeCLI();
35 |
36 | GradleExec gradleExec = new GradleExec(bladeCLI);
37 |
38 | BaseArgs baseArgs = bladeCLI.getArgs();
39 |
40 | gradleExec.executeTask(gradleCommand, baseArgs.getBase(), false);
41 | }
42 |
43 | @Override
44 | public Class getArgsClass() {
45 | return GradleWrapperArgs.class;
46 | }
47 |
48 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/HelpArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | /**
12 | * @author Christopher Bryan Boyd
13 | */
14 | @Parameters(commandDescription = "Get help on a specific command", commandNames = "help")
15 | public class HelpArgs extends BaseArgs {
16 |
17 | public String getName() {
18 | return _name;
19 | }
20 |
21 | @Parameter(description = "[name]")
22 | private String _name;
23 |
24 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/HelpCommand.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.liferay.blade.cli.BladeCLI;
9 |
10 | import java.util.Objects;
11 |
12 | /**
13 | * @author Christopher Bryan Boyd
14 | */
15 | public class HelpCommand extends BaseCommand {
16 |
17 | public HelpCommand() {
18 | }
19 |
20 | @Override
21 | public void execute() throws Exception {
22 | String commandName = getArgs().getName();
23 |
24 | BladeCLI bladeCLI = getBladeCLI();
25 |
26 | if (Objects.nonNull(commandName) && (commandName.length() > 0)) {
27 | bladeCLI.printUsage(commandName);
28 | }
29 | else {
30 | bladeCLI.printUsage();
31 | }
32 | }
33 |
34 | @Override
35 | public Class getArgsClass() {
36 | return HelpArgs.class;
37 | }
38 |
39 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/InstallExtensionArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | /**
12 | * @author Christopher Bryan Boyd
13 | */
14 | @Parameters(commandDescription = "Installs an extension into blade.", commandNames = "extension install")
15 | public class InstallExtensionArgs extends BaseArgs {
16 |
17 | public String getPath() {
18 | return _path;
19 | }
20 |
21 | @Parameter(description = "[path]", required = true)
22 | private String _path;
23 |
24 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/ListProjectTemplatesArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameters;
9 |
10 | /**
11 | * @author Christopher Bryan Boyd
12 | */
13 | @Parameters(commandDescription = "List all available project templates.", commandNames = "create -l", hidden = true)
14 | public class ListProjectTemplatesArgs extends BaseArgs {
15 |
16 | public CommandType getCommandType() {
17 | return CommandType.HIDDEN;
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/OpenArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | import java.io.File;
12 |
13 | /**
14 | * @author Gregory Amerson
15 | */
16 | @Parameters(commandDescription = "Opens or imports a file or project in Liferay IDE.", commandNames = "open")
17 | public class OpenArgs extends BaseArgs {
18 |
19 | public File getFile() {
20 | return _file;
21 | }
22 |
23 | public String getWorkspace() {
24 | return _workspace;
25 | }
26 |
27 | public void setFile(File file) {
28 | _file = file.getAbsoluteFile();
29 | }
30 |
31 | @Parameter(description = "[file|directory]")
32 | private File _file;
33 |
34 | @Parameter(description = "The workspace to open or import this file or project", names = {"-w", "--workspace"})
35 | private String _workspace;
36 |
37 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/OutputsArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameters;
9 |
10 | /**
11 | * @author Gregory Amerson
12 | */
13 | @Parameters(commandNames = "outputs", hidden = true)
14 | public class OutputsArgs extends BaseArgs {
15 |
16 | public CommandType getCommandType() {
17 | return CommandType.HIDDEN;
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/OutputsCommand.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.liferay.blade.cli.BladeCLI;
9 | import com.liferay.blade.cli.gradle.GradleTooling;
10 | import com.liferay.blade.gradle.tooling.ProjectInfo;
11 |
12 | import java.io.File;
13 |
14 | import java.nio.file.Path;
15 |
16 | import java.util.Map;
17 | import java.util.Set;
18 |
19 | /**
20 | * @author Gregory Amerson
21 | */
22 | public class OutputsCommand extends BaseCommand {
23 |
24 | public OutputsCommand() {
25 | }
26 |
27 | @Override
28 | public void execute() throws Exception {
29 | BladeCLI bladeCLI = getBladeCLI();
30 |
31 | BaseArgs args = bladeCLI.getArgs();
32 |
33 | File base = args.getBase();
34 |
35 | ProjectInfo projectInfo = GradleTooling.loadProjectInfo(base.toPath());
36 |
37 | Map> projectOutputFiles = projectInfo.getProjectOutputFiles();
38 |
39 | for (Map.Entry> entry : projectOutputFiles.entrySet()) {
40 | String projectPath = entry.getKey();
41 |
42 | bladeCLI.out(projectPath);
43 |
44 | Set outputFiles = entry.getValue();
45 |
46 | for (File output : outputFiles) {
47 | Path outputPath = output.toPath();
48 |
49 | bladeCLI.out("\t" + outputPath);
50 | }
51 |
52 | bladeCLI.out("\n");
53 | }
54 | }
55 |
56 | @Override
57 | public Class getArgsClass() {
58 | return OutputsArgs.class;
59 | }
60 |
61 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/SamplesArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | import java.io.File;
12 |
13 | /**
14 | * @author Gregory Amerson
15 | */
16 | @Parameters(commandDescription = "Generate a sample project", commandNames = "samples")
17 | public class SamplesArgs extends BaseArgs {
18 |
19 | public File getDir() {
20 | return _dir;
21 | }
22 |
23 | public String getLiferayVersion() {
24 | return _liferayVersion;
25 | }
26 |
27 | public String getSampleName() {
28 | return _sampleName;
29 | }
30 |
31 | @Parameter(description = "The directory where to create the new project.", names = {"-d", "--dir"})
32 | private File _dir;
33 |
34 | @Parameter(
35 | description = "The version of Liferay to target when downloading the sample project. Available options are 7.0, 7.1. (default 7.1).",
36 | names = {"-v", "--liferay-version"}
37 | )
38 | private String _liferayVersion;
39 |
40 | @Parameter(description = "[name]")
41 | private String _sampleName;
42 |
43 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/SamplesClientExtensionArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | import java.io.File;
12 |
13 | /**
14 | * @author Simon Jiang
15 | */
16 | @Parameters(
17 | commandDescription = "Generate a sample client extension project", commandNames = "samples client-extensions"
18 | )
19 | public class SamplesClientExtensionArgs extends BaseArgs {
20 |
21 | public File getDir() {
22 | return _dir;
23 | }
24 |
25 | public String getSampleName() {
26 | return _sampleName;
27 | }
28 |
29 | public boolean isListAllCientExtensions() {
30 | return _list;
31 | }
32 |
33 | @Parameter(description = "The directory where to create the new client extension project.", names = {"-d", "--dir"})
34 | private File _dir;
35 |
36 | @Parameter(description = "Show all client extension types.", names = {"-l", "--list"})
37 | private boolean _list;
38 |
39 | @Parameter(description = "[name]")
40 | private String _sampleName;
41 |
42 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/SamplesVisitor.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import java.io.IOException;
9 |
10 | import java.nio.file.FileVisitResult;
11 | import java.nio.file.Files;
12 | import java.nio.file.Path;
13 | import java.nio.file.SimpleFileVisitor;
14 | import java.nio.file.attribute.BasicFileAttributes;
15 |
16 | import java.util.Collection;
17 | import java.util.Collections;
18 | import java.util.HashSet;
19 |
20 | /**
21 | * @author Christopher Bryan Boyd
22 | */
23 | public class SamplesVisitor extends SimpleFileVisitor {
24 |
25 | public Collection getPaths() {
26 | return Collections.unmodifiableCollection(_paths);
27 | }
28 |
29 | @Override
30 | public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
31 | super.preVisitDirectory(dir, attrs);
32 |
33 | if (Files.exists(dir.resolve("src"))) {
34 | _paths.add(dir);
35 |
36 | return FileVisitResult.SKIP_SUBTREE;
37 | }
38 |
39 | return FileVisitResult.CONTINUE;
40 | }
41 |
42 | private final Collection _paths = new HashSet<>();
43 |
44 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/ServerInitArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | /**
12 | * @author Christopher Bryan Boyd
13 | */
14 | @Parameters(
15 | commandDescription = "Initializes the Liferay server configured in this workspace project.",
16 | commandNames = "server init"
17 | )
18 | public class ServerInitArgs extends BaseArgs {
19 |
20 | @Override
21 | public CommandType getCommandType() {
22 | return CommandType.WORKSPACE_ONLY;
23 | }
24 |
25 | public String getEnvironment() {
26 | return _environment;
27 | }
28 |
29 | @Parameter(
30 | description = "Set the environment with the settings appropriate for current development.",
31 | names = {"-e", "--environment"}
32 | )
33 | private String _environment;
34 |
35 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/ServerRunArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | /**
12 | * @author Christopher Bryan Boyd
13 | * @author Gregory Amerson
14 | * @author Simon Jiang
15 | */
16 | @Parameters(commandDescription = "Run server defined by your Liferay project", commandNames = "server run")
17 | public class ServerRunArgs extends BaseArgs {
18 |
19 | @Override
20 | public CommandType getCommandType() {
21 | return CommandType.WORKSPACE_ONLY;
22 | }
23 |
24 | public int getDebugPort() {
25 | return _debugPort;
26 | }
27 |
28 | public boolean isDebug() {
29 | return _debug;
30 | }
31 |
32 | public boolean isSuspend() {
33 | return _suspend;
34 | }
35 |
36 | @Parameter(description = "Run server in debug mode", names = {"-d", "--debug"})
37 | private boolean _debug;
38 |
39 | @Parameter(description = "Debug port", names = {"-p", "--port"})
40 | private int _debugPort = -1;
41 |
42 | @Parameter(
43 | description = "When in debug mode, suspend the started server until the debugger is connected",
44 | names = {"-s", "--suspend"}
45 | )
46 | private boolean _suspend = false;
47 |
48 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/ServerStopArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameters;
9 |
10 | /**
11 | * @author Gregory Amerson
12 | */
13 | @Parameters(commandDescription = "Stop server defined by your Liferay project", commandNames = "server stop")
14 | public class ServerStopArgs extends BaseArgs {
15 |
16 | @Override
17 | public CommandType getCommandType() {
18 | return CommandType.WORKSPACE_ONLY;
19 | }
20 |
21 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/ShellArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | import java.util.ArrayList;
12 | import java.util.List;
13 |
14 | /**
15 | * @author Gregory Amerson
16 | */
17 | @Parameters(
18 | commandDescription = "Connects to Liferay and executes gogo command and returns output.", commandNames = "sh"
19 | )
20 | public class ShellArgs extends BaseArgs {
21 |
22 | public List getArgs() {
23 | return _args;
24 | }
25 |
26 | public String getHost() {
27 | return _host;
28 | }
29 |
30 | public int getPort() {
31 | return _port;
32 | }
33 |
34 | @Parameter
35 | private List _args = new ArrayList<>();
36 |
37 | @Parameter(description = "The host to use to connect to gogo shell", names = {"-h", "--host"})
38 | private String _host;
39 |
40 | @Parameter(description = "The port to use to connect to gogo shell", names = {"-p", "--port"})
41 | private int _port;
42 |
43 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/UninstallExtensionArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | /**
12 | * @author Christopher Bryan Boyd
13 | */
14 | @Parameters(commandDescription = "Uninstalls an extension from blade.", commandNames = "extension uninstall")
15 | public class UninstallExtensionArgs extends BaseArgs {
16 |
17 | public String getName() {
18 | return _name;
19 | }
20 |
21 | @Parameter(description = "[name]")
22 | private String _name;
23 |
24 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/UpgradePropsArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | import java.io.File;
12 |
13 | /**
14 | * @author Gregory Amerson
15 | */
16 | @Parameters(
17 | commandDescription = "Analyzes current portal properties for properties that have been moved to OSGi configurations or removed in the target version from 6.x to 7.x versions",
18 | commandNames = "upgradeProps"
19 | )
20 | public class UpgradePropsArgs extends BaseArgs {
21 |
22 | public File getBundleDir() {
23 | return _bundleDir;
24 | }
25 |
26 | public CommandType getCommandType() {
27 | return CommandType.WORKSPACE_ONLY;
28 | }
29 |
30 | public File getOutputFile() {
31 | return _outputFile;
32 | }
33 |
34 | public File getPropertiesFile() {
35 | return _propertiesFile;
36 | }
37 |
38 | @Parameter(description = "Liferay server bundle directory.", names = {"-d", "--bundle-dir"})
39 | private File _bundleDir;
40 |
41 | @Parameter(
42 | description = "If specified, write out report to this file, otherwise uses stdout.",
43 | names = {"-o", "--output-file"}
44 | )
45 | private File _outputFile;
46 |
47 | @Parameter(
48 | description = "Specify existing Liferay 6.x portal-ext.properties file.", names = {"-p", "--properties-file"}
49 | )
50 | private File _propertiesFile;
51 |
52 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/VersionArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | import com.beust.jcommander.Parameters;
9 |
10 | /**
11 | * @author Christopher Boyd
12 | */
13 | @Parameters(commandDescription = "Show version information about blade", commandNames = "version")
14 | public class VersionArgs extends BaseArgs {
15 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/JsProjectTargetValidator.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import com.liferay.blade.cli.command.CreateArgs;
9 | import com.liferay.blade.cli.util.Constants;
10 |
11 | import java.util.Arrays;
12 | import java.util.List;
13 | import java.util.Objects;
14 |
15 | /**
16 | * @author Simon Jiang
17 | */
18 | public class JsProjectTargetValidator implements ValidatorFunctionPredicate {
19 |
20 | @Override
21 | public List apply(CreateArgs t) {
22 | return Arrays.asList(Constants.DEFAULT_POSSIBLE_TARGET_VALUES);
23 | }
24 |
25 | @Override
26 | public boolean test(CreateArgs createArgs) {
27 | if (Objects.equals(createArgs.getTemplate(), "js-widget")) {
28 | boolean jsInteractiveModel = createArgs.isJsInteractiveModel();
29 |
30 | if (jsInteractiveModel) {
31 | return true;
32 | }
33 |
34 | if (Objects.isNull(createArgs.getJsProjectTarget())) {
35 | return false;
36 | }
37 | }
38 |
39 | return true;
40 | }
41 |
42 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/LiferayDefaultVersionValidator.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import com.liferay.blade.cli.util.ReleaseUtil;
9 | import com.liferay.release.util.ReleaseEntry;
10 |
11 | import java.util.List;
12 | import java.util.stream.Collectors;
13 |
14 | /**
15 | * @author Christopher Bryan Boyd
16 | * @author Gregory Amerson
17 | * @author Simon Jiang
18 | */
19 | public class LiferayDefaultVersionValidator extends LiferayMoreVersionValidator {
20 |
21 | @Override
22 | public List get() {
23 | return ReleaseUtil.getReleaseEntryStream(
24 | ).filter(
25 | ReleaseEntry::isPromoted
26 | ).map(
27 | ReleaseEntry::getReleaseKey
28 | ).collect(
29 | Collectors.toList()
30 | );
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/LiferayMoreVersionValidator.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import com.beust.jcommander.ParameterException;
9 |
10 | import com.liferay.blade.cli.util.ReleaseUtil;
11 | import com.liferay.release.util.ReleaseEntry;
12 |
13 | import java.util.List;
14 | import java.util.stream.Collectors;
15 |
16 | /**
17 | * @author Simon Jiang
18 | */
19 | public class LiferayMoreVersionValidator implements ValidatorSupplier {
20 |
21 | @Override
22 | public List get() {
23 | return ReleaseUtil.getReleaseEntryStream(
24 | ).map(
25 | ReleaseEntry::getReleaseKey
26 | ).collect(
27 | Collectors.toList()
28 | );
29 | }
30 |
31 | @Override
32 | public void validate(String name, String value) throws ParameterException {
33 | ReleaseEntry releaseEntry = ReleaseUtil.getReleaseEntry(value);
34 |
35 | if (releaseEntry == null) {
36 | throw new ParameterException(value + " is not a valid value.");
37 | }
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/ParameterDepdendencyValidator.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import java.lang.annotation.ElementType;
9 | import java.lang.annotation.Repeatable;
10 | import java.lang.annotation.Retention;
11 | import java.lang.annotation.RetentionPolicy;
12 | import java.lang.annotation.Target;
13 |
14 | /**
15 | * @author Simon Jiang
16 | */
17 | @Repeatable(ParameterDependenciesValidator.class)
18 | @Retention(RetentionPolicy.RUNTIME)
19 | @Target({ElementType.FIELD, ElementType.METHOD})
20 | public @interface ParameterDepdendencyValidator {
21 |
22 | Class extends ValidatorFunctionPredicate>> value();
23 |
24 | int order();
25 |
26 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/ParameterDependenciesValidator.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import java.lang.annotation.ElementType;
9 | import java.lang.annotation.Retention;
10 | import java.lang.annotation.RetentionPolicy;
11 | import java.lang.annotation.Target;
12 |
13 | /**
14 | * @author Simon Jiang
15 | */
16 | @Retention(RetentionPolicy.RUNTIME)
17 | @Target({ElementType.FIELD, ElementType.METHOD})
18 | public @interface ParameterDependenciesValidator {
19 |
20 | ParameterDepdendencyValidator[] value();
21 |
22 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/ParameterPossibleValues.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import java.lang.annotation.ElementType;
9 | import java.lang.annotation.Retention;
10 | import java.lang.annotation.RetentionPolicy;
11 | import java.lang.annotation.Target;
12 |
13 | import java.util.List;
14 | import java.util.function.Supplier;
15 |
16 | /**
17 | * @author Christopher Bryan Boyd
18 | * @author Simon Jiang
19 | */
20 | @Retention(RetentionPolicy.RUNTIME)
21 | @Target(ElementType.FIELD)
22 | public @interface ParameterPossibleValues {
23 |
24 | Class extends Supplier>> value();
25 |
26 | Class extends Supplier>> more();
27 |
28 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/ParameterValidator.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import java.lang.annotation.ElementType;
9 | import java.lang.annotation.Repeatable;
10 | import java.lang.annotation.Retention;
11 | import java.lang.annotation.RetentionPolicy;
12 | import java.lang.annotation.Target;
13 |
14 | import java.util.function.Predicate;
15 |
16 | /**
17 | * @author Christopher Bryan Boyd
18 | * @author Simon Jiang
19 | */
20 | @Repeatable(ParametersValidator.class)
21 | @Retention(RetentionPolicy.RUNTIME)
22 | @Target(ElementType.TYPE)
23 | public @interface ParameterValidator {
24 |
25 | Class extends Predicate>> value();
26 |
27 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/ParametersValidator.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import java.lang.annotation.ElementType;
9 | import java.lang.annotation.Retention;
10 | import java.lang.annotation.RetentionPolicy;
11 | import java.lang.annotation.Target;
12 |
13 | /**
14 | * @author Simon Jiang
15 | */
16 | @Retention(RetentionPolicy.RUNTIME)
17 | @Target(ElementType.TYPE)
18 | public @interface ParametersValidator {
19 |
20 | ParameterValidator[] value();
21 |
22 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/TemplateNameValidator.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import com.beust.jcommander.ParameterException;
9 |
10 | import com.liferay.blade.cli.BladeCLI;
11 | import com.liferay.blade.cli.util.BladeUtil;
12 |
13 | import java.util.ArrayList;
14 | import java.util.Collection;
15 | import java.util.List;
16 | import java.util.Objects;
17 |
18 | /**
19 | * @author Christopher Bryan Boyd
20 | */
21 | public class TemplateNameValidator implements ValidatorSupplier {
22 |
23 | @Override
24 | public List get() {
25 | try {
26 | return new ArrayList<>(BladeUtil.getTemplateNames(BladeCLI.instance));
27 | }
28 | catch (Exception exception) {
29 | throw new RuntimeException(exception);
30 | }
31 | }
32 |
33 | @Override
34 | public void validate(String name, String value) throws ParameterException {
35 | if (Objects.equals(value, "portlet")) {
36 | value = "mvc-portlet";
37 | }
38 |
39 | Collection possibleValues = get();
40 |
41 | if (!possibleValues.contains(value)) {
42 | throw new ParameterException(value + " is not among the possible values.");
43 | }
44 | }
45 |
46 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/UpdateArgsValidator.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import com.liferay.blade.cli.command.UpdateArgs;
9 |
10 | import java.util.function.Predicate;
11 |
12 | /**
13 | * @author Christopher Bryan Boyd
14 | */
15 | public class UpdateArgsValidator implements Predicate {
16 |
17 | @Override
18 | public boolean test(UpdateArgs updateArgs) {
19 | if (updateArgs.isRelease() && updateArgs.isSnapshots()) {
20 | System.err.println(
21 | "Can only either specify snapshot (-s, --snapshot) or release (-r, --release), not both.");
22 |
23 | return false;
24 | }
25 |
26 | return true;
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/ValidatorFunctionPredicate.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import java.util.List;
9 | import java.util.function.Function;
10 | import java.util.function.Predicate;
11 |
12 | /**
13 | * @author Simon Jiang
14 | */
15 | public interface ValidatorFunctionPredicate extends Function>, Predicate {
16 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/command/validator/ValidatorSupplier.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import com.beust.jcommander.IValueValidator;
9 |
10 | import java.util.List;
11 | import java.util.function.Supplier;
12 |
13 | /**
14 | * @author Christopher Bryan Boyd
15 | */
16 | public interface ValidatorSupplier extends IValueValidator, Supplier> {
17 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/gradle/GradleExecutionException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.gradle;
7 |
8 | /**
9 | * @author Christopher Bryan Boyd
10 | */
11 | public class GradleExecutionException extends RuntimeException {
12 |
13 | public GradleExecutionException(String message, int returnCode) {
14 | super(message);
15 |
16 | _returnCode = returnCode;
17 | }
18 |
19 | public int getReturnCode() {
20 | return _returnCode;
21 | }
22 |
23 | private final int _returnCode;
24 |
25 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/gradle/ProcessResult.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.gradle;
7 |
8 | import java.util.function.Supplier;
9 |
10 | /**
11 | * @author Christopher Bryan Boyd
12 | */
13 | public class ProcessResult implements Supplier {
14 |
15 | public static String getProcessResultOutput(ProcessResult processResult) {
16 | StringBuilder sb = new StringBuilder();
17 |
18 | sb.append(processResult.getError());
19 | sb.append(System.lineSeparator());
20 | sb.append(processResult.getOutput());
21 | sb.append(System.lineSeparator());
22 |
23 | return sb.toString();
24 | }
25 |
26 | public ProcessResult(int returnCode, String output, String error) {
27 | _returnCode = returnCode;
28 | _output = output;
29 | _error = error;
30 | }
31 |
32 | @Override
33 | public String get() {
34 | return getProcessResultOutput(this);
35 | }
36 |
37 | public String getError() {
38 | return _error;
39 | }
40 |
41 | public String getOutput() {
42 | return _output;
43 | }
44 |
45 | public int getResultCode() {
46 | return _returnCode;
47 | }
48 |
49 | @Override
50 | public String toString() {
51 | return get();
52 | }
53 |
54 | private final String _error;
55 | private final String _output;
56 | private final int _returnCode;
57 |
58 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/util/BladeVersions.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.util;
7 |
8 | import java.util.Optional;
9 |
10 | /**
11 | * @author Christopher Bryan Boyd
12 | */
13 | public final class BladeVersions {
14 |
15 | public BladeVersions(
16 | String currentVersion, Optional releaseUpdateVersion, Optional snapshotUpdateVersion) {
17 |
18 | _currentVersion = currentVersion;
19 | _snapshotUpdateVersion = snapshotUpdateVersion;
20 |
21 | _releasedUpdateVersion = releaseUpdateVersion;
22 | }
23 |
24 | public String getCurrentVersion() {
25 | return _currentVersion;
26 | }
27 |
28 | public Optional getReleasedUpdateVersion() {
29 | return _releasedUpdateVersion;
30 | }
31 |
32 | public Optional getSnapshotUpdateVersion() {
33 | return _snapshotUpdateVersion;
34 | }
35 |
36 | private final String _currentVersion;
37 | private final Optional _releasedUpdateVersion;
38 | private final Optional _snapshotUpdateVersion;
39 |
40 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/util/BndPropertiesValue.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.util;
7 |
8 | /**
9 | * @author Simon Jiang
10 | */
11 | public class BndPropertiesValue {
12 |
13 | public BndPropertiesValue() {
14 | }
15 |
16 | public BndPropertiesValue(String value) {
17 | _formatedValue = value;
18 | _originalValue = value;
19 | }
20 |
21 | public BndPropertiesValue(String formatedValue, String originalValue) {
22 | _formatedValue = formatedValue;
23 | _originalValue = originalValue;
24 | }
25 |
26 | public String getFormatedValue() {
27 | return _formatedValue;
28 | }
29 |
30 | public int getKeyIndex() {
31 | return _keyIndex;
32 | }
33 |
34 | public String getOriginalValue() {
35 | return _originalValue;
36 | }
37 |
38 | public boolean isMultiLine() {
39 | return _multiLine;
40 | }
41 |
42 | public void setFormatedValue(String formatedValue) {
43 | _formatedValue = formatedValue;
44 | }
45 |
46 | public void setKeyIndex(int keyIndex) {
47 | _keyIndex = keyIndex;
48 | }
49 |
50 | public void setMultiLine(boolean multiLine) {
51 | _multiLine = multiLine;
52 | }
53 |
54 | public void setOriginalValue(String originalValue) {
55 | _originalValue = originalValue;
56 | }
57 |
58 | private String _formatedValue;
59 | private int _keyIndex;
60 | private boolean _multiLine;
61 | private String _originalValue;
62 |
63 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/util/CamelCaseUtil.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.util;
7 |
8 | /**
9 | * @author Gregory Amerson
10 | */
11 | public class CamelCaseUtil {
12 |
13 | public static String fromCamelCase(String s, char delimiter) {
14 | StringBuilder sb = new StringBuilder();
15 |
16 | boolean upperCase = false;
17 |
18 | for (int i = 0; i < s.length(); i++) {
19 | char c = s.charAt(i);
20 |
21 | if ((i > 0) && Character.isUpperCase(c)) {
22 | if (!upperCase || ((i < (s.length() - 1)) && !Character.isUpperCase(s.charAt(i + 1)))) {
23 | sb.append(delimiter);
24 | }
25 |
26 | c = Character.toLowerCase(c);
27 |
28 | upperCase = true;
29 | }
30 | else {
31 | upperCase = false;
32 | }
33 |
34 | sb.append(c);
35 | }
36 |
37 | return sb.toString();
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/util/Constants.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.util;
7 |
8 | /**
9 | * @author Terry Jia
10 | */
11 | public class Constants {
12 |
13 | public static final String DEFAULT_JAVA_SRC = "src/main/java/";
14 |
15 | public static final String DEFAULT_PLUGINS_SDK_PORTLET_SRC = "docroot/WEB-INF/src/";
16 |
17 | public static final String[] DEFAULT_POSSIBLE_PLATFORM_VALUES = {
18 | "portal-7.4", "dxp-7.4", "portal-7.3", "dxp-7.3", "portal-7.2", "dxp-7.2", "portal-7.1", "dxp-7.1"
19 | };
20 |
21 | public static final String[] DEFAULT_POSSIBLE_PROJECT_TYPE_VALUES = {
22 | "Angular", "Plain JavaScript", "React", "Shared bundle", "Vue.js"
23 | };
24 |
25 | public static final String[] DEFAULT_POSSIBLE_TARGET_VALUES = {
26 | "Liferay Platform Project", "Liferay Remote App Project"
27 | };
28 |
29 | public static final String DEFAULT_RESOURCES_SRC = "src/main/resources/";
30 |
31 | public static final String DEFAULT_WEBAPP_SRC = "src/main/webapp/";
32 |
33 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/util/ListUtil.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.util;
7 |
8 | import java.util.ArrayList;
9 | import java.util.Arrays;
10 | import java.util.Collection;
11 | import java.util.List;
12 |
13 | /**
14 | * @author Gregory Amerson
15 | */
16 | public class ListUtil {
17 |
18 | public static boolean contains(Collection> collections, Object o) {
19 | if ((collections == null) || (o == null)) {
20 | return false;
21 | }
22 |
23 | return collections.contains(o);
24 | }
25 |
26 | public static List fromArray(E[] array) {
27 | if (ArrayUtil.isEmpty(array)) {
28 | return new ArrayList<>();
29 | }
30 |
31 | return new ArrayList<>(Arrays.asList(array));
32 | }
33 |
34 | public static boolean isEmpty(Object[] array) {
35 | if ((array == null) || (array.length == 0)) {
36 | return true;
37 | }
38 |
39 | return false;
40 | }
41 |
42 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/blade/cli/util/StringPool.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.util;
7 |
8 | /**
9 | * @author Gregory Amerson
10 | */
11 | public class StringPool {
12 |
13 | public static final String ASTERISK = "*";
14 |
15 | public static final String BLANK = "";
16 |
17 | public static final String COLON = ":";
18 |
19 | public static final String COMMA = ",";
20 |
21 | public static final String DASH = "-";
22 |
23 | public static final String DOUBLE_ASTERISK = "**";
24 |
25 | public static final String DOUBLE_QUOTE = "\"";
26 |
27 | public static final char DOUBLE_QUOTE_CHAR = '\"';
28 |
29 | public static final String EMPTY = BLANK;
30 |
31 | public static final String EQUALS = "=";
32 |
33 | public static final String FORWARD_SLASH = "/";
34 |
35 | public static final String PERIOD = ".";
36 |
37 | public static final String SINGLE_QUOTE = "\'";
38 |
39 | public static final char SINGLE_QUOTE_CHAR = '\'';
40 |
41 | public static final String SPACE = " ";
42 |
43 | public static final String UNDERSCORE = "_";
44 |
45 | }
--------------------------------------------------------------------------------
/cli/src/main/java/com/liferay/properties/locator/PropertyProblemType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.properties.locator;
7 |
8 | /**
9 | * @author Gregory Amerson
10 | */
11 | public enum PropertyProblemType {
12 |
13 | MISSING, MODULARIZED, NONE, OSGI, REMOVED
14 |
15 | }
--------------------------------------------------------------------------------
/cli/src/main/resources/META-INF/services/com.liferay.blade.cli.WorkspaceProvider:
--------------------------------------------------------------------------------
1 | com.liferay.blade.cli.gradle.GradleWorkspaceProvider
--------------------------------------------------------------------------------
/cli/src/main/resources/META-INF/services/com.liferay.blade.cli.command.BaseCommand:
--------------------------------------------------------------------------------
1 | com.liferay.blade.cli.command.ConvertCommand
2 | com.liferay.blade.cli.command.CreateCommand
3 | com.liferay.blade.cli.command.DeployCommand
4 | com.liferay.blade.cli.command.GradleWrapperCommand
5 | com.liferay.blade.cli.command.HelpCommand
6 | com.liferay.blade.cli.command.InitCommand
7 | com.liferay.blade.cli.command.InstallExtensionCommand
8 | com.liferay.blade.cli.command.ListProjectTemplatesCommand
9 | com.liferay.blade.cli.command.OpenCommand
10 | com.liferay.blade.cli.command.OutputsCommand
11 | com.liferay.blade.cli.command.UninstallExtensionCommand
12 | com.liferay.blade.cli.command.SamplesCommand
13 | com.liferay.blade.cli.command.SamplesClientExtensionCommand
14 | com.liferay.blade.cli.command.ServerInitCommand
15 | com.liferay.blade.cli.command.ServerRunCommand
16 | com.liferay.blade.cli.command.ServerStartCommand
17 | com.liferay.blade.cli.command.ServerStopCommand
18 | com.liferay.blade.cli.command.ShellCommand
19 | com.liferay.blade.cli.command.UpdateCommand
20 | com.liferay.blade.cli.command.UpgradePropsCommand
21 | com.liferay.blade.cli.command.VersionCommand
22 | com.liferay.blade.cli.command.WatchCommand
--------------------------------------------------------------------------------
/cli/src/main/resources/com/liferay/blade/cli/gradle/dep.gradle:
--------------------------------------------------------------------------------
1 | task copyDep(type: Copy)
2 |
3 | configurations {
4 | download {
5 | transitive = false
6 | }
7 | }
8 |
9 | copyDep {
10 | from configurations.download
11 | into "$buildDir"
12 | }
13 |
14 | dependencies {
15 | download %dep%
16 | }
17 |
18 | repositories {
19 | maven {
20 | url '%repo%'
21 | }
22 | }
--------------------------------------------------------------------------------
/cli/src/main/resources/com/liferay/blade/cli/gradle/init.gradle:
--------------------------------------------------------------------------------
1 | initscript {
2 | dependencies {
3 | classpath files(%files%)
4 | }
5 | }
6 |
7 | allprojects {
8 | apply plugin: com.liferay.blade.gradle.tooling.ProjectInfoPlugin
9 | }
--------------------------------------------------------------------------------
/cli/src/main/resources/com/liferay/blade/cli/util/dependencies/liferay-cli.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "Simon Jiang",
3 | "description": "",
4 | "devDependencies": {
5 | "@liferay/cli": "1.1.0"
6 | },
7 | "license": "LGPL",
8 | "main": "liferay.js",
9 | "name": "liferay-blade-js-cli",
10 | "scripts": {
11 | "build-project": "liferay new"
12 | },
13 | "version": "1.0.0"
14 | }
--------------------------------------------------------------------------------
/cli/src/main/resources/com/liferay/blade/cli/util/dependencies/yo-10.x.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "David Truong",
3 | "description": "",
4 | "devDependencies": {
5 | "@liferay/cli": "1.1.0",
6 | "generator-liferay-fragments": "1.2.1",
7 | "generator-liferay-js": "2.28.3",
8 | "generator-liferay-theme": "10.2.0",
9 | "generator-liferay-theme-themelet": "1.2.0",
10 | "yo": "3.1.1"
11 | },
12 | "license": "LGPL",
13 | "main": "index.js",
14 | "name": "liferay-blade-js",
15 | "scripts": {
16 | "build-fragment": "yo liferay-fragments",
17 | "build-theme": "yo liferay-theme",
18 | "build-widget": "yo liferay-js"
19 | },
20 | "version": "1.0.0"
21 | }
--------------------------------------------------------------------------------
/cli/src/main/resources/com/liferay/blade/cli/util/dependencies/yo-8.x.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "David Truong",
3 | "description": "",
4 | "devDependencies": {
5 | "generator-liferay-fragments": "1.2.1",
6 | "generator-liferay-js": "2.18.2",
7 | "generator-liferay-theme": "8.2.0",
8 | "generator-liferay-theme-themelet": "1.2.0",
9 | "yo": "3.1.1"
10 | },
11 | "license": "LGPL",
12 | "main": "index.js",
13 | "name": "liferay-blade-js",
14 | "scripts": {
15 | "build-theme": "yo liferay-theme --skip-install",
16 | "import-theme": "yo liferay-theme:import --skip-install"
17 | },
18 | "version": "1.0.0"
19 | }
--------------------------------------------------------------------------------
/cli/src/main/resources/com/liferay/blade/cli/util/dependencies/yo-9.x.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "David Truong",
3 | "description": "",
4 | "devDependencies": {
5 | "generator-liferay-fragments": "1.2.1",
6 | "generator-liferay-js": "2.18.2",
7 | "generator-liferay-theme": "9.5.0",
8 | "generator-liferay-theme-themelet": "1.2.0",
9 | "yo": "3.1.1"
10 | },
11 | "license": "LGPL",
12 | "main": "index.js",
13 | "name": "liferay-blade-js",
14 | "scripts": {
15 | "build-fragment": "yo liferay-fragments",
16 | "build-theme": "yo liferay-theme",
17 | "build-widget": "yo liferay-js"
18 | },
19 | "version": "1.0.0"
20 | }
--------------------------------------------------------------------------------
/cli/src/main/resources/jpm_install.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | jpm install -f "%s"
3 | if NOT ["%errorlevel%"]==["0"] (
4 | echo Error performing updated. Please run the following command manually.
5 | echo jpm install -f "%s"
6 | (goto) 2>nul & del "%~f0"
7 | pause
8 | exit
9 | ) else (
10 | (goto) 2>nul & del "%~f0"
11 | exit
12 | )
--------------------------------------------------------------------------------
/cli/src/main/resources/migrated-dependencies-7.1.properties:
--------------------------------------------------------------------------------
1 | spring-asm.jar=__remove__
2 | spring-beans.jar=org.springframework:spring-beans:4.3.22.RELEASE
3 | spring-core.jar=org.springframework:spring-core:4.3.22.RELEASE
4 | spring-context.jar=org.springframework:spring-context:4.3.22.RELEASE
5 | spring-context-support.jar=org.springframework:spring-context-support:4.3.22.RELEASE
6 | spring-expression.jar=org.springframework:spring-expression:4.3.22.RELEASE
7 | spring-web.jar=org.springframework:spring-webmvc:4.3.22.RELEASE
8 | spring-web-portlet.jar=org.springframework:spring-webmvc-portlet:4.3.22.RELEASE
--------------------------------------------------------------------------------
/cli/src/main/resources/migrated-dependencies-7.2.properties:
--------------------------------------------------------------------------------
1 | spring-asm.jar=__remove__
2 | spring-beans.jar=org.springframework:spring-beans:4.3.22.RELEASE
3 | spring-core.jar=org.springframework:spring-core:4.3.22.RELEASE
4 | spring-context.jar=org.springframework:spring-context:4.3.22.RELEASE
5 | spring-context-support.jar=org.springframework:spring-context-support:4.3.22.RELEASE
6 | spring-expression.jar=org.springframework:spring-expression:4.3.22.RELEASE
7 | spring-web.jar=org.springframework:spring-webmvc:4.3.22.RELEASE
8 | spring-web-portlet.jar=org.springframework:spring-webmvc-portlet:4.3.22.RELEASE
--------------------------------------------------------------------------------
/cli/src/main/resources/migrated-dependencies-7.3.properties:
--------------------------------------------------------------------------------
1 | spring-asm.jar=__remove__
2 | spring-beans.jar=org.springframework:spring-beans:5.2.2.RELEASE
3 | spring-core.jar=org.springframework:spring-core:5.2.2.RELEASE
4 | spring-context.jar=org.springframework:spring-context:5.2.2.RELEASE
5 | spring-context-support.jar=org.springframework:spring-context-support:5.2.2.RELEASE
6 | spring-expression.jar=org.springframework:spring-expression:5.2.2.RELEASE
7 | spring-web.jar=org.springframework:spring-webmvc:5.2.2.RELEASE
8 | spring-web-portlet.jar=org.springframework:spring-webmvc-portlet:5.2.2.RELEASE
--------------------------------------------------------------------------------
/cli/src/main/resources/migrated-dependencies-7.4.properties:
--------------------------------------------------------------------------------
1 | spring-asm.jar=__remove__
2 | spring-beans.jar=org.springframework:spring-beans:5.2.2.RELEASE
3 | spring-core.jar=org.springframework:spring-core:5.2.2.RELEASE
4 | spring-context.jar=org.springframework:spring-context:5.2.2.RELEASE
5 | spring-context-support.jar=org.springframework:spring-context-support:5.2.2.RELEASE
6 | spring-expression.jar=org.springframework:spring-expression:5.2.2.RELEASE
7 | spring-web.jar=org.springframework:spring-webmvc:5.2.2.RELEASE
8 | spring-web-portlet.jar=org.springframework:spring-webmvc-portlet:5.2.2.RELEASE
--------------------------------------------------------------------------------
/cli/src/test/java/com/liferay/blade/cli/BladeTestResults.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli;
7 |
8 | /**
9 | * @author Christopher Bryan Boyd
10 | */
11 | public class BladeTestResults {
12 |
13 | public BladeTestResults(BladeCLI bladeCLI, String output, String errors) {
14 | _bladeCLI = bladeCLI;
15 | _output = output;
16 | _errors = errors;
17 | }
18 |
19 | public BladeCLI getBladeCLI() {
20 | return _bladeCLI;
21 | }
22 |
23 | public String getErrors() {
24 | return _errors;
25 | }
26 |
27 | public String getOutput() {
28 | return _output;
29 | }
30 |
31 | private final BladeCLI _bladeCLI;
32 | private final String _errors;
33 | private final String _output;
34 |
35 | }
--------------------------------------------------------------------------------
/cli/src/test/java/com/liferay/blade/cli/DownloadFromGithubTest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli;
7 |
8 | import com.liferay.blade.cli.util.BladeUtil;
9 |
10 | import java.nio.file.Files;
11 | import java.nio.file.Path;
12 |
13 | import org.junit.Assert;
14 | import org.junit.Rule;
15 | import org.junit.Test;
16 | import org.junit.rules.TemporaryFolder;
17 |
18 | /**
19 | * @author Christopher Bryan Boyd
20 | */
21 | public class DownloadFromGithubTest {
22 |
23 | @Test
24 | public void testDownloadFromGithub() throws Exception {
25 | Path masterZipPath = BladeUtil.downloadGithubProject(
26 | "https://github.com/liferay/liferay-blade-cli", "master.zip");
27 |
28 | Assert.assertTrue(Files.exists(masterZipPath));
29 | }
30 |
31 | @Rule
32 | public final TemporaryFolder tempFolder = new TemporaryFolder();
33 |
34 | }
--------------------------------------------------------------------------------
/cli/src/test/java/com/liferay/blade/cli/StringTestUtil.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli;
7 |
8 | import java.io.BufferedReader;
9 | import java.io.IOException;
10 | import java.io.InputStream;
11 | import java.io.InputStreamReader;
12 |
13 | import java.nio.charset.StandardCharsets;
14 |
15 | import java.util.ArrayList;
16 | import java.util.List;
17 |
18 | /**
19 | * @author Andrea Di Giorgi
20 | * @author Gregory Amerson
21 | */
22 | public class StringTestUtil {
23 |
24 | public static String merge(Iterable strings, char separator) {
25 | StringBuilder sb = new StringBuilder();
26 |
27 | boolean first = true;
28 |
29 | for (String s : strings) {
30 | if (!first) {
31 | sb.append(separator);
32 | }
33 |
34 | first = false;
35 |
36 | sb.append(s);
37 | }
38 |
39 | return sb.toString();
40 | }
41 |
42 | public static List readLines(InputStream inputStream) throws IOException {
43 | List lines = new ArrayList<>();
44 |
45 | try (BufferedReader bufferedReader = new BufferedReader(
46 | new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {
47 |
48 | String line = null;
49 |
50 | while ((line = bufferedReader.readLine()) != null) {
51 | lines.add(line);
52 | }
53 | }
54 |
55 | return lines;
56 | }
57 |
58 | }
--------------------------------------------------------------------------------
/cli/src/test/java/com/liferay/blade/cli/command/JavaProcess.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command;
7 |
8 | /**
9 | * @author Gregory Amerson
10 | */
11 | public class JavaProcess {
12 |
13 | public JavaProcess(int id, String displayName) {
14 | _id = id;
15 | _displayName = displayName;
16 | }
17 |
18 | public String getDisplayName() {
19 | return _displayName;
20 | }
21 |
22 | public int getId() {
23 | return _id;
24 | }
25 |
26 | private String _displayName;
27 | private int _id;
28 |
29 | }
--------------------------------------------------------------------------------
/cli/src/test/java/com/liferay/blade/cli/command/validator/LiferayDefaultVersionValidatorTest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import java.util.List;
9 |
10 | import org.junit.Assert;
11 | import org.junit.Test;
12 |
13 | /**
14 | * @author Gregory Amerson
15 | */
16 | public class LiferayDefaultVersionValidatorTest {
17 |
18 | @Test
19 | public void testPromoted() throws Exception {
20 | LiferayDefaultVersionValidator ldvv = new LiferayDefaultVersionValidator();
21 |
22 | List values = ldvv.get();
23 |
24 | Assert.assertTrue(values.toString(), values.size() < 20);
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/cli/src/test/java/com/liferay/blade/cli/command/validator/LiferayMoreVersionValidatorTest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.cli.command.validator;
7 |
8 | import com.liferay.blade.cli.util.ReleaseUtil;
9 | import com.liferay.release.util.ReleaseEntry;
10 |
11 | import java.util.List;
12 | import java.util.stream.Collectors;
13 |
14 | import org.junit.Assert;
15 | import org.junit.Test;
16 |
17 | /**
18 | * @author Gregory Amerson
19 | */
20 | public class LiferayMoreVersionValidatorTest {
21 |
22 | @Test
23 | public void testGet() throws Exception {
24 | List expectedReleaseKeys = ReleaseUtil.getReleaseEntryStream(
25 | ).map(
26 | ReleaseEntry::getReleaseKey
27 | ).collect(
28 | Collectors.toList()
29 | );
30 |
31 | LiferayMoreVersionValidator lmvv = new LiferayMoreVersionValidator();
32 |
33 | List vals = lmvv.get();
34 |
35 | Assert.assertEquals(vals.toString(), expectedReleaseKeys.size(), vals.size());
36 |
37 | for (int i = 0; i < expectedReleaseKeys.size(); i++) {
38 | String actual = vals.get(i);
39 | String expected = expectedReleaseKeys.get(i);
40 |
41 | Assert.assertEquals(expected, actual);
42 | }
43 | }
44 |
45 | }
--------------------------------------------------------------------------------
/cli/src/test/resources/com/liferay/blade/cli/dependencies/action.command.portlet.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/src/test/resources/com/liferay/blade/cli/dependencies/action.command.portlet.jar
--------------------------------------------------------------------------------
/cli/src/test/resources/com/liferay/blade/cli/dependencies/jsp-war-portlet.war:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/src/test/resources/com/liferay/blade/cli/dependencies/jsp-war-portlet.war
--------------------------------------------------------------------------------
/cli/src/test/resources/com/liferay/blade/cli/no-zip-slip.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/src/test/resources/com/liferay/blade/cli/no-zip-slip.zip
--------------------------------------------------------------------------------
/cli/src/test/resources/com/liferay/blade/cli/zip-slip.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/src/test/resources/com/liferay/blade/cli/zip-slip.zip
--------------------------------------------------------------------------------
/cli/test-resources/localrepo/com/liferay/com.liferay.gradle.plugins.workspace/1.0.8/com.liferay.gradle.plugins.workspace-1.0.8-sources.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/localrepo/com/liferay/com.liferay.gradle.plugins.workspace/1.0.8/com.liferay.gradle.plugins.workspace-1.0.8-sources.jar
--------------------------------------------------------------------------------
/cli/test-resources/localrepo/com/liferay/com.liferay.gradle.plugins.workspace/1.0.8/com.liferay.gradle.plugins.workspace-1.0.8-sources.jar.md5:
--------------------------------------------------------------------------------
1 | 640143381fb5e7fd3a9a394e3e202302
--------------------------------------------------------------------------------
/cli/test-resources/localrepo/com/liferay/com.liferay.gradle.plugins.workspace/1.0.8/com.liferay.gradle.plugins.workspace-1.0.8-sources.jar.sha1:
--------------------------------------------------------------------------------
1 | 11d31176d0eebff42cdfdf2373d4245c1e8deffd
--------------------------------------------------------------------------------
/cli/test-resources/localrepo/com/liferay/com.liferay.gradle.plugins.workspace/maven-metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.liferay
4 | com.liferay.gradle.plugins.workspace
5 |
6 | 1.0.8
7 | 1.0.8
8 |
9 | 1.0.0-SNAPSHOT
10 | 1.0.0
11 | 1.0.1-SNAPSHOT
12 | 1.0.1
13 | 1.0.2-SNAPSHOT
14 | 1.0.2
15 | 1.0.3-SNAPSHOT
16 | 1.0.3
17 | 1.0.4-SNAPSHOT
18 | 1.0.4
19 | 1.0.5-SNAPSHOT
20 | 1.0.5
21 | 1.0.6-SNAPSHOT
22 | 1.0.6
23 | 1.0.7-SNAPSHOT
24 | 1.0.7
25 | 1.0.8-SNAPSHOT
26 | 1.0.8
27 |
28 | 20160209212839
29 |
30 |
--------------------------------------------------------------------------------
/cli/test-resources/localrepo/com/liferay/com.liferay.gradle.plugins.workspace/maven-metadata.xml.md5:
--------------------------------------------------------------------------------
1 | 04ed9d80025af429cf5088b1e9af6be6
2 |
--------------------------------------------------------------------------------
/cli/test-resources/localrepo/com/liferay/com.liferay.gradle.plugins.workspace/maven-metadata.xml.sha1:
--------------------------------------------------------------------------------
1 | 49789afbc1121fa38c68c1c2b83bb8f9261da6d0
2 |
--------------------------------------------------------------------------------
/cli/test-resources/originalProperties.properties:
--------------------------------------------------------------------------------
1 | ##Property exists in portal.properties but it is commented by default
2 | web.server.protocol=https
3 | sites.friendly.url.page.not.found=/html/portal/404.html
4 |
5 | index.search.query.suggestion.dictionary[en_US]=custom_dictionary/en_US.txt
6 | index.search.query.suggestion.dictionary[es_ES]=custom_dictionary/es_ES.txt
7 |
8 | buffered.increment.enabled[AssetEntry]=true
9 | buffered.increment.standby.queue.threshold[AssetEntry]=0
10 | buffered.increment.standby.time.upper.limit[AssetEntry]=0
11 | buffered.increment.threadpool.keep.alive.time[AssetEntry]=60
12 | buffered.increment.threadpool.max.size[AssetEntry]=1
13 |
14 | ##Property is configured with a scope
15 | buffered.increment.enabled[CustomEntity]=true
16 | buffered.increment.standby.queue.threshold[CustomEntity]=0
17 | buffered.increment.standby.time.upper.limit[CustomEntity]=0
18 | buffered.increment.threadpool.keep.alive.time[CustomEntity]=60
19 | buffered.increment.threadpool.max.size[CustomEntity]=1
20 |
21 | index.search.query.suggestion.dictionary[ca_ES]=custom_dictionary/ca_ES.txt
22 | index.search.query.suggestion.dictionary[en_US][999999]=custom_dictionary/en_US_123456.txt
23 | index.search.spell.checker.dictionary[ca_ES]=custom_dictionary/ca_ES.txt
24 | index.search.spell.checker.dictionary[en_US][999999]=custom_dictionary/en_US_123456.txt
25 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/invalid-plugins-sdk-path.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/invalid-plugins-sdk-path.zip
--------------------------------------------------------------------------------
/cli/test-resources/projects/plugins-sdk-with-git.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/plugins-sdk-with-git.zip
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/build.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/tasks-plugins-sdk/build.properties
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/hooks/build.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/tasks-plugins-sdk/hooks/build.xml
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/build.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/tasks-plugins-sdk/portlets/build.xml
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/.gitignore:
--------------------------------------------------------------------------------
1 | /tld
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/client/tms-portlet-client.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/client/tms-portlet-client.jar
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/liferay-display.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/liferay-hook.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content/Language*.properties
6 |
7 |
8 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/liferay-plugin-package.properties:
--------------------------------------------------------------------------------
1 | name=Task Management System
2 | module-group-id=liferay
3 | module-incremental-version=1
4 | tags=
5 | short-description=
6 | long-description=
7 | change-log=
8 | page-url=http://www.liferay.com
9 | author=Liferay, Inc.
10 | licenses=AGPL
11 | liferay-versions=7.0.0+
12 |
13 | portal-dependency-jars=\
14 | jstl-api.jar,\
15 | jstl-impl.jar
16 |
17 | portal-dependency-tlds=\
18 | c.tld
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/service/com/liferay/tasks/exception/NoSuchTasksEntryException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * This file is part of Liferay Social Office. Liferay Social Office is free
5 | * software: you can redistribute it and/or modify it under the terms of the GNU
6 | * Affero General Public License as published by the Free Software Foundation,
7 | * either version 3 of the License, or (at your option) any later version.
8 | *
9 | * Liferay Social Office is distributed in the hope that it will be useful, but
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
12 | * for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License along with
15 | * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
16 | */
17 |
18 | package com.liferay.tasks.exception;
19 |
20 | import com.liferay.portal.kernel.exception.NoSuchModelException;
21 |
22 | /**
23 | * @author Brian Wing Shun Chan
24 | */
25 | public class NoSuchTasksEntryException extends NoSuchModelException {
26 |
27 | public NoSuchTasksEntryException() {
28 | super();
29 | }
30 |
31 | public NoSuchTasksEntryException(String msg) {
32 | super(msg);
33 | }
34 |
35 | public NoSuchTasksEntryException(String msg, Throwable cause) {
36 | super(msg, cause);
37 | }
38 |
39 | public NoSuchTasksEntryException(Throwable cause) {
40 | super(cause);
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/service/com/liferay/tasks/exception/TasksEntryDueDateException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * This file is part of Liferay Social Office. Liferay Social Office is free
5 | * software: you can redistribute it and/or modify it under the terms of the GNU
6 | * Affero General Public License as published by the Free Software Foundation,
7 | * either version 3 of the License, or (at your option) any later version.
8 | *
9 | * Liferay Social Office is distributed in the hope that it will be useful, but
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
12 | * for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License along with
15 | * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
16 | */
17 |
18 | package com.liferay.tasks.exception;
19 |
20 | import com.liferay.portal.kernel.exception.PortalException;
21 |
22 | /**
23 | * @author Brian Wing Shun Chan
24 | */
25 | public class TasksEntryDueDateException extends PortalException {
26 |
27 | public TasksEntryDueDateException() {
28 | super();
29 | }
30 |
31 | public TasksEntryDueDateException(String msg) {
32 | super(msg);
33 | }
34 |
35 | public TasksEntryDueDateException(String msg, Throwable cause) {
36 | super(msg, cause);
37 | }
38 |
39 | public TasksEntryDueDateException(Throwable cause) {
40 | super(cause);
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/service/com/liferay/tasks/exception/TasksEntryTitleException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * This file is part of Liferay Social Office. Liferay Social Office is free
5 | * software: you can redistribute it and/or modify it under the terms of the GNU
6 | * Affero General Public License as published by the Free Software Foundation,
7 | * either version 3 of the License, or (at your option) any later version.
8 | *
9 | * Liferay Social Office is distributed in the hope that it will be useful, but
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
12 | * for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License along with
15 | * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
16 | */
17 |
18 | package com.liferay.tasks.exception;
19 |
20 | import com.liferay.portal.kernel.exception.PortalException;
21 |
22 | /**
23 | * @author Ryan Park
24 | */
25 | public class TasksEntryTitleException extends PortalException {
26 |
27 | public TasksEntryTitleException() {
28 | super();
29 | }
30 |
31 | public TasksEntryTitleException(String msg) {
32 | super(msg);
33 | }
34 |
35 | public TasksEntryTitleException(String msg, Throwable cause) {
36 | super(msg, cause);
37 | }
38 |
39 | public TasksEntryTitleException(Throwable cause) {
40 | super(cause);
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/service/com/liferay/tasks/service/persistence/TasksEntryFinder.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or modify it under
5 | * the terms of the GNU Lesser General Public License as published by the Free
6 | * Software Foundation; either version 2.1 of the License, or (at your option)
7 | * any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 | * details.
13 | */
14 |
15 | package com.liferay.tasks.service.persistence;
16 |
17 | import aQute.bnd.annotation.ProviderType;
18 |
19 | /**
20 | * @author Ryan Park
21 | * @generated
22 | */
23 | @ProviderType
24 | public interface TasksEntryFinder {
25 | public int countByG_P_A_R_S_T_N(long groupId, int priority,
26 | long assigneeUserId, long reporterUserId, int status,
27 | long[] assetTagIds, long[] notAssetTagIds)
28 | throws com.liferay.portal.kernel.exception.SystemException;
29 |
30 | public java.util.List findByG_P_A_R_S_T_N(
31 | long groupId, int priority, long assigneeUserId, long reporterUserId,
32 | int status, long[] assetTagIds, long[] notAssetTagIds, int start,
33 | int end) throws com.liferay.portal.kernel.exception.SystemException;
34 | }
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/sql/indexes.sql:
--------------------------------------------------------------------------------
1 | create index IX_9DB062B8 on TMS_TasksEntry (assigneeUserId);
2 | create index IX_EE672124 on TMS_TasksEntry (groupId, assigneeUserId);
3 | create index IX_EB40A85B on TMS_TasksEntry (groupId, resolverUserId);
4 | create index IX_84A27B35 on TMS_TasksEntry (groupId, userId);
5 | create index IX_9A89E9EF on TMS_TasksEntry (resolverUserId);
6 | create index IX_5D4090C9 on TMS_TasksEntry (userId);
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/sql/sequences.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/sql/sequences.sql
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/sql/tables.sql:
--------------------------------------------------------------------------------
1 | create table TMS_TasksEntry (
2 | tasksEntryId LONG not null primary key,
3 | groupId LONG,
4 | companyId LONG,
5 | userId LONG,
6 | userName VARCHAR(75) null,
7 | createDate DATE null,
8 | modifiedDate DATE null,
9 | title VARCHAR(75) null,
10 | priority INTEGER,
11 | assigneeUserId LONG,
12 | resolverUserId LONG,
13 | dueDate DATE null,
14 | finishDate DATE null,
15 | status INTEGER
16 | );
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/src/META-INF/portlet-spring.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/src/com/liferay/tasks/portlet/tasks-user-notification-definitions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ${com.liferay.tasks.model.TasksEntryConstants.STATUS_ALL}
7 | receive-a-notification-when-someone-assigns-you-a-task
8 |
9 | website
10 | ${com.liferay.portal.model.UserNotificationDeliveryConstants.TYPE_WEBSITE}
11 | true
12 | true
13 |
14 |
15 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/src/com/liferay/tasks/social/TasksActivityKeys.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * This file is part of Liferay Social Office. Liferay Social Office is free
5 | * software: you can redistribute it and/or modify it under the terms of the GNU
6 | * Affero General Public License as published by the Free Software Foundation,
7 | * either version 3 of the License, or (at your option) any later version.
8 | *
9 | * Liferay Social Office is distributed in the hope that it will be useful, but
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
12 | * for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License along with
15 | * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
16 | */
17 |
18 | package com.liferay.tasks.social;
19 |
20 | /**
21 | * @author Ryan Park
22 | */
23 | public class TasksActivityKeys {
24 |
25 | public static final int ADD_ENTRY = 1;
26 |
27 | public static final int REOPEN_ENTRY = 4;
28 |
29 | public static final int RESOLVE_ENTRY = 3;
30 |
31 | public static final int UPDATE_ENTRY = 2;
32 |
33 | }
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/src/com/liferay/tasks/util/TasksPortletKeys.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * This file is part of Liferay Social Office. Liferay Social Office is free
5 | * software: you can redistribute it and/or modify it under the terms of the GNU
6 | * Affero General Public License as published by the Free Software Foundation,
7 | * either version 3 of the License, or (at your option) any later version.
8 | *
9 | * Liferay Social Office is distributed in the hope that it will be useful, but
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
12 | * for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License along with
15 | * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
16 | */
17 |
18 | package com.liferay.tasks.util;
19 |
20 | import com.liferay.portal.kernel.util.PortletKeys;
21 |
22 | /**
23 | * @author Jonathan Lee
24 | */
25 | public class TasksPortletKeys extends PortletKeys {
26 |
27 | public static final String TASKS = "1_WAR_tasksportlet";
28 |
29 | public static final String UPCOMING_TASKS = "2_WAR_tasksportlet";
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/src/com/liferay/tasks/util/WebKeys.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * This file is part of Liferay Social Office. Liferay Social Office is free
5 | * software: you can redistribute it and/or modify it under the terms of the GNU
6 | * Affero General Public License as published by the Free Software Foundation,
7 | * either version 3 of the License, or (at your option) any later version.
8 | *
9 | * Liferay Social Office is distributed in the hope that it will be useful, but
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
12 | * for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License along with
15 | * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
16 | */
17 |
18 | package com.liferay.tasks.util;
19 |
20 | /**
21 | * @author Jonathan Lee
22 | */
23 | public class WebKeys implements com.liferay.portal.kernel.util.WebKeys {
24 |
25 | public static final String TASKS_ENTRY = "TASKS_ENTRY";
26 |
27 | }
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/src/content/Language_fr_CA.properties:
--------------------------------------------------------------------------------
1 | activity-tasks-add-entry={0} a ajouté une nouvelle tâche.
2 | activity-tasks-add-entry-for={0} a ajouté une nouvelle tâche pour {1}.
3 | activity-tasks-add-proposal={0} a créé une proposition.
4 | activity-tasks-add-proposal-in={0} a créé une proposition dans {1}.
5 | activity-tasks-assign-proposal={0} a assigné une proposition à {1} pour révision.
6 | activity-tasks-assign-proposal-in={0} a assigné une proposition à {1} pour révision dans {2}.
7 | activity-tasks-reopen-entry={0} a rouvert une tâche.
8 | activity-tasks-reopen-entry-for={0} a rouvert une tâche pour {1}.
9 | activity-tasks-resolve-entry={0} a résolu une tâche.
10 | activity-tasks-resolve-entry-for={0} a résolu une tâche pour {1}
11 | activity-tasks-review-proposal={0} a revu une proposition de {1}.
12 | activity-tasks-review-proposal-in={0} a revu une proposition de {1} dans {2}.
13 | activity-tasks-update-entry={0} a mis à jour une tâche.
14 | activity-tasks-update-entry-for={0} a mis à jour une tâche pour {1}.
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/src/content/Language_zh_CN.properties:
--------------------------------------------------------------------------------
1 | 20-percent-complete=完成度20%
2 | 40-percent-complete=完成度40%
3 | 60-percent-complete=完成度60%
4 | 80-percent-complete=完成度80%
5 | activity-tasks-add-entry={0}添加了一个新任务。
6 | activity-tasks-add-entry-for={0}给{1}添加了一个新任务。
7 | activity-tasks-add-proposal={0}创建了一个提议。
8 | activity-tasks-add-proposal-in={0}在{1}中创建了一个提议。
9 | activity-tasks-assign-proposal={0} 将一个提议分配给{1}进行审阅。
10 | activity-tasks-assign-proposal-in={0}在{2}中把一个提议分配给{1}进行检查。
11 | activity-tasks-reopen-entry={0}重新打开了一个任务。
12 | activity-tasks-reopen-entry-for={0}为{1}重新打开了一个任务。
13 | activity-tasks-resolve-entry={0}解决了一个任务。
14 | activity-tasks-resolve-entry-for={0}为{1}解决了一个任务。
15 | activity-tasks-review-proposal={0}审阅了来自{1}的一个提议。
16 | activity-tasks-review-proposal-in={0}在{2}中审阅了来自{1}的一个提议。
17 | activity-tasks-update-entry={0}更新了一个任务。
18 | activity-tasks-update-entry-for={0}为{1}更新了一个任务。
19 | add-due-date=添加到期日
20 | complete=完成
21 | due=到期
22 | filter-by-place=按照位置进行筛选
23 | filter-by-tags=按照标签进行筛选
24 | i-have-created=我已创建
25 | javax.portlet.title.1_WAR_tasksportlet=任务
26 | javax.portlet.title.2_WAR_tasksportlet=接下来的任务
27 | model.resource.com.liferay.tasks=任务
28 | model.resource.com.liferay.tasks.model.TasksEntry=任务项
29 | modified-on-x=在{0}中做了修改
30 | no-places-were-found=没有找到相应位置。
31 | receive-a-notification-when-someone-assigns-you-a-task=分配任务给您。
32 | remove-due-date=移除截止日期
33 | reopen=重新打开
34 | reopened=已重新打开
35 | reporter=报告者
36 | resolve=解决
37 | show-completed-tasks=显示已完成的任务
38 | task-could-not-be-found=找不到相应的任务。
39 | unknown-user=未知用户
40 | update-task=更新任务
41 | view-all-tasks=查看所有任务
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/src/portlet.properties:
--------------------------------------------------------------------------------
1 | include-and-override=portlet-ext.properties
2 |
3 | resource.actions.configs=resource-actions/default.xml
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/src/service.properties:
--------------------------------------------------------------------------------
1 | ##
2 | ## Properties Override
3 | ##
4 |
5 | #
6 | # Specify where to get the overridden properties. Updates should not be made
7 | # on this file but on the overridden version of this file.
8 | #
9 | include-and-override=${base.path}/service-ext.properties
10 |
11 | ##
12 | ## Build
13 | ##
14 |
15 | build.namespace=TMS
16 | build.number=4
17 | build.date=1506661409912
18 | build.auto.upgrade=true
19 |
20 | ##
21 | ## Spring
22 | ##
23 |
24 | #
25 | # Input a list of comma delimited Spring configurations. These will be
26 | # loaded after the bean definitions specified in the
27 | # portalContextConfigLocation parameter in web.xml.
28 | #
29 | spring.configs=\
30 | WEB-INF/classes/META-INF/portlet-spring.xml,\
31 | \
32 | WEB-INF/classes/META-INF/ext-spring.xml
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | http://java.sun.com/jsp/jstl/core
7 | /WEB-INF/tld/c.tld
8 |
9 |
10 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/asset/abstract.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | /**
3 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
4 | *
5 | * This file is part of Liferay Social Office. Liferay Social Office is free
6 | * software: you can redistribute it and/or modify it under the terms of the GNU
7 | * Affero General Public License as published by the Free Software Foundation,
8 | * either version 3 of the License, or (at your option) any later version.
9 | *
10 | * Liferay Social Office is distributed in the hope that it will be useful, but
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
13 | * for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License along with
16 | * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
17 | */
18 | --%>
19 |
20 | <%@ include file="/init.jsp" %>
21 |
22 | <%
23 | TasksEntry entry = (TasksEntry)request.getAttribute(WebKeys.TASKS_ENTRY);
24 | %>
25 |
26 | <%= entry.getTitle() %>
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/asset/full_content.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | /**
3 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
4 | *
5 | * This file is part of Liferay Social Office. Liferay Social Office is free
6 | * software: you can redistribute it and/or modify it under the terms of the GNU
7 | * Affero General Public License as published by the Free Software Foundation,
8 | * either version 3 of the License, or (at your option) any later version.
9 | *
10 | * Liferay Social Office is distributed in the hope that it will be useful, but
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
13 | * for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License along with
16 | * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
17 | */
18 | --%>
19 |
20 | <%@ include file="/init.jsp" %>
21 |
22 | <%
23 | TasksEntry entry = (TasksEntry)request.getAttribute(WebKeys.TASKS_ENTRY);
24 | %>
25 |
26 | <%= entry.getTitle() %>
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/icon.png
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/images/priority_high.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/images/priority_high.png
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/images/priority_low.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/images/priority_low.png
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/images/priority_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/images/priority_normal.png
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/images/selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/images/selected.png
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/images/unselected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/images/unselected.png
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/tabs1.jspf:
--------------------------------------------------------------------------------
1 | <%--
2 | /**
3 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
4 | *
5 | * This file is part of Liferay Social Office. Liferay Social Office is free
6 | * software: you can redistribute it and/or modify it under the terms of the GNU
7 | * Affero General Public License as published by the Free Software Foundation,
8 | * either version 3 of the License, or (at your option) any later version.
9 | *
10 | * Liferay Social Office is distributed in the hope that it will be useful, but
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
13 | * for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License along with
16 | * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
17 | */
18 | --%>
19 |
20 | <%
21 | String tabs1Names = "all-tasks";
22 |
23 | if (group.isUser()) {
24 | tabs1Names = "assigned-to-me,i-have-created";
25 | }
26 | else if (themeDisplay.isSignedIn()) {
27 | tabs1Names = tabs1Names + ",assigned-to-me,i-have-created";
28 | }
29 | %>
30 |
31 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/tasks/view_comments.jspf:
--------------------------------------------------------------------------------
1 | <%--
2 | /**
3 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
4 | *
5 | * This file is part of Liferay Social Office. Liferay Social Office is free
6 | * software: you can redistribute it and/or modify it under the terms of the GNU
7 | * Affero General Public License as published by the Free Software Foundation,
8 | * either version 3 of the License, or (at your option) any later version.
9 | *
10 | * Liferay Social Office is distributed in the hope that it will be useful, but
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
13 | * for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License along with
16 | * Liferay Social Office. If not, see http://www.gnu.org/licenses/agpl-3.0.html.
17 | */
18 | --%>
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/build.gradle:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/testws1/build.gradle
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/configs/common/.touch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/testws1/configs/common/.touch
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/configs/dev/portal-ext.properties:
--------------------------------------------------------------------------------
1 | include-and-override=portal-developer.properties
2 |
3 | #
4 | # MySQL
5 | #
6 | #jdbc.default.driverClassName=com.mysql.jdbc.Driver
7 | #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
8 | #jdbc.default.username=root
9 | #jdbc.default.password=
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/configs/local/portal-ext.properties:
--------------------------------------------------------------------------------
1 | include-and-override=portal-developer.properties
2 |
3 | #
4 | # MySQL
5 | #
6 | #jdbc.default.driverClassName=com.mysql.jdbc.Driver
7 | #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
8 | #jdbc.default.username=root
9 | #jdbc.default.password=
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/configs/prod/osgi/configs/com.liferay.portal.search.elasticsearch.configuration.ElasticsearchConfiguration.cfg:
--------------------------------------------------------------------------------
1 | operationMode=REMOTE
2 | transportAddresses=127.0.0.1:9300
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/configs/prod/portal-ext.properties:
--------------------------------------------------------------------------------
1 | #
2 | # MySQL
3 | #
4 | #jdbc.default.driverClassName=com.mysql.jdbc.Driver
5 | #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
6 | #jdbc.default.username=root
7 | #jdbc.default.password=
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/configs/uat/osgi/configs/com.liferay.portal.search.elasticsearch.configuration.ElasticsearchConfiguration.cfg:
--------------------------------------------------------------------------------
1 | operationMode=REMOTE
2 | transportAddresses=127.0.0.1:9300
3 | logExceptionsOnly=false
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/configs/uat/portal-ext.properties:
--------------------------------------------------------------------------------
1 | #
2 | # MySQL
3 | #
4 | #jdbc.default.driverClassName=com.mysql.jdbc.Driver
5 | #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
6 | #jdbc.default.username=root
7 | #jdbc.default.password=
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/gradle.properties:
--------------------------------------------------------------------------------
1 | #liferay.workspace.bundle.url=https://sourceforge.net/projects/lportal/files/Liferay Portal/7.0.1 GA2/liferay-ce-portal-tomcat-7.0-ga2-20160610113014153.zip
2 | #liferay.workspace.environment=local
3 | #liferay.workspace.home.dir=bundles
4 | #liferay.workspace.modules.default.repository.enabled=false
5 | #liferay.workspace.modules.dir=modules
6 | #liferay.workspace.plugins.sdk.dir=plugins-sdk
7 | #liferay.workspace.themes.dir=themes
8 |
9 | liferay.workspace.docker.image.liferay=liferay/portal:7.2.0-ga1
10 | microsoft.translator.client.id=
11 | microsoft.translator.client.secret=
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/modules/.touch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/testws1/modules/.touch
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/modules/testportlet/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle/
2 | build/
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/modules/testportlet/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-SymbolicName: testportlet
2 | Bundle-Version: 1.0.0
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/modules/testportlet/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | implementation group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"
3 | implementation group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0"
4 | implementation group: "javax.portlet", name: "portlet-api", version: "2.0"
5 | implementation group: "javax.servlet", name: "servlet-api", version: "2.5"
6 | implementation group: "jstl", name: "jstl", version: "1.2"
7 | implementation group: "org.osgi", name: "org.osgi.compendium", version: "5.0.0"
8 | }
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/modules/testportlet/src/main/java/testportlet/portlet/TestportletPortlet.java:
--------------------------------------------------------------------------------
1 | package testportlet.portlet;
2 |
3 | import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet;
4 |
5 | import javax.portlet.Portlet;
6 |
7 | import org.osgi.service.component.annotations.Component;
8 |
9 | @Component(
10 | immediate = true,
11 | property = {
12 | "com.liferay.portlet.display-category=category.sample",
13 | "com.liferay.portlet.instanceable=true",
14 | "javax.portlet.display-name=testportlet Portlet",
15 | "javax.portlet.init-param.template-path=/",
16 | "javax.portlet.init-param.view-template=/view.jsp",
17 | "javax.portlet.resource-bundle=content.Language",
18 | "javax.portlet.security-role-ref=power-user,user"
19 | },
20 | service = Portlet.class
21 | )
22 | public class TestportletPortlet extends MVCPortlet {
23 | }
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/modules/testportlet/src/main/resources/META-INF/resources/init.jsp:
--------------------------------------------------------------------------------
1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
2 |
3 | <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
4 |
5 | <%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
6 | <%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
7 | <%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
8 | <%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/modules/testportlet/src/main/resources/META-INF/resources/view.jsp:
--------------------------------------------------------------------------------
1 | <%@ include file="/init.jsp" %>
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/modules/testportlet/src/main/resources/content/Language.properties:
--------------------------------------------------------------------------------
1 | javax.portlet.display-name.testportlet_Testportlet=testportlet JSP
2 | javax.portlet.keywords.testportlet_Testportlet=testportlet,jsp
3 | javax.portlet.short-title.testportlet_Testportlet=testportlet JSP
4 | javax.portlet.title.testportlet_Testportlet=testportlet JSP Portlet
5 | testportlet_Testportlet.caption=Hello from testportlet JSP!
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/settings.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "org.yaml", name: "snakeyaml", version: "1.32"
4 |
5 | classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd", version: "5.3.0"
6 | classpath group: "com.github.docker-java", name: "docker-java-transport", version: "3.2.8"
7 | classpath(group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "latest.release") {
8 | exclude group: "biz.aQute.bnd", module: "biz.aQute.bnd"
9 | }
10 | }
11 |
12 | repositories {
13 | mavenLocal()
14 |
15 | maven {
16 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
17 | }
18 | }
19 | }
20 |
21 | apply plugin: "com.liferay.workspace"
22 |
23 | gradle.liferayWorkspace {
24 | dockerImageId {
25 | "custom-workspace-image:" + "1.0.0"
26 | }
27 | dockerContainerId = "custom-workspace-liferay1"
28 | }
--------------------------------------------------------------------------------
/cli/test-resources/projects/testws1/themes/.touch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test-resources/projects/testws1/themes/.touch
--------------------------------------------------------------------------------
/cli/test-resources/upgradeProperties.out:
--------------------------------------------------------------------------------
1 | buffered.increment.enabled
2 | ANALYZE - This property is not present in thew new portal.properties. Check if you still need it or check the documentation to find a replacement
3 |
4 | buffered.increment.standby.queue.threshold
5 | KEEP - This property is still present in the new portal.properties.
6 |
7 | buffered.increment.standby.time.upper.limit
8 | KEEP - This property is still present in the new portal.properties.
9 |
10 | buffered.increment.threadpool.keep.alive.time
11 | KEEP - This property is still present in the new portal.properties.
12 |
13 | buffered.increment.threadpool.max.size
14 | KEEP - This property is still present in the new portal.properties.
15 |
16 | index.search.query.suggestion.dictionary
17 | MODULARIZE AS OSGI - This property matches with the following OSGI config, select the most appropriate:
18 | - searchQueryResultWindowLimit from com.liferay.portal.search.configuration.DefaultSearchResultPermissionFilterConfiguration
19 |
20 | index.search.spell.checker.dictionary
21 | KEEP - This property is still present in the new portal.properties.
22 |
23 | sites.friendly.url.page.not.found
24 | KEEP - This property is still present in the new portal.properties.
25 |
26 | web.server.protocol
27 | KEEP - This property is still present in the new portal.properties.
--------------------------------------------------------------------------------
/cli/test.file:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/cli/test.file
--------------------------------------------------------------------------------
/copyright.txt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
--------------------------------------------------------------------------------
/extensions/bad-command/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Name: bad-command
2 | Bundle-SymbolicName: com.liferay.extensions.bad.command
3 | Bundle-Version: 1.0.0
--------------------------------------------------------------------------------
/extensions/bad-command/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd.gradle", version: "5.3.0"
4 | classpath group: "de.undercouch", name: "gradle-download-task", version: "5.4.0"
5 | }
6 |
7 | repositories {
8 | maven {
9 | if (project.hasProperty("release")) {
10 | url "https://repository.liferay.com/nexus/content/groups/public"
11 | }
12 | else {
13 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
14 | }
15 | }
16 | }
17 | }
18 |
19 | apply plugin: "biz.aQute.bnd.builder"
20 | apply plugin: 'java'
21 |
22 | dependencies {
23 | compileOnly group: "com.beust", name: "jcommander", version: "1.82"
24 | compileOnly project(":cli")
25 | }
26 |
27 | compileJava{
28 | dependsOn(":cli:unzipPortal")
29 | dependsOn(":cli:unzipManifest")
30 | }
31 |
32 | jar{
33 | dependsOn(":cli:unzipPortal")
34 | dependsOn(":cli:unzipManifest")
35 | }
36 |
37 | test {
38 | dependsOn jar
39 |
40 | doFirst {
41 | systemProperty 'badCommandJarFile', jar.archivePath
42 | }
43 | }
44 |
45 | version = "1.0.0"
--------------------------------------------------------------------------------
/extensions/bad-command/src/main/java/com/liferay/extensions/bad/command/BadArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.extensions.bad.command;
7 |
8 | import com.beust.jcommander.Parameters;
9 |
10 | import com.liferay.blade.cli.command.BaseArgs;
11 |
12 | /**
13 | * @author Liferay
14 | */
15 | @Parameters(commandDescription = "Bad Command, results in an error", commandNames = "bad")
16 | public class BadArgs extends BaseArgs {
17 | }
--------------------------------------------------------------------------------
/extensions/bad-command/src/main/java/com/liferay/extensions/bad/command/BadCommand.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.extensions.bad.command;
7 |
8 | import com.liferay.blade.cli.command.BaseCommand;
9 |
10 | /**
11 | * @author Liferay
12 | */
13 | public class BadCommand extends BaseCommand {
14 |
15 | public BadCommand() {
16 | throw new NoClassDefFoundError("com/liferay/blade/cli/WorkspaceLocator");
17 | }
18 |
19 | @Override
20 | public void execute() throws Exception {
21 | getBladeCLI().out("bad");
22 | }
23 |
24 | @Override
25 | public Class getArgsClass() {
26 | return BadArgs.class;
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/extensions/bad-command/src/main/resources/META-INF/services/com.liferay.blade.cli.command.BaseCommand:
--------------------------------------------------------------------------------
1 | com.liferay.extensions.bad.command.BadCommand
--------------------------------------------------------------------------------
/extensions/build.gradle:
--------------------------------------------------------------------------------
1 | subprojects {
2 | subproject ->
3 | pluginManager.withPlugin("java") {
4 | tasks.register('deploy', Copy) {
5 | dependsOn jar
6 | from jar
7 | into new File(System.getProperty("user.home") + "/.blade/extensions")
8 | }
9 |
10 | clean.dependsOn(cleanDeploy)
11 | }
12 |
13 | String repoHost = "repository-cdn.liferay.com"
14 |
15 | if (subproject.hasProperty("release") || subproject.hasProperty("snapshots")) {
16 | repoHost = "repository.liferay.com"
17 | }
18 |
19 | repositories {
20 | flatDir {
21 | dirs "${rootProject.projectDir}/libs"
22 | }
23 |
24 | maven {
25 | url "https://repo.gradle.org/gradle/libs-releases/"
26 | }
27 |
28 | maven {
29 | url "https://${repoHost}/nexus/content/repositories/liferay-public-releases/"
30 | }
31 |
32 | maven {
33 | url "https://${repoHost}/nexus/content/repositories/liferay-public-snapshots/"
34 | }
35 |
36 | mavenCentral()
37 |
38 | jcenter()
39 | }
40 | }
--------------------------------------------------------------------------------
/extensions/maven-profile/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Name: maven-profile
2 | Bundle-SymbolicName: com.liferay.blade.profile.maven
3 | Bundle-Version: ${project.version}
4 | Canary-Timestamp: ${tstamp}
--------------------------------------------------------------------------------
/extensions/maven-profile/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd.gradle", version: "5.3.0"
4 | }
5 |
6 | repositories {
7 | maven {
8 | if (project.hasProperty("release")) {
9 | url "https://repository.liferay.com/nexus/content/groups/public"
10 | }
11 | else {
12 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
13 | }
14 | }
15 |
16 | mavenCentral()
17 | }
18 | }
19 |
20 | apply plugin: "biz.aQute.bnd.builder"
21 | apply plugin: "java"
22 | apply plugin: "maven-publish"
23 |
24 | dependencies {
25 | compileOnly group: "com.beust", name: "jcommander", version: "1.82"
26 | compileOnly group: "com.liferay", name: "com.liferay.project.templates.extensions", version: "1.0.134"
27 | compileOnly project(":cli")
28 | testImplementation gradleTestKit()
29 | testImplementation group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "5.3.0"
30 | testImplementation group: "junit", name: "junit", version: "4.13.1"
31 | testImplementation group: "org.zeroturnaround", name: "zt-process-killer", version: "1.9"
32 | testImplementation project(":cli")
33 | testImplementation project(path: ":cli", configuration: "testApi")
34 | }
35 |
36 | publishing {
37 | publications {
38 | mavenProfileJar(MavenPublication) {
39 | artifactId = "com.liferay.blade.extensions.maven.profile"
40 |
41 | from components.java
42 | }
43 | }
44 | }
45 |
46 | version = "1.0.44-SNAPSHOT"
--------------------------------------------------------------------------------
/extensions/maven-profile/src/main/java/com/liferay/blade/extensions/maven/profile/BuildServiceArgsMaven.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.extensions.maven.profile;
7 |
8 | import com.beust.jcommander.Parameters;
9 |
10 | import com.liferay.blade.cli.command.BaseArgs;
11 |
12 | /**
13 | * @author Christopher Bryan Boyd
14 | */
15 | @Parameters(
16 | commandDescription = "Run Service Builder on all relevant projects in the workspace.", commandNames = "buildService"
17 | )
18 | public class BuildServiceArgsMaven extends BaseArgs {
19 | }
--------------------------------------------------------------------------------
/extensions/maven-profile/src/main/java/com/liferay/blade/extensions/maven/profile/DeployCommandMaven.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.extensions.maven.profile;
7 |
8 | import com.liferay.blade.cli.BladeCLI;
9 | import com.liferay.blade.cli.command.BladeProfile;
10 | import com.liferay.blade.cli.command.DeployArgs;
11 | import com.liferay.blade.cli.command.DeployCommand;
12 | import com.liferay.blade.extensions.maven.profile.internal.MavenExecutor;
13 | import com.liferay.blade.extensions.maven.profile.internal.MavenUtil;
14 |
15 | import java.io.File;
16 |
17 | import java.util.Collections;
18 |
19 | /**
20 | * @author Christopher Bryan Boyd
21 | */
22 | @BladeProfile("maven")
23 | public class DeployCommandMaven extends DeployCommand implements MavenExecutor {
24 |
25 | public DeployCommandMaven() {
26 | }
27 |
28 | @Override
29 | public void execute() throws Exception {
30 | DeployArgs deployArgs = getArgs();
31 |
32 | File baseDir = deployArgs.getBase();
33 |
34 | File pomXMLFile = MavenUtil.getpomXMLFile(baseDir);
35 |
36 | if (pomXMLFile.exists()) {
37 | execute(baseDir.getAbsolutePath(), new String[] {"clean", "package", "bundle-support:deploy"}, true);
38 | }
39 | else {
40 | _addError("Unable to locate pom.xml file.");
41 | }
42 | }
43 |
44 | private void _addError(String msg) {
45 | BladeCLI bladeCLI = getBladeCLI();
46 |
47 | bladeCLI.addErrors("deploy", Collections.singleton(msg));
48 | }
49 |
50 | }
--------------------------------------------------------------------------------
/extensions/maven-profile/src/main/java/com/liferay/blade/extensions/maven/profile/InitCommandMaven.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.extensions.maven.profile;
7 |
8 | import com.liferay.blade.cli.command.BladeProfile;
9 | import com.liferay.blade.cli.command.InitArgs;
10 | import com.liferay.blade.cli.command.InitCommand;
11 |
12 | /**
13 | * @author Gregory Amerson
14 | * @author Terry Jia
15 | */
16 | @BladeProfile("maven")
17 | public class InitCommandMaven extends InitCommand {
18 |
19 | public InitCommandMaven() {
20 | }
21 |
22 | @Override
23 | public void execute() throws Exception {
24 | InitArgs initArgs = getArgs();
25 |
26 | initArgs.setProfileName("maven");
27 |
28 | super.execute();
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/extensions/maven-profile/src/main/java/com/liferay/blade/extensions/maven/profile/LocalServerMaven.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.extensions.maven.profile;
7 |
8 | import com.liferay.blade.cli.BladeCLI;
9 | import com.liferay.blade.cli.command.BaseArgs;
10 | import com.liferay.blade.cli.command.LocalServer;
11 | import com.liferay.blade.extensions.maven.profile.internal.MavenUtil;
12 |
13 | import java.io.File;
14 |
15 | import java.util.Properties;
16 |
17 | /**
18 | * @author Christopher Bryan Boyd
19 | */
20 | public class LocalServerMaven extends LocalServer {
21 |
22 | public LocalServerMaven(BladeCLI bladeCLI) {
23 | super(bladeCLI);
24 | }
25 |
26 | @Override
27 | protected File getWorkspaceDir(BladeCLI bladeCLI) {
28 | BaseArgs baseArgs = bladeCLI.getArgs();
29 |
30 | File baseDir = baseArgs.getBase();
31 |
32 | return MavenUtil.getWorkspaceDir(baseDir);
33 | }
34 |
35 | @Override
36 | protected Properties getWorkspaceProperties(BladeCLI bladeCLI) {
37 | BaseArgs baseArgs = bladeCLI.getArgs();
38 |
39 | File baseDir = baseArgs.getBase();
40 |
41 | return MavenUtil.getMavenProperties(baseDir);
42 | }
43 |
44 | }
--------------------------------------------------------------------------------
/extensions/maven-profile/src/main/java/com/liferay/blade/extensions/maven/profile/ServerInitCommandMaven.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.extensions.maven.profile;
7 |
8 | import com.liferay.blade.cli.BladeCLI;
9 | import com.liferay.blade.cli.command.BaseArgs;
10 | import com.liferay.blade.cli.command.BladeProfile;
11 | import com.liferay.blade.cli.command.ServerInitCommand;
12 | import com.liferay.blade.extensions.maven.profile.internal.MavenExecutor;
13 | import com.liferay.blade.extensions.maven.profile.internal.MavenUtil;
14 |
15 | import java.io.File;
16 |
17 | /**
18 | * @author Christopher Bryan Boyd
19 | */
20 | @BladeProfile("maven")
21 | public class ServerInitCommandMaven extends ServerInitCommand implements MavenExecutor {
22 |
23 | @Override
24 | public void execute() throws Exception {
25 | BladeCLI bladeCLI = getBladeCLI();
26 |
27 | BaseArgs baseArgs = bladeCLI.getArgs();
28 |
29 | File baseDir = baseArgs.getBase();
30 |
31 | if (MavenUtil.isWorkspace(baseDir)) {
32 | File pomXMLFile = MavenUtil.getpomXMLFile(baseDir);
33 |
34 | if (pomXMLFile.exists()) {
35 | if (!baseArgs.isQuiet()) {
36 | bladeCLI.out("Executing maven task bundle-support:init...\n");
37 | }
38 |
39 | execute(baseDir.getAbsolutePath(), new String[] {"bundle-support:init"});
40 | }
41 | }
42 | else {
43 | bladeCLI.error("'server init' command is only supported inside a Liferay workspace project.");
44 | }
45 | }
46 |
47 | }
--------------------------------------------------------------------------------
/extensions/maven-profile/src/main/java/com/liferay/blade/extensions/maven/profile/ServerRunCommandMaven.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.extensions.maven.profile;
7 |
8 | import com.liferay.blade.cli.BladeCLI;
9 | import com.liferay.blade.cli.command.BladeProfile;
10 | import com.liferay.blade.cli.command.LocalServer;
11 | import com.liferay.blade.cli.command.ServerRunCommand;
12 |
13 | /**
14 | * @author Gregory Amerson
15 | */
16 | @BladeProfile("maven")
17 | public class ServerRunCommandMaven extends ServerRunCommand {
18 |
19 | @Override
20 | protected LocalServer newLocalServer(BladeCLI bladeCLI) {
21 | return new LocalServerMaven(bladeCLI);
22 | }
23 |
24 | }
--------------------------------------------------------------------------------
/extensions/maven-profile/src/main/java/com/liferay/blade/extensions/maven/profile/ServerStartCommandMaven.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.extensions.maven.profile;
7 |
8 | import com.liferay.blade.cli.BladeCLI;
9 | import com.liferay.blade.cli.command.BladeProfile;
10 | import com.liferay.blade.cli.command.LocalServer;
11 | import com.liferay.blade.cli.command.ServerStartCommand;
12 |
13 | /**
14 | * @author David Truong
15 | * @author Simon Jiang
16 | */
17 | @BladeProfile("maven")
18 | public class ServerStartCommandMaven extends ServerStartCommand {
19 |
20 | @Override
21 | protected LocalServer newLocalServer(BladeCLI bladeCLI) {
22 | return new LocalServerMaven(bladeCLI);
23 | }
24 |
25 | }
--------------------------------------------------------------------------------
/extensions/maven-profile/src/main/java/com/liferay/blade/extensions/maven/profile/ServerStopCommandMaven.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.extensions.maven.profile;
7 |
8 | import com.liferay.blade.cli.BladeCLI;
9 | import com.liferay.blade.cli.command.BladeProfile;
10 | import com.liferay.blade.cli.command.LocalServer;
11 | import com.liferay.blade.cli.command.ServerStopCommand;
12 |
13 | /**
14 | * @author David Truong
15 | */
16 | @BladeProfile("maven")
17 | public class ServerStopCommandMaven extends ServerStopCommand {
18 |
19 | @Override
20 | protected LocalServer newLocalServer(BladeCLI bladeCLI) {
21 | return new LocalServerMaven(bladeCLI);
22 | }
23 |
24 | }
--------------------------------------------------------------------------------
/extensions/maven-profile/src/main/resources/META-INF/services/com.liferay.blade.cli.WorkspaceProvider:
--------------------------------------------------------------------------------
1 | com.liferay.blade.extensions.maven.profile.MavenWorkspaceProvider
--------------------------------------------------------------------------------
/extensions/maven-profile/src/main/resources/META-INF/services/com.liferay.blade.cli.command.BaseCommand:
--------------------------------------------------------------------------------
1 | com.liferay.blade.extensions.maven.profile.BuildServiceCommandMaven
2 | com.liferay.blade.extensions.maven.profile.CreateCommandMaven
3 | com.liferay.blade.extensions.maven.profile.DeployCommandMaven
4 | com.liferay.blade.extensions.maven.profile.InitCommandMaven
5 | com.liferay.blade.extensions.maven.profile.ServerInitCommandMaven
6 | com.liferay.blade.extensions.maven.profile.ServerRunCommandMaven
7 | com.liferay.blade.extensions.maven.profile.ServerStartCommandMaven
8 | com.liferay.blade.extensions.maven.profile.ServerStopCommandMaven
--------------------------------------------------------------------------------
/extensions/maven-profile/src/test/java/com/liferay/blade/extensions/maven/profile/MavenTestUtil.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.extensions.maven.profile;
7 |
8 | import com.liferay.blade.cli.TestUtil;
9 |
10 | import java.io.File;
11 |
12 | import java.util.ArrayList;
13 | import java.util.List;
14 |
15 | /**
16 | * @author Gregory Amerson
17 | */
18 | public class MavenTestUtil {
19 |
20 | public static void makeMavenWorkspace(File extensionsDir, File workspace, String version, String... args)
21 | throws Exception {
22 |
23 | File parentFile = workspace.getParentFile();
24 |
25 | List completeArgs = new ArrayList<>();
26 |
27 | completeArgs.add("--base");
28 | completeArgs.add(parentFile.getPath());
29 | completeArgs.add("init");
30 | completeArgs.add("-P");
31 | completeArgs.add("maven");
32 | completeArgs.add(workspace.getName());
33 | completeArgs.add("-v");
34 | completeArgs.add(version);
35 |
36 | for (String arg : args) {
37 | completeArgs.add(arg);
38 | }
39 |
40 | TestUtil.runBlade(workspace, extensionsDir, completeArgs.toArray(new String[0]));
41 | }
42 |
43 | public static void verifyBuildOutput(String projectPath, String fileName) {
44 | File file = new File(projectPath, "/target/" + fileName);
45 |
46 | if (!file.exists()) {
47 | throw new RuntimeException("Maven file " + fileName + " doses not exist in project path " + projectPath);
48 | }
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/extensions/maven-profile/src/test/java/com/liferay/blade/extensions/maven/profile/RetryRule.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.extensions.maven.profile;
7 |
8 | import org.junit.rules.TestRule;
9 | import org.junit.runner.Description;
10 | import org.junit.runners.model.Statement;
11 |
12 | /**
13 | * @author Lawrence Lee
14 | */
15 | public class RetryRule implements TestRule {
16 |
17 | public RetryRule(int retryCount) {
18 | _retryCount = retryCount;
19 | }
20 |
21 | @Override
22 | public Statement apply(Statement base, Description description) {
23 | return _statement(base, description);
24 | }
25 |
26 | private Statement _statement(final Statement base, final Description description) {
27 | return new Statement() {
28 |
29 | @Override
30 | public void evaluate() throws Throwable {
31 | Throwable caughtThrowable = null;
32 |
33 | for (int i = 0; i < _retryCount; i++) {
34 | try {
35 | base.evaluate();
36 |
37 | return;
38 | }
39 | catch (Throwable t) {
40 | caughtThrowable = t;
41 |
42 | System.err.println(description.getDisplayName() + ": run " + (i + 1) + " failed.");
43 | }
44 | }
45 |
46 | System.err.println(description.getDisplayName() + ": giving up after " + _retryCount + " failures.");
47 |
48 | throw caughtThrowable;
49 | }
50 |
51 | };
52 | }
53 |
54 | private int _retryCount;
55 |
56 | }
--------------------------------------------------------------------------------
/extensions/project-templates-js-theme/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Description: Creates a JS Theme as a module project.
2 | Bundle-Name: Liferay Project Templates JS Theme
3 | Bundle-SymbolicName: com.liferay.project.templates.js.theme
4 | Bundle-Version: ${project.version}
5 | Liferay-Versions: [7,9999)
6 | -removeheaders:\
7 | Import-Package,\
8 | Private-Package,\
9 | Require-Capability
--------------------------------------------------------------------------------
/extensions/project-templates-js-theme/src/main/resources/META-INF/maven/archetype-metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | .gitignore
9 | build.gradle
10 | config.json
11 |
12 |
13 |
14 |
15 |
16 | maven
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/extensions/project-templates-js-theme/src/main/resources/META-INF/services/com.liferay.project.templates.extensions.ProjectTemplateCustomizer:
--------------------------------------------------------------------------------
1 | com.liferay.project.templates.js.theme.internal.JSThemeProjectTemplateCustomizer
--------------------------------------------------------------------------------
/extensions/project-templates-js-theme/src/main/resources/archetype-resources/build.gradle:
--------------------------------------------------------------------------------
1 | node{
2 | nodeVersion = "10.15.3"
3 | npmVersion = "6.4.1"
4 | }
--------------------------------------------------------------------------------
/extensions/project-templates-js-theme/src/main/resources/archetype-resources/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "batchMode": true,
3 | "answers": {
4 | "*": {
5 | "themeName": "[$THEME_NAME$]",
6 | "themeId": "[$THEME_ID$]",
7 | "liferayVersion": "[$LIFERAY_VERSION$]",
8 | "fontAwesome": "true"
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/extensions/project-templates-js-theme/src/main/resources/archetype-resources/gitignore:
--------------------------------------------------------------------------------
1 | .gradle/
2 | build/
3 | target/
--------------------------------------------------------------------------------
/extensions/project-templates-js-widget/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Description: Creates a JS Widget as a module project.
2 | Bundle-Name: Liferay Project Templates JS Widget
3 | Bundle-SymbolicName: com.liferay.project.templates.js.widget
4 | Bundle-Version: ${project.version}
5 | Liferay-Versions: [7,9999)
6 | -removeheaders:\
7 | Import-Package,\
8 | Private-Package,\
9 | Require-Capability
--------------------------------------------------------------------------------
/extensions/project-templates-js-widget/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd.gradle", version: "5.3.0"
4 | }
5 |
6 | repositories {
7 | maven {
8 | if (project.hasProperty("release")) {
9 | url "https://repository.liferay.com/nexus/content/groups/public"
10 | }
11 | else {
12 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
13 | }
14 | }
15 | }
16 | }
17 |
18 | apply plugin: "biz.aQute.bnd.builder"
19 | apply plugin: "java-library"
20 | apply plugin: "maven-publish"
21 |
22 | dependencies {
23 | compileOnly group: "com.liferay", name: "com.liferay.project.templates.extensions", version: "1.0.134"
24 | compileOnly group: "org.apache.maven.archetype", name: "archetype-common", version: "2.4"
25 | compileOnly project(":cli")
26 | testImplementation gradleTestKit()
27 | testImplementation group: "junit", name: "junit", version: "4.13.1"
28 | testImplementation project(":cli")
29 | testImplementation project(path: ":cli", configuration: "testApi")
30 | }
31 |
32 | compileJava{
33 | dependsOn(":cli:unzipPortal")
34 | dependsOn(":cli:unzipManifest")
35 | }
36 |
37 | jar{
38 | archiveBaseName.set("com.liferay.project.templates.js.widget")
39 | }
40 |
41 | publishing {
42 | publications {
43 | mavenProfileJar(MavenPublication) {
44 | artifactId = jar.archiveBaseName.get()
45 |
46 | from components.java
47 | }
48 | }
49 | }
50 |
51 | test {
52 | dependsOn jar
53 |
54 | doFirst {
55 | systemProperty 'jsWidgetTemplateJarFile', jar.archivePath
56 | }
57 | }
58 |
59 | version = "1.0.28-SNAPSHOT"
--------------------------------------------------------------------------------
/extensions/project-templates-js-widget/src/main/resources/META-INF/archetype-post-generate.groovy:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or modify it under
5 | * the terms of the GNU Lesser General Public License as published by the Free
6 | * Software Foundation; either version 2.1 of the License, or (at your option)
7 | * any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 | * details.
13 | */
14 |
15 | import java.nio.file.Files
16 | import java.nio.file.Path
17 | import java.nio.file.Paths
18 |
19 | Path projectPath = Paths.get(request.outputDirectory, request.artifactId)
20 |
21 | Path buildGradlePath = projectPath.resolve("build.gradle")
22 |
23 | Files.deleteIfExists buildGradlePath
24 |
25 | String nodePath =
26 | System.getProperty("user.home") + File.separator + ".blade" +
27 | File.separator + "cache" + File.separator + "node" +
28 | File.separator + "bin" + File.separator + "node";
29 |
30 |
--------------------------------------------------------------------------------
/extensions/project-templates-js-widget/src/main/resources/META-INF/maven/archetype-metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | .gitignore
9 | build.gradle
10 | config.json
11 |
12 |
13 |
14 |
15 |
16 | maven
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/extensions/project-templates-js-widget/src/main/resources/META-INF/services/com.liferay.project.templates.extensions.ProjectTemplateCustomizer:
--------------------------------------------------------------------------------
1 | com.liferay.project.templates.js.widget.internal.JSWidgetProjectTemplateCustomizer
--------------------------------------------------------------------------------
/extensions/project-templates-js-widget/src/main/resources/META-INF/services/com.liferay.project.templates.extensions.ProjectTemplatesArgsExt:
--------------------------------------------------------------------------------
1 | com.liferay.project.templates.js.widget.internal.JSWidgetProjectTemplatesArgsExt
--------------------------------------------------------------------------------
/extensions/project-templates-js-widget/src/main/resources/archetype-resources/build.gradle:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/extensions/project-templates-js-widget/src/main/resources/archetype-resources/build.gradle
--------------------------------------------------------------------------------
/extensions/project-templates-js-widget/src/main/resources/archetype-resources/gitignore:
--------------------------------------------------------------------------------
1 | .gradle/
2 | build/
3 | target/
--------------------------------------------------------------------------------
/extensions/project-templates-js-widget/src/main/resources/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "addConfigurationSupport": "[$ADD_CONFIGURATION_SUPPORT$]",
3 | "addLocalizationSupport": "[$ADD_LOCALIZATION_SUPPORT$]",
4 | "category": "[$CATEGORY$]",
5 | "createInitializer": "[$CREATE_INITIALIZER$]",
6 | "customElementName": "[$CUSTOM_ELEMENT_NAME$]",
7 | "description": "[$DESCRIPTION$]",
8 | "platform": "[$PLATFORM$]",
9 | "projectType": "[$PROJECT_TYPE$]",
10 | "target": "[$TARGET$]",
11 | "useShadowDOM": "[$USE_SHADOW_DOM$]"
12 | }
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Description: Creates a Liferay MVC portlet with NPM and Angular support as a module project.
2 | Bundle-Name: Liferay Project Templates NPM Angular Portlet
3 | Bundle-SymbolicName: com.liferay.project.templates.npm.angular.portlet
4 | Bundle-Version: ${project.version}
5 | Liferay-Versions: [7,9999.0)
6 | -removeheaders:\
7 | Import-Package,\
8 | Private-Package,\
9 | Require-Capability
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd.gradle", version: "5.3.0"
4 | }
5 |
6 | repositories {
7 | maven {
8 | if (project.hasProperty("release")) {
9 | url "https://repository.liferay.com/nexus/content/groups/public"
10 | }
11 | else {
12 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
13 | }
14 | }
15 | }
16 | }
17 |
18 | apply plugin: "biz.aQute.bnd.builder"
19 | apply plugin: "java"
20 | apply plugin: "maven-publish"
21 |
22 | dependencies {
23 | compileOnly group: "com.liferay", name: "com.liferay.project.templates.extensions", version: "1.0.143"
24 | compileOnly group: "org.apache.maven.archetype", name: "archetype-common", version: "2.4"
25 | compileOnly project(":cli")
26 | }
27 |
28 | compileJava{
29 | dependsOn(":cli:unzipPortal")
30 | dependsOn(":cli:unzipManifest")
31 | }
32 |
33 | jar{
34 | dependsOn(":cli:unzipPortal")
35 |
36 | archiveBaseName.set("com.liferay.project.templates.npm.angular.portlet")
37 | }
38 |
39 | publishing {
40 | publications {
41 | mavenProfileJar(MavenPublication) {
42 | artifactId = jar.archiveBaseName.get()
43 |
44 | from components.java
45 | }
46 | }
47 | }
48 |
49 | version = "1.0.196-SNAPSHOT"
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/java/com/liferay/project/templates/npm/angular/portlet/internal/NPMAngularPortletProjectTemplateCustomizer.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.project.templates.npm.angular.portlet.internal;
7 |
8 | import com.liferay.project.templates.extensions.ProjectTemplateCustomizer;
9 | import com.liferay.project.templates.extensions.ProjectTemplatesArgs;
10 |
11 | import java.io.File;
12 |
13 | import java.util.Properties;
14 |
15 | import org.apache.maven.archetype.ArchetypeGenerationRequest;
16 | import org.apache.maven.archetype.ArchetypeGenerationResult;
17 |
18 | /**
19 | * @author Gregory Amerson
20 | */
21 | public class NPMAngularPortletProjectTemplateCustomizer implements ProjectTemplateCustomizer {
22 |
23 | @Override
24 | public String getTemplateName() {
25 | return "npm-angular-portlet";
26 | }
27 |
28 | @Override
29 | public void onAfterGenerateProject(
30 | ProjectTemplatesArgs projectTemplatesArgs, File destinationDir,
31 | ArchetypeGenerationResult archetypeGenerationResult)
32 | throws Exception {
33 | }
34 |
35 | @Override
36 | public void onBeforeGenerateProject(
37 | ProjectTemplatesArgs projectTemplatesArgs, ArchetypeGenerationRequest archetypeGenerationRequest)
38 | throws Exception {
39 |
40 | Properties properties = archetypeGenerationRequest.getProperties();
41 |
42 | properties.put("packageJsonVersion", "1.0.0");
43 | }
44 |
45 | }
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/META-INF/archetype-post-generate.groovy:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | import java.nio.file.Files
7 | import java.nio.file.Path
8 | import java.nio.file.Paths
9 |
10 | Path projectPath = Paths.get(request.outputDirectory, request.artifactId)
11 |
12 | Path buildGradlePath = projectPath.resolve("build.gradle")
13 |
14 | Files.deleteIfExists buildGradlePath
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/META-INF/services/com.liferay.project.templates.extensions.ProjectTemplateCustomizer:
--------------------------------------------------------------------------------
1 | com.liferay.project.templates.npm.angular.portlet.internal.NPMAngularPortletProjectTemplateCustomizer
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/.babelrc:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/.npmbundlerrc:
--------------------------------------------------------------------------------
1 | {
2 | #if (${buildType} != "gradle")
3 | "output": "target/classes/META-INF/resources"
4 | #end
5 | }
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/bnd.bnd:
--------------------------------------------------------------------------------
1 | #set ($versionPolicy = '${replacestring;${range;[==,==]};.*,(.*)];$1}')
2 | Bundle-Name: ${artifactId}
3 | Bundle-SymbolicName: ${package}
4 | Bundle-Version: ${version}
5 | Export-Package: ${package}.constants
6 | Provide-Capability:\
7 | liferay.language.resources;\
8 | resource.bundle.base.name="content.Language"
9 | Web-ContextPath: /${artifactId}
10 | #if (${buildType} != "gradle")
11 | -consumer-policy: ${versionPolicy}
12 | #if (${liferayVersion.startsWith("7.1")})-contract: JavaPortlet,JavaServlet
13 | #end
14 | -jsp: *.jsp,*.jspf,*.jspx
15 | -metatype: *
16 | -plugin.jsp: com.liferay.ant.bnd.jsp.JspAnalyzerPlugin
17 | -plugin.metatype: com.liferay.ant.bnd.metatype.MetatypePlugin
18 | -plugin.npm: com.liferay.ant.bnd.npm.NpmAnalyzerPlugin
19 | -plugin.resourcebundle: com.liferay.ant.bnd.resource.bundle.ResourceBundleLoaderAnalyzerPlugin
20 | -plugin.sass: com.liferay.ant.bnd.sass.SassAnalyzerPlugin
21 | -provider-policy: ${versionPolicy}
22 | -sass: *#end
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | compileOnly group: "com.liferay.portal", name: "release.${liferayProduct}.api"
3 | }
4 |
5 | node {
6 | nodeVersion = "16.15.0"
7 | }
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/gitignore:
--------------------------------------------------------------------------------
1 | .gradle/
2 | build/
3 | node_modules/
4 | target/
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/package-lock.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/package-lock.json
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/src/main/java/constants/__className__PortletKeys.java:
--------------------------------------------------------------------------------
1 | package ${package}.constants;
2 |
3 | /**
4 | * @author ${author}
5 | */
6 | public class ${className}PortletKeys {
7 |
8 | public static final String ${className} = "${className.toLowerCase()}";
9 |
10 | }
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/init.jsp:
--------------------------------------------------------------------------------
1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
2 |
3 | <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
4 |
5 | <%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %><%@
6 | taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %><%@
7 | taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %><%@
8 | taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
9 |
10 |
11 |
12 |
13 |
14 | <%
15 | String mainRequire = (String)renderRequest.getAttribute("mainRequire");
16 | %>
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/lib/angular-loader.ts:
--------------------------------------------------------------------------------
1 | import 'core-js/es7/reflect';
2 | import 'zone.js/dist/zone';
3 |
4 | declare var Liferay: any;
5 |
6 | export default function(rootId: string) {
7 | Liferay.Loader.require(
8 | '${artifactId}@${packageJsonVersion}/lib/main',
9 | (main: any) => {
10 | main.default(rootId);
11 | },
12 | );
13 | }
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/lib/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | export class Hero {
4 | id: number = 0;
5 | name: string = "";
6 | }
7 |
8 | @Component({
9 | template: `
10 | {{title}}
11 | {{hero.name}} details!
12 | {{hero.id}}
13 |
14 |
15 |
16 |
17 | `,
18 | })
19 | export class AppComponent {
20 | hero: Hero = {
21 | id: 1,
22 | name: 'Windstorm'
23 | };
24 | title = 'Tour of Heroes';
25 | }
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/lib/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { FormsModule } from '@angular/forms';
3 | import { BrowserModule } from '@angular/platform-browser';
4 |
5 | import { AppComponent } from './app.component';
6 |
7 | @NgModule({
8 | imports: [
9 | BrowserModule,
10 | FormsModule
11 | ],
12 | declarations: [
13 | AppComponent
14 | ],
15 | entryComponents: [AppComponent],
16 | bootstrap: [], // Do not bootstrap anything (see ngDoBootstrap() below)
17 | providers: []
18 | })
19 | export class AppModule {
20 |
21 | // Avoid bootstraping any component statically because we need to attach to
22 | // the portlet's DOM, which is different for each portlet instance and,
23 | // thus, cannot be determined until the page is rendered (during runtime).
24 |
25 | ngDoBootstrap() {}
26 | }
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/lib/app/dynamic.loader.ts:
--------------------------------------------------------------------------------
1 | import {
2 | ApplicationRef,
3 | ComponentFactoryResolver,
4 | Injector,
5 | NgZone,
6 | Type,
7 | } from '@angular/core';
8 |
9 | export class DynamicLoader {
10 | constructor(private injector: Injector) {}
11 |
12 | // Load an Angular component dinamically so that we can attach it to
13 | // the portlet's DOM, which is different for each portlet instance and,
14 | // thus, cannot be determined until the page is rendered (during runtime).
15 |
16 | loadComponent(component: Type, dom: Element) {
17 | (this.injector.get(NgZone)).run(() => {
18 | const componentFactory = this.injector
19 | .get(ComponentFactoryResolver)
20 | .resolveComponentFactory(component);
21 | const componentRef = componentFactory.create(
22 | this.injector,
23 | [],
24 | dom,
25 | );
26 | this.injector.get(ApplicationRef).attachView(componentRef.hostView);
27 | });
28 | }
29 | }
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/lib/main.ts:
--------------------------------------------------------------------------------
1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2 |
3 | import { AppComponent } from './app/app.component';
4 | import { AppModule } from './app/app.module';
5 | import { DynamicLoader } from './app/dynamic.loader';
6 |
7 | export default function(rootId: any) {
8 | platformBrowserDynamic()
9 | .bootstrapModule(AppModule)
10 | .then((injector: any) => {
11 |
12 | // Load the bootstrap component dinamically so that we can attach it
13 | // to the portlet's DOM, which is different for each portlet
14 | // instance and, thus, cannot be determined until the page is
15 | // rendered (during runtime).
16 |
17 | // The rootId argument is passed from view.jsp where we can obtain
18 | // the portlet's namespace by using JSP tags.
19 |
20 | const dynamicLoader = new DynamicLoader(injector);
21 |
22 | dynamicLoader.loadComponent(AppComponent, rootId);
23 | });
24 | }
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/view.jsp:
--------------------------------------------------------------------------------
1 | <%@ include file="/init.jsp" %>
2 |
3 |
4 |
5 |
6 | main.default('#');
7 |
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/src/main/resources/content/Language.properties:
--------------------------------------------------------------------------------
1 | javax.portlet.display-name.${className.toLowerCase()}=${className}
2 | javax.portlet.keywords.${className.toLowerCase()}=${className}
3 | javax.portlet.short-title.${className.toLowerCase()}=${className}
4 | javax.portlet.title.${className.toLowerCase()}=${className}
--------------------------------------------------------------------------------
/extensions/project-templates-npm-angular-portlet/src/main/resources/archetype-resources/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "declaration": false,
4 | "emitDecoratorMetadata": true,
5 | "experimentalDecorators": true,
6 | "inlineSources": true,
7 | "lib": [
8 | "es2015",
9 | "dom"
10 | ],
11 | "module": "commonjs",
12 | "moduleResolution": "node",
13 | "noFallthroughCasesInSwitch": true,
14 | "noStrictGenericChecks": true,
15 | "outDir": #if (${buildType} != "gradle") "target/classes/META-INF/resources/lib"#else "build/resources/main/META-INF/resources/lib"#end,
16 | "skipLibCheck": true,
17 | "sourceMap": true,
18 | "strict": true,
19 | "suppressImplicitAnyIndexErrors": true,
20 | "target": "es5",
21 | "typeRoots": [
22 | "./node_modules/@types/"
23 | ],
24 | "types": [
25 | "jasmine",
26 | "node"
27 | ]
28 | },
29 | "include": [
30 | "src/**/*.ts"
31 | ]
32 | }
--------------------------------------------------------------------------------
/extensions/project-templates-social-bookmark/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Description: Creates a Liferay social bookmark module project that adds a new sharing platform.
2 | Bundle-Name: Liferay Project Templates Social Bookmark
3 | Bundle-SymbolicName: com.liferay.project.templates.social.bookmark
4 | Bundle-Version: ${project.version}
5 | Liferay-Versions: [7.1,7.2)
6 | -removeheaders:\
7 | Import-Package,\
8 | Private-Package,\
9 | Require-Capability
--------------------------------------------------------------------------------
/extensions/project-templates-social-bookmark/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd.gradle", version: "5.3.0"
4 | }
5 |
6 | repositories {
7 | maven {
8 | if (project.hasProperty("release")) {
9 | url "https://repository.liferay.com/nexus/content/groups/public"
10 | }
11 | else {
12 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
13 | }
14 | }
15 | }
16 | }
17 |
18 | apply plugin: "biz.aQute.bnd.builder"
19 | apply plugin: "eclipse"
20 | apply plugin: "java"
21 | apply plugin: "maven-publish"
22 |
23 | dependencies {
24 | compileOnly group: "com.liferay", name: "com.liferay.project.templates.extensions", version: "1.0.134"
25 | compileOnly group: "org.apache.maven.archetype", name: "archetype-common", version: "2.4"
26 | compileOnly project(":cli")
27 | }
28 |
29 | eclipse {
30 | classpath {
31 | file {
32 | whenMerged {
33 | entries.removeAll {
34 | it.kind == 'src' && it.path == 'src/main/resources'
35 | }
36 | }
37 | }
38 | }
39 | }
40 |
41 | compileJava{
42 | dependsOn(":cli:unzipPortal")
43 | dependsOn(":cli:unzipManifest")
44 | }
45 |
46 | jar{
47 | dependsOn(":cli:unzipPortal")
48 |
49 | archiveBaseName.set("com.liferay.project.templates.social.bookmark")
50 | }
51 |
52 | publishing {
53 | publications {
54 | mavenProfileJar(MavenPublication) {
55 | artifactId = jar.archiveBaseName.get()
56 |
57 | from components.java
58 | }
59 | }
60 | }
61 |
62 | version = "1.0.25-SNAPSHOT"
--------------------------------------------------------------------------------
/extensions/project-templates-social-bookmark/src/main/resources/META-INF/archetype-post-generate.groovy:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or modify it under
5 | * the terms of the GNU Lesser General Public License as published by the Free
6 | * Software Foundation; either version 2.1 of the License, or (at your option)
7 | * any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 | * details.
13 | */
14 |
15 | import java.nio.file.Files
16 | import java.nio.file.Path
17 | import java.nio.file.Paths
18 |
19 | Path projectPath = Paths.get(request.outputDirectory, request.artifactId)
20 |
21 | Path buildGradlePath = projectPath.resolve("build.gradle")
22 |
23 | Files.deleteIfExists buildGradlePath
--------------------------------------------------------------------------------
/extensions/project-templates-social-bookmark/src/main/resources/META-INF/maven/archetype-metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | src/main/java
7 |
8 | **/*.java
9 |
10 |
11 |
12 | src/main/resources
13 |
14 | **/*
15 |
16 |
17 |
18 |
19 |
20 | .gitignore
21 | bnd.bnd
22 | build.gradle
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | maven
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/extensions/project-templates-social-bookmark/src/main/resources/archetype-resources/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Name: ${artifactId}
2 | Bundle-SymbolicName: ${package}
3 | Bundle-Version: ${version}
4 | Web-ContextPath: /${artifactId}
5 | #if (${buildType} != "gradle")
6 | -jsp: *.jsp,*.jspf
7 | -metatype: *
8 | -plugin.jsp: com.liferay.ant.bnd.jsp.JspAnalyzerPlugin
9 | -plugin.metatype: com.liferay.ant.bnd.metatype.MetatypePlugin
10 | -plugin.resourcebundle: com.liferay.ant.bnd.resource.bundle.ResourceBundleLoaderAnalyzerPlugin
11 | -plugin.sass: com.liferay.ant.bnd.sass.SassAnalyzerPlugin
12 | -sass: *#end
--------------------------------------------------------------------------------
/extensions/project-templates-social-bookmark/src/main/resources/archetype-resources/build.gradle:
--------------------------------------------------------------------------------
1 | dependencies {
2 | compileOnly group: "com.liferay", name: "com.liferay.frontend.taglib"
3 | compileOnly group: "com.liferay", name: "com.liferay.frontend.taglib.clay"
4 | compileOnly group: "com.liferay", name: "com.liferay.frontend.taglib.soy"
5 | compileOnly group: "com.liferay", name: "com.liferay.social.bookmarks.api"
6 | compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel"
7 | compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib"
8 | compileOnly (group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1") {force = true}
9 | compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations"
10 | }
--------------------------------------------------------------------------------
/extensions/project-templates-social-bookmark/src/main/resources/archetype-resources/gitignore:
--------------------------------------------------------------------------------
1 | .gradle/
2 | build/
3 | target/
--------------------------------------------------------------------------------
/extensions/project-templates-social-bookmark/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/icons.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/extensions/project-templates-social-bookmark/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/init.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | /**
3 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
4 | *
5 | * This library is free software; you can redistribute it and/or modify it under
6 | * the terms of the GNU Lesser General Public License as published by the Free
7 | * Software Foundation; either version 2.1 of the License, or (at your option)
8 | * any later version.
9 | *
10 | * This library is distributed in the hope that it will be useful, but WITHOUT
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 | * details.
14 | */
15 | --%>
16 |
17 | <%@ taglib uri="http://liferay.com/tld/clay" prefix="clay" %><%@
18 | taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
19 |
20 | <%@ page import="com.liferay.portal.kernel.util.GetterUtil" %><%@
21 | page import="com.liferay.portal.kernel.util.PortalUtil" %><%@
22 | page import="com.liferay.social.bookmarks.SocialBookmark" %>
23 |
24 |
--------------------------------------------------------------------------------
/extensions/project-templates-social-bookmark/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/page.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | /**
3 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
4 | *
5 | * This library is free software; you can redistribute it and/or modify it under
6 | * the terms of the GNU Lesser General Public License as published by the Free
7 | * Software Foundation; either version 2.1 of the License, or (at your option)
8 | * any later version.
9 | *
10 | * This library is distributed in the hope that it will be useful, but WITHOUT
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 | * details.
14 | */
15 | --%>
16 |
17 | <%@ include file="/init.jsp" %>
18 |
19 | <%
20 | SocialBookmark socialBookmark = (SocialBookmark)request.getAttribute("liferay-social-bookmarks:bookmark:socialBookmark");
21 | String title = GetterUtil.getString((String)request.getAttribute("liferay-social-bookmarks:bookmark:title"));
22 | String url = GetterUtil.getString((String)request.getAttribute("liferay-social-bookmarks:bookmark:url"));
23 | %>
24 |
25 | "
31 | title="<%= socialBookmark.getName(locale) %>"
32 | />
--------------------------------------------------------------------------------
/extensions/project-templates-social-bookmark/src/main/resources/archetype-resources/src/main/resources/content/Language.properties:
--------------------------------------------------------------------------------
1 | ${className.toLowerCase()}=${className}
--------------------------------------------------------------------------------
/extensions/remote-deploy-command/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd.gradle", version: "5.3.0"
4 | }
5 |
6 | repositories {
7 | maven {
8 | if (project.hasProperty("release")) {
9 | url "https://repository.liferay.com/nexus/content/groups/public"
10 | }
11 | else {
12 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
13 | }
14 | }
15 | }
16 | }
17 |
18 | apply plugin: "biz.aQute.bnd.builder"
19 | apply plugin: "java-library"
20 | apply plugin: "maven-publish"
21 |
22 | dependencies {
23 | api group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "5.3.0"
24 | api group: "com.liferay.blade", name: "com.liferay.blade.cli", version: "latest.integration"
25 | compileOnly group: "com.beust", name: "jcommander", version: "1.82"
26 | compileOnly group: "org.osgi", name: "osgi.core", version: "6.0.0"
27 | }
28 |
29 | publishing {
30 | publications {
31 | deployRemoteCommand(MavenPublication) {
32 | artifactId = "com.liferay.blade.extensions.remote.deploy.command"
33 |
34 | from components.java
35 | }
36 | }
37 | }
38 |
39 | version = "1.0.35-SNAPSHOT"
--------------------------------------------------------------------------------
/extensions/remote-deploy-command/src/main/java/com/liferay/blade/extensions/remote/deploy/command/RemoteDeployArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.extensions.remote.deploy.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | import com.liferay.blade.cli.command.BaseArgs;
12 |
13 | /**
14 | * @author Gregory Amerson
15 | */
16 | @Parameters(
17 | commandDescription = "Builds and deploys bundles to the Liferay module framework with gogo shell.",
18 | commandNames = {"rdeploy", "remote-deploy"}
19 | )
20 | public class RemoteDeployArgs extends BaseArgs {
21 |
22 | public boolean isWatch() {
23 | return _watch;
24 | }
25 |
26 | @Parameter(
27 | description = "Watches the deployed file for changes and will automatically redeploy", names = {"-w", "--watch"}
28 | )
29 | private boolean _watch;
30 |
31 | }
--------------------------------------------------------------------------------
/extensions/remote-deploy-command/src/main/resources/META-INF/services/com.liferay.blade.cli.command.BaseCommand:
--------------------------------------------------------------------------------
1 | com.liferay.blade.extensions.remote.deploy.command.RemoteDeployCommand
--------------------------------------------------------------------------------
/extensions/sample-command/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Name: custom-command
2 | Bundle-SymbolicName: com.liferay.extensions.sample.command
3 | Bundle-Version: ${project.version}
--------------------------------------------------------------------------------
/extensions/sample-command/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd.gradle", version: "5.3.0"
4 | classpath group: "de.undercouch", name: "gradle-download-task", version: "3.3.0"
5 | }
6 |
7 | repositories {
8 | maven {
9 | if (project.hasProperty("release")) {
10 | url "https://repository.liferay.com/nexus/content/groups/public"
11 | }
12 | else {
13 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
14 | }
15 | }
16 | }
17 | }
18 |
19 | apply plugin: "java-library"
20 | apply plugin: 'biz.aQute.bnd.builder'
21 |
22 | dependencies {
23 | compileOnly group: "com.beust", name: "jcommander", version: "1.82"
24 | compileOnly project(":cli")
25 | testImplementation gradleTestKit()
26 | testImplementation group: "junit", name: "junit", version: "4.13.1"
27 | testImplementation project(path: ":cli")
28 | testImplementation project(path: ":cli", configuration: "testApi")
29 | }
30 |
31 | compileJava{
32 | dependsOn(":cli:unzipPortal")
33 | dependsOn(":cli:unzipManifest")
34 | }
35 |
36 | jar{
37 | dependsOn(":cli:unzipPortal")
38 | dependsOn(":cli:unzipManifest")
39 | }
40 |
41 | test {
42 | dependsOn jar
43 |
44 | doFirst {
45 | systemProperty 'sampleCommandJarFile', jar.archivePath
46 | }
47 | }
48 |
49 | version = "1.0.0"
--------------------------------------------------------------------------------
/extensions/sample-command/src/main/java/com/liferay/extensions/sample/command/Hello.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.extensions.sample.command;
7 |
8 | import com.liferay.blade.cli.command.BaseCommand;
9 | import com.liferay.extensions.sample.command.util.HelloUtil;
10 |
11 | /**
12 | * @author Liferay
13 | */
14 | public class Hello extends BaseCommand {
15 |
16 | @Override
17 | public void execute() throws Exception {
18 | HelloArgs helloArgs = getArgs();
19 |
20 | if (!helloArgs.isQuiet()) {
21 | getBladeCLI().out(HelloUtil.getHello(helloArgs));
22 | }
23 | }
24 |
25 | @Override
26 | public Class getArgsClass() {
27 | return HelloArgs.class;
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/extensions/sample-command/src/main/java/com/liferay/extensions/sample/command/HelloArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.extensions.sample.command;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | import com.liferay.blade.cli.command.BaseArgs;
12 |
13 | /**
14 | * @author Liferay
15 | */
16 | @Parameters(commandDescription = "Executes a hello command", commandNames = "hello")
17 | public class HelloArgs extends BaseArgs {
18 |
19 | public String getName() {
20 | return _name;
21 | }
22 |
23 | @Parameter(description = "The name to say hello to", names = "--name", required = true)
24 | private String _name;
25 |
26 | }
--------------------------------------------------------------------------------
/extensions/sample-command/src/main/java/com/liferay/extensions/sample/command/HelloMaven.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.extensions.sample.command;
7 |
8 | import com.liferay.blade.cli.command.BaseCommand;
9 | import com.liferay.blade.cli.command.BladeProfile;
10 |
11 | /**
12 | * @author Liferay
13 | */
14 | @BladeProfile("maven")
15 | public class HelloMaven extends BaseCommand {
16 |
17 | @Override
18 | public void execute() throws Exception {
19 | HelloArgs helloArgs = getArgs();
20 |
21 | if (!helloArgs.isQuiet()) {
22 | getBladeCLI().out("Hello from maven " + helloArgs.getName());
23 | }
24 | }
25 |
26 | @Override
27 | public Class getArgsClass() {
28 | return HelloArgs.class;
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/extensions/sample-command/src/main/java/com/liferay/extensions/sample/command/util/HelloUtil.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.extensions.sample.command.util;
7 |
8 | import com.liferay.extensions.sample.command.HelloArgs;
9 |
10 | /**
11 | * @author Liferay
12 | */
13 | public class HelloUtil {
14 |
15 | public static String getHello(HelloArgs helloArgs) {
16 | return "Hello " + helloArgs.getName() + "!";
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/extensions/sample-command/src/main/resources/META-INF/services/com.liferay.blade.cli.command.BaseCommand:
--------------------------------------------------------------------------------
1 | com.liferay.extensions.sample.command.Hello
2 | com.liferay.extensions.sample.command.HelloMaven
--------------------------------------------------------------------------------
/extensions/sample-profile/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Name: custom-profile
2 | Bundle-SymbolicName: com.liferay.extensions.sample.profile
3 | Bundle-Version: ${project.version}
--------------------------------------------------------------------------------
/extensions/sample-profile/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd.gradle", version: "5.3.0"
4 | classpath group: "de.undercouch", name: "gradle-download-task", version: "3.3.0"
5 | }
6 |
7 | repositories {
8 | maven {
9 | if (project.hasProperty("release")) {
10 | url "https://repository.liferay.com/nexus/content/groups/public"
11 | }
12 | else {
13 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
14 | }
15 | }
16 | }
17 | }
18 |
19 | apply plugin: "java-library"
20 | apply plugin: 'biz.aQute.bnd.builder'
21 |
22 | compileJava{
23 | dependsOn(":cli:unzipPortal")
24 | dependsOn(":cli:unzipManifest")
25 | }
26 |
27 | jar{
28 | dependsOn(":cli:unzipPortal")
29 | dependsOn(":cli:unzipManifest")
30 | }
31 |
32 | dependencies {
33 | compileOnly group: "com.beust", name: "jcommander", version: "1.82"
34 | compileOnly project(":cli")
35 | testImplementation gradleTestKit()
36 | testImplementation group: "junit", name: "junit", version: "4.13.1"
37 | testImplementation project(":cli")
38 | testImplementation project(path: ":cli", configuration: "testApi")
39 | }
40 |
41 | version = "1.0.0"
--------------------------------------------------------------------------------
/extensions/sample-profile/src/main/java/com/liferay/extensions/sample/profile/NewArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.extensions.sample.profile;
7 |
8 | import com.beust.jcommander.Parameter;
9 | import com.beust.jcommander.Parameters;
10 |
11 | import com.liferay.blade.cli.command.BaseArgs;
12 |
13 | /**
14 | * @author Liferay
15 | */
16 | @Parameters(commandDescription = "New Command", commandNames = "foo")
17 | public class NewArgs extends BaseArgs {
18 |
19 | public String getData() {
20 | return _data;
21 | }
22 |
23 | @Parameter(description = "Default data", required = true)
24 | private String _data;
25 |
26 | }
--------------------------------------------------------------------------------
/extensions/sample-profile/src/main/java/com/liferay/extensions/sample/profile/NewCommand.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.extensions.sample.profile;
7 |
8 | import com.liferay.blade.cli.command.BaseCommand;
9 | import com.liferay.blade.cli.command.BladeProfile;
10 |
11 | /**
12 | * @author Liferay
13 | */
14 | @BladeProfile("foo")
15 | public class NewCommand extends BaseCommand {
16 |
17 | @Override
18 | public void execute() throws Exception {
19 | NewArgs args = getArgs();
20 |
21 | if (!args.isQuiet()) {
22 | getBladeCLI().out("NewCommand says " + args.getData());
23 | }
24 | }
25 |
26 | @Override
27 | public Class getArgsClass() {
28 | return NewArgs.class;
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/extensions/sample-profile/src/main/java/com/liferay/extensions/sample/profile/OverriddenArgs.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.extensions.sample.profile;
7 |
8 | import com.beust.jcommander.Parameters;
9 |
10 | import com.liferay.blade.cli.command.DeployArgs;
11 |
12 | /**
13 | * @author Liferay
14 | */
15 | @Parameters(commandDescription = "Overriden Deploy Command", commandNames = "deploy")
16 | public class OverriddenArgs extends DeployArgs {
17 | }
--------------------------------------------------------------------------------
/extensions/sample-profile/src/main/java/com/liferay/extensions/sample/profile/OverriddenCommand.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.extensions.sample.profile;
7 |
8 | import com.liferay.blade.cli.command.BaseCommand;
9 | import com.liferay.blade.cli.command.BladeProfile;
10 |
11 | /**
12 | * @author Liferay
13 | */
14 | @BladeProfile("foo")
15 | public class OverriddenCommand extends BaseCommand {
16 |
17 | @Override
18 | public void execute() throws Exception {
19 | OverriddenArgs args = getArgs();
20 |
21 | if (!args.isQuiet()) {
22 | getBladeCLI().out("OverriddenCommand says " + args.isWatch());
23 | }
24 | }
25 |
26 | @Override
27 | public Class getArgsClass() {
28 | return OverriddenArgs.class;
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/extensions/sample-profile/src/main/resources/META-INF/services/com.liferay.blade.cli.command.BaseCommand:
--------------------------------------------------------------------------------
1 | com.liferay.extensions.sample.profile.NewCommand
2 | com.liferay.extensions.sample.profile.OverriddenCommand
--------------------------------------------------------------------------------
/extensions/sample-template/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Description: Creates a Sample as a module project.
2 | Bundle-Name: Liferay Project Templates Sample
3 | Bundle-SymbolicName: com.liferay.project.templates.sample
4 | Bundle-Version: ${project.version}
5 | Liferay-Versions: [7,9999)
6 | -removeheaders:\
7 | Import-Package,\
8 | Private-Package,\
9 | Require-Capability
--------------------------------------------------------------------------------
/extensions/sample-template/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd.gradle", version: "5.3.0"
4 | }
5 |
6 | repositories {
7 | maven {
8 | if (project.hasProperty("release")) {
9 | url "https://repository.liferay.com/nexus/content/groups/public"
10 | }
11 | else {
12 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
13 | }
14 | }
15 | }
16 | }
17 |
18 | apply plugin: "biz.aQute.bnd.builder"
19 | apply plugin: "eclipse"
20 | apply plugin: "java-library"
21 |
22 | dependencies {
23 | compileOnly project(":cli")
24 | testImplementation gradleTestKit()
25 | testImplementation group: "junit", name: "junit", version: "4.13.1"
26 | testImplementation project(path: ":cli")
27 | testImplementation project(path: ":cli", configuration: "testApi")
28 | }
29 |
30 | eclipse {
31 | classpath {
32 | sourceSets -= [sourceSets.main]
33 | }
34 | }
35 |
36 | compileJava{
37 | dependsOn(":cli:unzipPortal")
38 | dependsOn(":cli:unzipManifest")
39 | }
40 |
41 | jar{
42 | dependsOn(":cli:unzipPortal")
43 | dependsOn(":cli:unzipManifest")
44 |
45 | archiveBaseName.set("com.liferay.project.templates.sample")
46 | }
47 |
48 | test {
49 | dependsOn jar
50 |
51 | doFirst {
52 | systemProperty 'sampleTemplateJarFile', jar.archivePath
53 | }
54 | }
55 |
56 | version = "1.0.0"
--------------------------------------------------------------------------------
/extensions/sample-template/src/main/resources/META-INF/archetype-post-generate.groovy:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or modify it under
5 | * the terms of the GNU Lesser General Public License as published by the Free
6 | * Software Foundation; either version 2.1 of the License, or (at your option)
7 | * any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 | * details.
13 | */
14 |
15 | import java.nio.file.Files
16 | import java.nio.file.Path
17 | import java.nio.file.Paths
18 |
19 | Path projectPath = Paths.get(request.outputDirectory, request.artifactId)
20 |
21 | Path buildGradlePath = projectPath.resolve("build.gradle")
22 |
23 | Files.deleteIfExists buildGradlePath
--------------------------------------------------------------------------------
/extensions/sample-template/src/main/resources/META-INF/maven/archetype-metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | src/main/java
7 |
8 | **/*.java
9 |
10 |
11 |
12 | src/main/resources
13 |
14 | **/*
15 |
16 |
17 |
18 |
19 |
20 | .gitignore
21 | bnd.bnd
22 | build.gradle
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | maven
31 |
32 |
33 |
34 |
35 |
36 |
37 | standalone
38 |
39 |
40 |
--------------------------------------------------------------------------------
/extensions/sample-template/src/main/resources/archetype-resources/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Name: ${artifactId}
2 | Bundle-SymbolicName: ${package}
3 | Bundle-Version: ${version}
4 | Export-Package: ${package}.constants#if (${buildType} != "gradle")
5 | -jsp:\
6 | *.jsp,\
7 | *.jspf
8 | -plugin.jsp: com.liferay.ant.bnd.jsp.JspAnalyzerPlugin
9 | -plugin.resourcebundle: com.liferay.ant.bnd.resource.bundle.ResourceBundleLoaderAnalyzerPlugin
10 | -plugin.sass: com.liferay.ant.bnd.sass.SassAnalyzerPlugin
11 | -sass: *#end
--------------------------------------------------------------------------------
/extensions/sample-template/src/main/resources/archetype-resources/build.gradle:
--------------------------------------------------------------------------------
1 | #if (${projectType} != "workspace")buildscript {
2 | dependencies {
3 | classpath group: "com.liferay", name: "com.liferay.gradle.plugins", version: "@com.liferay.gradle.plugins.version@"
4 | }
5 |
6 | repositories {
7 | maven {
8 | url "https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public"
9 | }
10 | }
11 | }
12 |
13 | apply plugin: "com.liferay.plugin"
14 |
15 | #end
16 | dependencies {
17 | compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"
18 | compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0"
19 | #if (${liferayVersion.startsWith("7.0")})
20 | compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0"
21 | #elseif (${liferayVersion.startsWith("7.1")})
22 | compileOnly group: "javax.portlet", name: "portlet-api", version: "3.0.0"
23 | #end
24 | compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
25 | compileOnly group: "jstl", name: "jstl", version: "1.2"
26 | compileOnly group: "org.osgi", name: "osgi.cmpn", version: "6.0.0"
27 | }
28 | #if (${projectType} != "workspace")
29 |
30 | repositories {
31 | maven {
32 | url "https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public"
33 | }
34 | }#end
--------------------------------------------------------------------------------
/extensions/sample-template/src/main/resources/archetype-resources/gitignore:
--------------------------------------------------------------------------------
1 | .gradle/
2 | build/
3 | target/
--------------------------------------------------------------------------------
/extensions/sample-template/src/main/resources/archetype-resources/src/main/java/constants/__className__PortletKeys.java:
--------------------------------------------------------------------------------
1 | package ${package}.constants;
2 |
3 | /**
4 | * @author ${author}
5 | */
6 | public class ${className}PortletKeys {
7 |
8 | public static final String ${className} = "${className.toLowerCase()}";
9 |
10 | }
--------------------------------------------------------------------------------
/extensions/sample-template/src/main/resources/archetype-resources/src/main/java/portlet/__className__Portlet.java:
--------------------------------------------------------------------------------
1 | package ${package}.portlet;
2 |
3 | import ${package}.constants.${className}PortletKeys;
4 |
5 | import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet;
6 |
7 | import javax.portlet.Portlet;
8 |
9 | import org.osgi.service.component.annotations.Component;
10 |
11 | /**
12 | * @author ${author}
13 | */
14 | @Component(
15 | immediate = true,
16 | property = {
17 | "com.liferay.portlet.display-category=category.sample",
18 | "com.liferay.portlet.instanceable=true",
19 | "javax.portlet.init-param.template-path=/",
20 | "javax.portlet.init-param.view-template=/view.jsp",
21 | "javax.portlet.name=" + ${className}PortletKeys.${className},
22 | "javax.portlet.resource-bundle=content.Language",
23 | "javax.portlet.security-role-ref=power-user,user"
24 | },
25 | service = Portlet.class
26 | )
27 | public class ${className}Portlet extends MVCPortlet {
28 | }
--------------------------------------------------------------------------------
/extensions/sample-template/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/init.jsp:
--------------------------------------------------------------------------------
1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
2 |
3 | <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
4 |
5 | <%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %><%@
6 | taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %><%@
7 | taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %><%@
8 | taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/extensions/sample-template/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/view.jsp:
--------------------------------------------------------------------------------
1 | <%@ include file="/init.jsp" %>
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/extensions/sample-template/src/main/resources/archetype-resources/src/main/resources/content/Language.properties:
--------------------------------------------------------------------------------
1 | javax.portlet.display-name.${className.toLowerCase()}=${className}
2 | javax.portlet.keywords.${className.toLowerCase()}=${className}
3 | javax.portlet.short-title.${className.toLowerCase()}=${className}
4 | javax.portlet.title.${className.toLowerCase()}=${className}
5 | ${className.toLowerCase()}.caption=Hello from ${className}!
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/bnd.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Description: Creates a sample workspace template
2 | Bundle-Name: Liferay Project Templates Workspace Sample
3 | Bundle-SymbolicName: com.liferay.project.templates.workspace.sample
4 | Bundle-Version: ${project.version}
5 | Liferay-Versions: [7,9999)
6 | -removeheaders:\
7 | Import-Package,\
8 | Private-Package,\
9 | Require-Capability
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd.gradle", version: "5.3.0"
4 | }
5 |
6 | repositories {
7 | maven {
8 | if (project.hasProperty("release")) {
9 | url "https://repository.liferay.com/nexus/content/groups/public"
10 | }
11 | else {
12 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
13 | }
14 | }
15 | }
16 | }
17 |
18 | apply plugin: "biz.aQute.bnd.builder"
19 | apply plugin: "eclipse"
20 | apply plugin: "java-library"
21 |
22 | dependencies {
23 | compileOnly project(":cli")
24 | testImplementation gradleTestKit()
25 | testImplementation group: "junit", name: "junit", version: "4.13.1"
26 | testImplementation project(path: ":cli")
27 | testImplementation project(path: ":cli", configuration: "testApi")
28 | }
29 |
30 | eclipse {
31 | classpath {
32 | sourceSets -= [sourceSets.main]
33 | }
34 | }
35 |
36 | compileJava{
37 | dependsOn(":cli:unzipPortal")
38 | dependsOn(":cli:unzipManifest")
39 | }
40 |
41 | jar{
42 | dependsOn(":cli:unzipPortal")
43 | dependsOn(":cli:unzipManifest")
44 |
45 | archiveBaseName.set("com.liferay.project.templates.workspace.sample")
46 | }
47 |
48 | test {
49 | dependsOn jar
50 |
51 | doFirst {
52 | systemProperty 'sampleTemplateJarFile', jar.archivePath
53 | }
54 | }
55 |
56 | version = "1.0.0"
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/META-INF/archetype-post-generate.groovy:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or modify it under
5 | * the terms of the GNU Lesser General Public License as published by the Free
6 | * Software Foundation; either version 2.1 of the License, or (at your option)
7 | * any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful, but WITHOUT
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 | * details.
13 | */
14 |
15 | import java.nio.file.Files
16 | import java.nio.file.Path
17 | import java.nio.file.Paths
18 |
19 | Path projectPath = Paths.get(request.outputDirectory, request.artifactId)
20 |
21 | Path buildGradlePath = projectPath.resolve("build.gradle")
22 |
23 | Files.deleteIfExists buildGradlePath
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/META-INF/maven/archetype-metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | configs/**
9 | modules/pom.xml
10 | themes/pom.xml
11 | wars/pom.xml
12 | .gitignore
13 | build.gradle
14 | gradle.properties
15 | gradle-local.properties
16 | settings.gradle
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/build.gradle:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/extensions/sample-workspace-template/src/main/resources/archetype-resources/build.gradle
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/configs/common/.touch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/extensions/sample-workspace-template/src/main/resources/archetype-resources/configs/common/.touch
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/configs/dev/portal-ext.properties:
--------------------------------------------------------------------------------
1 | include-and-override=portal-developer.properties
2 |
3 | #
4 | # MySQL
5 | #
6 | #jdbc.default.driverClassName=com.mysql.jdbc.Driver
7 | #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
8 | #jdbc.default.username=root
9 | #jdbc.default.password=
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/configs/local/portal-ext.properties:
--------------------------------------------------------------------------------
1 | include-and-override=portal-developer.properties
2 |
3 | #
4 | # MySQL
5 | #
6 | #jdbc.default.driverClassName=com.mysql.jdbc.Driver
7 | #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
8 | #jdbc.default.username=root
9 | #jdbc.default.password=
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/configs/prod/osgi/configs/com.liferay.portal.search.elasticsearch.configuration.ElasticsearchConfiguration.cfg:
--------------------------------------------------------------------------------
1 | operationMode=REMOTE
2 | transportAddresses=127.0.0.1:9300
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/configs/prod/portal-ext.properties:
--------------------------------------------------------------------------------
1 | #
2 | # MySQL
3 | #
4 | #jdbc.default.driverClassName=com.mysql.jdbc.Driver
5 | #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
6 | #jdbc.default.username=root
7 | #jdbc.default.password=
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/configs/uat/osgi/configs/com.liferay.portal.search.elasticsearch.configuration.ElasticsearchConfiguration.cfg:
--------------------------------------------------------------------------------
1 | operationMode=REMOTE
2 | transportAddresses=127.0.0.1:9300
3 | logExceptionsOnly=false
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/configs/uat/portal-ext.properties:
--------------------------------------------------------------------------------
1 | #
2 | # MySQL
3 | #
4 | #jdbc.default.driverClassName=com.mysql.jdbc.Driver
5 | #jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
6 | #jdbc.default.username=root
7 | #jdbc.default.password=
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/gitignore:
--------------------------------------------------------------------------------
1 | **/*.iml
2 | **/.ivy
3 | **/.classpath
4 | **/.project
5 | **/.sass-cache
6 | **/.settings
7 | **/bin
8 | **/build
9 | **/build_gradle
10 | **/node_modules
11 | **/test-coverage
12 | **/tmp
13 | **/.web_bundle_build
14 | .gradle
15 | .idea
16 | /bundles
17 | /gradle-*.properties
18 | /plugins-sdk/**/classes
19 | /plugins-sdk/**/ivy.xml.MD5
20 | /plugins-sdk/**/liferay-hook.xml.processed
21 | /plugins-sdk/build.*.properties
22 | /plugins-sdk/dependencies/**/*.jar
23 | /plugins-sdk/dist
24 | /plugins-sdk/lib
25 | test-results
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/gradle-local.properties:
--------------------------------------------------------------------------------
1 | ##
2 | ## Add per workspace user specific properties in this file. This file overrides
3 | ## the workspace's gradle.properties file.
4 | ##
5 |
6 | sample.setting=sample
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/modules/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 | 4.0.0
9 |
10 | ${groupId}
11 | ${artifactId}
12 | 1.0.0
13 | ../pom.xml
14 |
15 | ${artifactId}-modules
16 | ${artifactId} Modules
17 | pom
18 |
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/settings.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath group: "com.liferay", name: "com.liferay.gradle.plugins", version: "@com.liferay.gradle.plugins.version@"
4 | classpath group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "@com.liferay.gradle.plugins.workspace.version@"
5 | classpath group: "net.saliman", name: "gradle-properties-plugin", version: "1.4.6"
6 | }
7 |
8 | repositories {
9 | maven {
10 | url "https://repository-cdn.liferay.com/nexus/content/groups/public"
11 | }
12 | }
13 | }
14 |
15 | apply plugin: "net.saliman.properties"
16 |
17 | apply plugin: "com.liferay.workspace"
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/themes/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 | 4.0.0
9 |
10 | ${groupId}
11 | ${artifactId}
12 | 1.0.0
13 | ../pom.xml
14 |
15 | ${artifactId}-themes
16 | ${artifactId} Themes
17 | pom
18 |
--------------------------------------------------------------------------------
/extensions/sample-workspace-template/src/main/resources/archetype-resources/wars/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 | 4.0.0
9 |
10 | ${groupId}
11 | ${artifactId}
12 | 1.0.0
13 | ../pom.xml
14 |
15 | ${artifactId}-wars
16 | ${artifactId} Wars
17 | pom
18 |
--------------------------------------------------------------------------------
/gradle-tooling/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "java-library"
2 | apply plugin: "maven-publish"
3 |
4 | dependencies {
5 | api gradleApi()
6 | }
7 |
8 | /*
9 | publishing {
10 | publications {
11 | toolingJar(MavenPublication) {
12 | artifactId = "com.liferay.blade.gradle.tooling"
13 |
14 | from components.java
15 | }
16 | }
17 | }
18 | */
19 |
20 | version = "1.2.28-SNAPSHOT"
--------------------------------------------------------------------------------
/gradle-tooling/src/main/java/com/liferay/blade/gradle/tooling/ProjectInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
3 | * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 | */
5 |
6 | package com.liferay.blade.gradle.tooling;
7 |
8 | import java.io.File;
9 |
10 | import java.util.Map;
11 | import java.util.Set;
12 |
13 | /**
14 | * @author Gregory Amerson
15 | * @author Simon Jiang
16 | */
17 | public interface ProjectInfo {
18 |
19 | public String getDeployDir();
20 |
21 | public String getDockerContainerId();
22 |
23 | public String getDockerImageId();
24 |
25 | public String getDockerImageLiferay();
26 |
27 | public String getLiferayHome();
28 |
29 | public Set getPluginClassNames();
30 |
31 | public Map> getProjectOutputFiles();
32 |
33 | public boolean isLiferayProject();
34 |
35 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
2 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/libs/com.liferay.project.templates.npm.angular.portlet-1.0.196-SNAPSHOT.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/libs/com.liferay.project.templates.npm.angular.portlet-1.0.196-SNAPSHOT.jar
--------------------------------------------------------------------------------
/libs/org.objectweb.asm-6.0.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/libs/org.objectweb.asm-6.0.0.jar
--------------------------------------------------------------------------------
/libs/org.objectweb.asm.analysis-6.0.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/libs/org.objectweb.asm.analysis-6.0.0.jar
--------------------------------------------------------------------------------
/libs/org.objectweb.asm.commons-6.0.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/libs/org.objectweb.asm.commons-6.0.0.jar
--------------------------------------------------------------------------------
/libs/org.objectweb.asm.tree-6.0.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/libs/org.objectweb.asm.tree-6.0.0.jar
--------------------------------------------------------------------------------
/libs/org.objectweb.asm.util-6.0.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/libs/org.objectweb.asm.util-6.0.0.jar
--------------------------------------------------------------------------------
/nexus.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | docker stop /local-nexus
3 | docker rm /local-nexus
4 |
5 | docker pull sonatype/nexus:2.14.11-01 && \
6 | docker run -d -p 8081:8081 --name local-nexus sonatype/nexus:2.14.11-01
7 |
8 | until $(curl --output /dev/null --silent --head --fail http://localhost:8081/nexus/); do
9 | printf '.'
10 | sleep 5
11 | done
--------------------------------------------------------------------------------
/run-tests.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | CALL gradlew.bat --no-daemon clean
3 | CALL gradlew.bat --no-daemon :extensions:maven-profile:publishToMavenLocal -x :cli:bladeExtensionsVersions -x :cli:processResources
4 | CALL gradlew.bat --no-daemon :extensions:project-templates-js-theme:publishToMavenLocal -x :cli:bladeExtensionsVersions -x :cli:processResources
5 | CALL gradlew.bat --no-daemon :extensions:project-templates-js-widget:publishToMavenLocal -x :cli:bladeExtensionsVersions -x :cli:processResources
6 | CALL gradlew.bat --no-daemon -PmavenLocal -Pparallel --continue clean check smokeTests --scan -x :extensions:maven-profile:test --stacktrace
7 |
--------------------------------------------------------------------------------
/run-tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | function archiveTests {
4 | find . -name index.html | grep build/reports/tests | sed 's/\/test\/index\.html//' | xargs zip -o tests.zip -r
5 | find . -name "create*" | grep cli/build | xargs zip -ou tests.zip -r
6 | }
7 |
8 | function checkError {
9 | local retcode=$?
10 |
11 | if [ $retcode -ne 0 ]; then
12 | archiveTests
13 |
14 | exit $retcode
15 | fi
16 | }
17 |
18 | # Switch gradle wrapper distributionUrl to use -bin instead of -all. See BLADE-594 for more details
19 |
20 | sed "s/all/bin/" gradle/wrapper/gradle-wrapper.properties > gradle-wrapper.properties.edited
21 | mv gradle-wrapper.properties.edited gradle/wrapper/gradle-wrapper.properties
22 |
23 | ./gradlew --no-daemon :extensions:maven-profile:publishToMavenLocal -x :cli:bladeExtensionsVersions -x :cli:processResources --scan
24 |
25 | checkError
26 |
27 | ./gradlew --no-daemon :extensions:project-templates-js-theme:publishToMavenLocal -x :cli:bladeExtensionsVersions -x :cli:processResources --scan
28 |
29 | checkError
30 |
31 | ./gradlew --no-daemon :extensions:project-templates-js-widget:publishToMavenLocal -x :cli:bladeExtensionsVersions -x :cli:processResources --scan
32 |
33 | checkError
34 |
35 | ./gradlew --no-daemon -PmavenLocal -Pparallel --continue clean check smokeTests --scan --stacktrace
36 |
37 | checkError
38 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.gradle.enterprise" version "3.5.1"
3 | }
4 |
5 | gradleEnterprise {
6 | buildScan {
7 | termsOfServiceUrl = "https://gradle.com/terms-of-service"
8 | termsOfServiceAgree = "yes"
9 | }
10 | }
11 |
12 | include "cli"
13 | include "extensions:bad-command"
14 | include "extensions:maven-profile"
15 | include "extensions:project-templates-js-theme"
16 | include "extensions:project-templates-js-widget"
17 | include "extensions:project-templates-npm-angular-portlet"
18 | include "extensions:project-templates-social-bookmark"
19 | include "extensions:remote-deploy-command"
20 | include "extensions:sample-command"
21 | include "extensions:sample-profile"
22 | include "extensions:sample-template"
23 | include "extensions:sample-workspace-template"
24 | include "gradle-tooling"
--------------------------------------------------------------------------------
/source-formatter-suppressions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/tests.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liferay/liferay-blade-cli/603a2da82946cdb419cd5d7aee35523f13d7aadc/tests.zip
--------------------------------------------------------------------------------