Skip to content

Commit

Permalink
JBIDE-28476: Upgrade Jboss Maven plugins to 2.7.5 (#85)
Browse files Browse the repository at this point in the history
* JBIDE-28476: Upgrade Jboss Mavben plugins to 2.7.4

deprecate discovery-utils and dependency-plugin
Signed-off-by: Stephane Bouchet <[email protected]>

* JBIDE-28476: Upgrade Jboss Mavben plugins to 2.7.4

Signed-off-by: Stephane Bouchet <[email protected]>

* fix deprecated methods and add warning on fixVersion mojo

Signed-off-by: Stephane Bouchet <[email protected]>

* Update to latest 2.7.5

Signed-off-by: Stephane Bouchet <[email protected]>

Signed-off-by: Stephane Bouchet <[email protected]>
  • Loading branch information
sbouchet authored Sep 13, 2022
1 parent a8b4944 commit e786575
Show file tree
Hide file tree
Showing 23 changed files with 114 additions and 495 deletions.
27 changes: 0 additions & 27 deletions tycho-plugins/discovery-utils/.classpath

This file was deleted.

23 changes: 0 additions & 23 deletions tycho-plugins/discovery-utils/.project

This file was deleted.

60 changes: 0 additions & 60 deletions tycho-plugins/discovery-utils/pom.xml

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions tycho-plugins/enforcer-rules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<groupId>org.jboss.tools</groupId>
<artifactId>tycho-plugins</artifactId>
<version>2.5.0</version>
<version>2.7.5</version>
</parent>

<properties>
Expand Down Expand Up @@ -65,7 +65,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class CoreUIDependency implements EnforcerRule {

private String joinString = "\n > ";

@Override
public void execute( EnforcerRuleHelper helper ) throws EnforcerRuleException {
Log log = helper.getLog();
try {
Expand All @@ -46,7 +47,7 @@ public void execute( EnforcerRuleHelper helper ) throws EnforcerRuleException {
}

Set<String> ui = model.getAllUIDeps();
String[] uiDeps = (String[]) ui.toArray(new String[ui.size()]);
String[] uiDeps = ui.toArray(new String[ui.size()]);
if( uiDeps.length > 0 ) {
String msg = "[CoreUIDependency] " + (String)helper.evaluate("${project.artifactId}") +
" is a Core plugin, but depends on these UI plugins directly or transitively:" +
Expand Down Expand Up @@ -264,7 +265,7 @@ private void cacheFolders(File pluginFile, HashMap<String, ArrayList<File>> map,
private void findUIDependencies(ManifestModel mm, Log log, boolean verbose) {
String symbolicName = mm.bundleId;
List<String> deps = new ArrayList<String>(mm.deps);
String[] asArr = (String[]) deps.toArray(new String[deps.size()]);
String[] asArr = deps.toArray(new String[deps.size()]);
if( verbose ) {
log.debug("[CoreUIDependency] " + symbolicName + " requires the following units: " + joinString + String.join(joinString, asArr));
}
Expand All @@ -288,6 +289,7 @@ private void findUIDependencies(ManifestModel mm, Log log, boolean verbose) {
*
* If your rule is not cacheable, then the result here is not important, you may return anything.
*/
@Override
public String getCacheId()
{
//no hash on boolean...only parameter so no hash is needed.
Expand All @@ -300,6 +302,7 @@ public String getCacheId()
* project. This means that even things that change from project to project may still
* be cacheable in certain instances.
*/
@Override
public boolean isCacheable()
{
return false;
Expand All @@ -312,6 +315,7 @@ public boolean isCacheable()
* by the helper need to be queried. You may for example, store certain objects in your rule
* and then query them later.
*/
@Override
public boolean isResultValid( EnforcerRule arg0 )
{
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class FoundationCoreVersionMatchesParentPom
private String currentVersionProperties = null;
private String requiredQualifier = ".Final"; // or .GA

@Override
public void execute( EnforcerRuleHelper helper )
throws EnforcerRuleException
{
Expand All @@ -38,7 +39,7 @@ public void execute( EnforcerRuleHelper helper )
try
{
MavenProject project = (MavenProject) helper.evaluate( "${project}" );
String basedir = (String) helper.evaluate( "${project.basedir}" ).toString();
String basedir = helper.evaluate( "${project.basedir}" ).toString();

Properties projProps = project.getProperties();
Enumeration<?> e = projProps.propertyNames();
Expand Down Expand Up @@ -111,6 +112,7 @@ public void execute( EnforcerRuleHelper helper )
*
* If your rule is not cacheable, then the result here is not important, you may return anything.
*/
@Override
public String getCacheId()
{
//no hash on boolean...only parameter so no hash is needed.
Expand All @@ -123,6 +125,7 @@ public String getCacheId()
* project. This means that even things that change from project to project may still
* be cacheable in certain instances.
*/
@Override
public boolean isCacheable()
{
return false;
Expand All @@ -135,6 +138,7 @@ public boolean isCacheable()
* by the helper need to be queried. You may for example, store certain objects in your rule
* and then query them later.
*/
@Override
public boolean isResultValid( EnforcerRule arg0 )
{
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class NoSnapshotsAllowed
private String includePattern = "";
private String excludePattern = "";

@Override
public void execute( EnforcerRuleHelper helper )
throws EnforcerRuleException
{
Expand Down Expand Up @@ -104,6 +105,7 @@ public void execute( EnforcerRuleHelper helper )
*
* If your rule is not cacheable, then the result here is not important, you may return anything.
*/
@Override
public String getCacheId()
{
//no hash on boolean...only parameter so no hash is needed.
Expand All @@ -116,6 +118,7 @@ public String getCacheId()
* project. This means that even things that change from project to project may still
* be cacheable in certain instances.
*/
@Override
public boolean isCacheable()
{
return false;
Expand All @@ -128,6 +131,7 @@ public boolean isCacheable()
* by the helper need to be queried. You may for example, store certain objects in your rule
* and then query them later.
*/
@Override
public boolean isResultValid( EnforcerRule arg0 )
{
return false;
Expand Down
Loading

0 comments on commit e786575

Please sign in to comment.