input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public clean command get clean command return core get clean command | use this command to clean the generated content not including the log |
public archive command get assemble command return assemble command | use this command to create one or more jar files from the project |
public void ivy retrieve if ivy file exists ant target target new ant target ivy feature target get project set base dir parent get layout get root dir target init logging parent get layout get log file project msg info ivy retrieve new ivy retrieve target add task ivy retrieve ivy retrieve set task name ivy retrieve ivy retrieve set file ivy file if config null config run this target execute | downloads the dependencies described in the project ivy |
public void maven retrieve if maven file exists ant target target new ant target maven feature target init logging parent get layout get log file project msg info dependencies create dependencies target string classes dependency classes fileset dependencies set fileset id classes dependency copy classes add dependency target classes dependency string javadocs dependency javadocs fileset dependencies set javadoc fileset id javadocs dependency copy javadocs add dependency target javadocs dependency string sources dependency sources fileset dependencies set sources fileset id sources dependency copy sources add dependency target sources dependency if config null config run this target execute | downloads the dependencies described in the project pom |
private dependencies task create dependencies ant target target point to the project pom xml file in the conf directory pom pom new pom pom set task name maven feature pom target add task pom pom set id protoj project pom set file maven file assign the pom to a new dependencies task dependencies task dependencies new dependencies task dependencies set task name maven feature dependencies target add task dependencies dependencies set pom ref id protoj project return dependencies | sets up the basic maven dependencies task |
private aspect jcompile task create ajc task string includes string excludes project layout layout core get layout aspect jcompile task task new aspect jcompile task layout get java dir layout get classes dir core get layout get classpath config memory includes excludes task init logging layout get log file return task | creates the ajc compile implementation instance |
private javac compile task create javac task string includes string excludes project layout layout core get layout javac compile task task new javac compile task layout get java dir layout get classes dir core get layout get classpath config memory includes excludes task init logging layout get log file return task | creates the javac compile implementation instance |
public file get maven file return maven file | the maven pom file used to define project dependencies |
public string get version number return 1 7 5 | used in version information and names of jar files for example |
private void execute session standard project extracted project get extracted project file src dir extracted project get layout get src dir if src dir exists throw new runtime exception unable to find src directory for the compilation part of tar verification at src dir get absolute path script session session extracted project create script session throwing listener listener new throwing listener extracted project session add command retrieve listener null session add command compile listener null session add command test listener null session execute | executes the project commands failing if any of those commands |
private void copy resource string name file dest input stream resource get class get resource as stream foo name if dest exists dest get parent file mkdirs dest create new file copy resource new input stream reader resource dest | copies the named resource reletive to the skeleton project directory to |
private void relax permissions ant target target new ant target skeleton chmod chmod new chmod chmod set task name skeleton permissions target add task chmod chmod set dir layout get root dir get parent file chmod set includes layout get root name chmod set perm 777 target execute | apply 777 permissions all the way down |
public void release string gc user name string gc password string sf user name show summary create archives verify project archive upload to maven sf user name upload to google code gc user name gc password | carries out the steps to release protoj starting from just the compiled |
private void upload to google code string gc user name string gc password upload project archive gc user name gc password upload artifact project get jar name merged jar file with maximum dependencies gc user name gc password upload artifact project get no dep jar name merged executable jar file with minimum dependencies gc user name gc password | uploads the project archive the jar with dependencies and the jar with |
private void upload project archive string user name string password standard project delegate project get delegate string summary build from source with protoj sh archive string labels type archive op sys all featured string google name string format s src tar gz project get project name delegate get upload google code feature upload tar google name labels summary user name password | uploads the project tar archive to the googlecode website |
private void assert advice script session project session string stdout project session get current exec get stdout string expected before advice triggered at standard project assemble execution join point assert assert true stdout contains expected | asserts that advice was applied during load time weaving |
private void assert log contents string log acme session get project load log assert assert true log contains archive assert assert true log contains task archive started assert assert true log contains building jar assert assert true log contains target archive acme 1 0 jar assert assert true log contains target archive foo jar assert assert true log contains task archive finished | asserts that the build sent the expected text to the log file |
public standard project create hello world delegate return new sample project feature create sample project this example helloworld helloworld sh null jar | copies the example helloworld project to the target directory and returns |
public standard project create alien project delegate return new sample project feature create sample project this example alien alien sh null jar | copies the example alien project to the target directory and returns a |
public standard project create foo project delegate create no dep archive ant target target new ant target foo project layout layout delegate get layout target init logging layout get log file project msg info java java new java target add task java java set task name foo java java set jar get no dep file java set fork true java set failonerror true java set dir layout get target dir target execute file root dir new file layout get target dir foo return new standard project root dir foo sh null | ensures the no dependencies jar file is present and executes it so that |
public skeleton project feature get skeleton project feature return skeleton project feature | a reference to the delegate object used to create a skeleton project |
public standard project create acme project delegate return new sample project feature create sample project this src testproject acme acme sh aspectjtools jar aspectjweaver jar aspectjrt jar null | copies the example acme project to the target directory and returns a |
public void compile javac list string options file src dir parent get layout get src dir if src dir exists parent get logger info applying javac options compile feature compile feature parent get compile feature javac compile task task compile feature create javac task assign properties options task compile feature copy resources task execute if task is success throw new information exception there was a problem compiling the source code | compiles a set of files in the source directory using the javac compiler |
public void compile ajc list string options file src dir parent get layout get src dir if src dir exists parent get logger info applying ajc options compile feature compile feature parent get compile feature aspect jcompile task task compile feature create ajc task assign properties options task compile feature copy resources task execute if task is success throw new information exception there was a problem compiling the source code | aspectj compiling equivalent of |
public string get version number return 1 8 2 | used in version information and names of jar files for example |
private void copy resource file dest string relative path layout get relative path dest replace string source protoj demo relative path input stream resource get class get resource as stream source if resource null throw new runtime exception couldn t find resource source if dest exists dest get parent file mkdirs dest create new file input stream reader in new input stream reader resource try file output stream out new file output stream dest try ioutils copy in out finally ioutils close quietly out finally ioutils close quietly in | copies the file under the demo resource path to the specified dest |
public void dispatch commands if is show version service report version else if is show help string name get help target if name null service report project help else command command service get command store get command name proto property property service get property store get property name if command null service report command help command else if property null service report property help property else service report project help else do dispatch commands | displays version information or help information if one of |
public bootstrap service get service return service | the parent service for this store |
public void set help target string help target this help target help target | sets the target that help is required for |
public void override main class string main class for command command commands command init main class main class | for internal use only |
private runnable create bootstrap action runnable bootstrap new runnable public void run start vm get max memory return bootstrap | constructor support that creates the vm wrapper used to delegate the |
private option set create options string args option parser parser new option parser d parser accepts project session root dir option with required arg of type file class parser accepts project session script name option with required arg parser accepts project session version option parser accepts project session help option with optional arg option set options parser parse args return options | uses the jargs option parser in order to break down the command line |
private void start vm final string max memory start vm command vm store create vm get definition max memory main class jvm args vm execute vm write output if vm get result equals 1 throw new runtime exception unexpected application failure else if vm get result equals 2 throw new information exception null | this method must not be inlined into the anonymous inner class as the |
private file create root dir option set options if options has argument project session root dir option throw new runtime exception please specify a valid project root with the root dir switch file root dir file options value of project session root dir option get canonical file return root dir | checks for a mandatory command line option called root dir |
private string create script name option set options if options has project session script name option throw new runtime exception please specify a valid script name with the script name switch string script name string options value of project session script name option return script name | checks for a mandatory command line option called script name |
public void set from script boolean from script this from script from script | called by the shell config |
public void init body runnable body this body body | plug in point for the main command implementation and defines what the |
public void execute string args list string jvm args this args args this jvm args jvm args if args null this options parser parse args split else this options parser parse new string boolean execute body options has body if execute body body run else bootstrap run | executes this command using the given args in one of two ways |
public void add command definition string definition command definitions add definition | adds another definition to the configuration |
public void dispatch commands get service get session dispatch commands | see code standard project dispatch commands code |
public string get version number return 1 6 | used in version information and names of jar files for example |
public void add mandatory args start vm command vm vm init args project session root dir option vm init args get root dir get absolute path vm init args project session script name option vm init args get script name | adds the mandatory |
private scp task create scp task string tar path project get tar feature get compressed path file tar file new file tar path if tar file exists project terminate application no tar file scp won t work until a tar file has been generated with the tar command scp task scp new scp task to dir tar file project layout layout project get layout file log file layout get log file scp init logging log file return scp | creates the default scp task instance ready for further customization |
public boolean has args return args null | returns whether or not this command has non null args |
public proto property get from script property return from script property | whether or not we reached the vm from a shell script intended for |
private void apply rwx project layout layout project get layout create the parent ant target ant target target new ant target extract tar files target init logging layout get log file project msg info applies the chmod chmod chmod new chmod chmod set task name rwx target add task chmod chmod set dir get layout get root dir chmod set includes chmod set perm 777 target execute | applies rwx permissions to the extracted project |
private void execute session project layout layout get layout file src dir layout get src dir file shell script layout get shell script if src dir exists throw new runtime exception unable to find src directory for the compilation part of tar verification at src dir get absolute path script session session new script session shell script throwing listener listener new throwing listener shell script session add command compile listener null session add command assemble listener null session add command test listener null session execute | executes the project commands failing if any of those commands |
public project layout get layout project layout this layout project get layout file verify tar dir new file this layout get target dir verify tar string prefix project get tar feature get prefix file root dir new file verify tar dir prefix string script name this layout get script name return new project layout root dir script name | creates a layout instance representing the project being verified in the |
public string get definition string name get name string definition if has args definition name args else definition name return definition | includes both the command name and arguments if any that make up the |
public void release string user name string password standard project delegate project get project show summary delegate delegate get assemble feature assemble delegate get junit feature junit delegate get tar feature tar false true delegate get verify tar feature verify tar verify proto resources delegate get upload google code feature upload tar user name password | convenient short hand for invoking the assemble javadocs test tar |
public void throw bad options exception string hint string builder builder new string builder builder append the following command contained unrecognized options ignore any body switch n n builder append get definition boolean is hint specified hint null hint length 0 if is hint specified builder append builder append hint builder append n n please review the command help as follows n builder append get help text store get service terminate application builder to string | throws an information exception with standardized error information |
public void dispatch commands bootstrap dispatch commands | dispatches the commands that were specified in the constructor |
public void init compiler string compiler memory service init compiler compiler memory | if compilation support is required then this method must be called after |
public void dispatch commands project dispatch commands | dispatches the commands that were specified in the constructor |
public void compile service compile | compiles all java code |
public void generate javadocs if javadoc task null javadoc task execute else terminate application please call standard project init javadoc string before executing the javadoc command | generates the javadocs in the |
public logger get logger return service get logger | access to the protoj log4j instance |
public string get version info return service get version info | a string that describes the version |
public string get version number return 1 8 1 | used in version information and names of jar files for example |
public void report command help command command service report command help command | reports help on the command argument |
public void report project help service report project help | reports general project help information by iterating over the commands |
public void report version service report version | reports version information as supplied to |
public void report property help proto property property service report property help property | reports help on the property argument |
public project session get session return service get session | access to the class responsible for containing all the commands to be |
public void dispatch commands get session dispatch commands | iterates over all the commands parsed from code main code |
public command store get command store return service get command store | delegated functionality see |
public scp command get scp command return service get scp command | the command line handler for delegating to the scp feature |
public compile command get compile command return service get compile command | the command line handler for delegating to the compile functionality |
public clean command get clean command return service get clean command | use this command to clean the generated content not including the log |
public assemble command get assemble command return service get assemble command | use this command to create one or more jar files from the project |
public junit command get junit command return service get junit command | use this command to exercise all junit tests under the source directory |
public tar command get tar command return service get tar command | use this command to make a compressed tar of the project |
public javadoc command get javadoc command return service get javadoc command | use this command to create the project javadocs |
public verify tar command get verify tar command return service get verify tar command | use this command to verify the correctness of a created project tar |
public property store get property store return service get property store | delegated functionality see |
public proto logger get proto logger return service get proto logger | delegated functionality see |
public project layout get layout return service get layout | delegated functionality see |
public void terminate application string reason service terminate application reason | causes the vm to terminate with the message argument logged |
public string load log file reader reader new file reader get layout get log file string contents try contents get contents reader return contents finally reader close | loads the log from disk and reads its content into a string |
public string get version number return 1 7 4 | used in version information and names of jar files for example |
private void upload to google code string gc user name string gc password upload project archive gc user name gc password upload artifact project get jar name merged jar file with maximum dependencies gc user name gc password upload artifact project get no dep jar name merged jar file with minimum dependencies gc user name gc password | uploads the project archive the jar with dependencies and the jar with |
private void upload project archive string user name string password standard project delegate project get delegate string summary build from source with protoj sh build jar string labels type archive op sys all featured string google name string format s src tar gz project get project name delegate get upload google code feature upload tar google name labels summary user name password | uploads the project tar archive to the googlecode website |
private file extract resource string resource string file name file dest file new file get working dir file name dest file create new file input stream in get class get resource as stream resource output stream out new file output stream dest file byte buf new byte 1024 int len while len in read buf 0 out write buf 0 len in close out close return dest file | maven and ivy require physical files so we have to extract the resource |
public string get version number return 1 7 7 | used in version information and names of jar files for example |
public file get ivy file if ivy file null ivy file extract resource ivy config ivy xml return ivy file | the ivy file used to define project dependencies |
public file get maven file if maven file null maven file extract resource maven config pom xml return maven file | the maven pom file used to define project dependencies |
private void copy resource file dest string relative path layout get relative path dest replace string source demo relative path input stream resource get class get resource as stream source if resource null throw new runtime exception couldn t find resource source if dest exists dest get parent file mkdirs dest create new file copy resource new input stream reader resource dest | copies the file under the demo resource path to the specified dest |
private void upload project archive string user name string password standard project delegate project get delegate string summary build from source with protoj sh archive string labels type archive op sys all string google name string format s src tar gz project get project name delegate get upload google code feature upload tar google name labels summary user name password | uploads the project tar archive to the googlecode website |
private void assert log contents string log acme session get project load log assert assert true log log contains archive assert assert true log log contains task archive started assert assert true log log contains building jar assert assert true log log contains acme 1 0 jar assert assert true log log contains foo jar assert assert true log log contains task archive finished | asserts that the build sent the expected text to the log file |
public string get version number return 1 8 3 | used in version information and names of jar files for example |
public void create simple project file parent dir file jar file create project parent dir simple jar file bin simple sh bin simple bat src resources simple ivy xml conf dev properties readme txt notice txt src java org simple core simple core java src java org simple system simple project java | creates the simple project under the specified parent dir |
public string get alien version return 1 0 | this method is accessed from inside the ivy |
public string get junit version return 4 4 | this method is accessed from inside the ivy |
public string get ajc version return 1 0 | this method is accessed from inside the ivy |
public string get basic version return 1 0 | this method is accessed from inside the ivy |
public void dispatch commands get project get dispatch feature dispatch commands | dispatches command line arguments to the commands that were set up in the |
public void init logging target init logging project msg info | enables logging to the specified log file at project |
public void init logging int level target init logging level | enables logging at project |
private string get executable string executable string extension string win exe if executable ends with win exe executable extension else win exe executable return win exe | if the executable ends with a |
public void init spawn boolean spawn exec task set spawn spawn if spawn exec task set outputproperty stdout property exec task set error property stderr property exec task set result property result property | specify true so that the process will outlive this java process false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.