/** * Evaluates the configuration setting {@link CoreConfiguration#APP_PREFIXES}. */ @Override protected void prepareExecution() throws GoalConfigurationException { super.prepareExecution(); }
public void addAppPaths(Set<Path> _paths) throws IllegalArgumentException { for(Path p: _paths) this.addAppPath(p); }
/** * Simply calls {@AbstractAnalysisGoal#execute}. * <p> * CAN be overridden by subclasses. * * @return */ protected void executeGoal() throws Exception { this.goal.executeSync(); }
if(this.getApplicationContext()==null) throw new GoalConfigurationException("Application context is required to execute goal [" + this.getGoalType().toString() + "]"); this.addAppPaths(FileUtil.getPaths(this.getConfiguration().getStringArray(CoreConfiguration.APP_DIRS, null))); if(!this.hasAppPaths()) log.warn("No search path(s) provided"); final boolean created = this.upload(); if(!created) throw new GoalConfigurationException("Upload of goal execution failed, aborting the goal execution...");
super.prepareExecution(); ((AbstractAppGoal)g).addAppPaths(new HashSet<Path>(this.getAppPaths()));
this.goal.setGoalClient(GoalClient.MAVEN_PLUGIN); this.goal.setConfiguration(VulasConfiguration.getGlobal()); this.goal.addAppPaths(FileUtil.getPaths(VulasConfiguration.getGlobal().getStringArray(CoreConfiguration.APP_DIRS, null)));
dep = new Dependency(this.goal.getGoalContext().getApplication(), lib, Scope.valueOf(a.getScope().toUpperCase()), !direct_artifacts.contains(a), null, a.getFile().toPath().toString()); dep_for_path.put(a.getFile().toPath(), dep); ((AbstractAppGoal) this.goal).setKnownDependencies(dep_for_path);
protected Application getApplicationContext() { return this.getGoalContext().getApplication(); }
public boolean hasAppPaths() { return this.getAppPaths()!=null && !this.getAppPaths().isEmpty(); }
public void addAppPath(Path _p) throws IllegalArgumentException { if(!FileUtil.isAccessibleDirectory(_p) && !FileUtil.isAccessibleFile(_p)) log.warn("[" + _p + "] is not an accessible file or directory"); else if(this.getAppPaths().contains(_p)) log.debug("[" + _p + "] is already part of application paths, and will not be added another time"); else this.searchPaths.add(_p); }
/** * Prepares the classpaths. */ @Override protected final void prepareExecution() throws GoalConfigurationException { super.prepareExecution(); this.prepareClasspath(); }
@Override protected void executeGoal() throws Exception { // Collect all modules to be reported on final Set<Application> modules = new HashSet<Application>(); this.collectApplicationModules(this.project, modules); ((ReportGoal)this.goal).setApplicationModules(modules); try { this.goal.executeSync(); } // ReportException will be passed on as MojoFailure, i.e., the goal execution terminates normally catch (ReportException re) { throw new MojoFailureException(re.getLongMessage(), re); } }
protected void prepareExecution() throws GoalConfigurationException { super.prepareExecution();