Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
21f57aa5
Commit
21f57aa5
authored
Nov 20, 2015
by
daryl herzmann
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #392 from tevans/master
Archive legacy sources for Jive tools
parents
7190277e
6da86905
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
215 deletions
+0
-215
ant-jive-edition-sources.jar
build/lib/src/ant-jive-edition-sources.jar
+0
-0
BaseSelector.java
src/java/com/jivesoftware/tools/selector/BaseSelector.java
+0
-111
EditionSelector.java
...java/com/jivesoftware/tools/selector/EditionSelector.java
+0
-44
IncludeSourceSelector.java
...om/jivesoftware/tools/selector/IncludeSourceSelector.java
+0
-20
JavaDocSelector.java
...java/com/jivesoftware/tools/selector/JavaDocSelector.java
+0
-40
No files found.
build/lib/src/ant-jive-edition-sources.jar
0 → 100644
View file @
21f57aa5
File added
src/java/com/jivesoftware/tools/selector/BaseSelector.java
deleted
100644 → 0
View file @
7190277e
package
com
.
jivesoftware
.
tools
.
selector
;
import
com.thoughtworks.qdox.JavaDocBuilder
;
import
com.thoughtworks.qdox.model.ClassLibrary
;
import
com.thoughtworks.qdox.model.DefaultDocletTagFactory
;
import
com.thoughtworks.qdox.model.DocletTag
;
import
com.thoughtworks.qdox.model.JavaClass
;
import
com.thoughtworks.qdox.model.JavaSource
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.PrintStream
;
import
java.net.URL
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Properties
;
import
org.apache.tools.ant.BuildException
;
import
org.apache.tools.ant.types.selectors.BaseSelectorContainer
;
public
abstract
class
BaseSelector
extends
BaseSelectorContainer
{
private
static
Map
sourcesMap
=
new
HashMap
();
private
static
Map
packagesMap
=
new
HashMap
();
private
String
packages
;
public
boolean
isSelected
(
File
paramFile1
,
String
paramString
,
File
paramFile2
)
throws
BuildException
{
if
(
paramString
.
endsWith
(
".java"
))
{
JavaSource
[]
arrayOfJavaSource
=
getSources
(
paramFile1
);
for
(
int
i
=
0
;
i
<
arrayOfJavaSource
.
length
;
i
++)
{
JavaSource
localJavaSource
=
arrayOfJavaSource
[
i
];
File
localFile
=
new
File
(
localJavaSource
.
getURL
().
getFile
());
if
((
localFile
.
equals
(
paramFile2
))
&&
(
localJavaSource
.
getClasses
().
length
>
0
))
{
JavaClass
localJavaClass
=
localJavaSource
.
getClasses
()[
0
];
String
str
=
getTagName
();
DocletTag
localDocletTag
=
localJavaClass
.
getTagByName
(
str
);
if
(
localDocletTag
==
null
)
{
return
handleNoTag
(
localJavaClass
,
paramFile2
);
}
System
.
out
.
println
(
"Checking '"
+
str
+
"' tag for "
+
paramString
);
return
shouldCopy
(
localDocletTag
.
getValue
());
}
}
}
else
if
(
"javadocs.properties"
.
equals
(
paramFile2
.
getName
()))
{
return
false
;
}
return
true
;
}
private
boolean
handleNoTag
(
JavaClass
paramJavaClass
,
File
paramFile
)
{
File
localFile1
=
paramFile
.
getParentFile
();
String
str1
=
paramJavaClass
.
getPackage
();
int
i
=
str1
.
split
(
"\\."
).
length
;
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
File
localFile2
=
new
File
(
localFile1
,
"javadocs.properties"
);
if
(
localFile2
.
exists
())
{
Properties
localProperties
=
new
Properties
();
try
{
localProperties
.
load
(
new
FileInputStream
(
localFile2
));
}
catch
(
IOException
localIOException
)
{
localIOException
.
printStackTrace
();
}
String
str2
=
getTagName
();
String
str3
=
localProperties
.
getProperty
(
str2
);
if
(
str3
!=
null
)
{
return
shouldCopy
(
str3
);
}
}
localFile1
=
localFile1
.
getParentFile
();
}
return
shouldCopyWithNoTag
();
}
protected
JavaSource
[]
getSources
(
File
paramFile
)
{
JavaSource
[]
arrayOfJavaSource
=
(
JavaSource
[])
sourcesMap
.
get
(
paramFile
.
toString
());
if
(
arrayOfJavaSource
==
null
)
{
JavaDocBuilder
localJavaDocBuilder
=
new
JavaDocBuilder
(
new
DefaultDocletTagFactory
());
localJavaDocBuilder
.
getClassLibrary
().
addClassLoader
(
getClass
().
getClassLoader
());
localJavaDocBuilder
.
addSourceTree
(
paramFile
);
arrayOfJavaSource
=
localJavaDocBuilder
.
getSources
();
sourcesMap
.
put
(
paramFile
.
toString
(),
arrayOfJavaSource
);
}
return
arrayOfJavaSource
;
}
public
void
setPackages
(
String
paramString
)
{
this
.
packages
=
paramString
;
}
protected
abstract
String
getTagName
();
protected
abstract
boolean
shouldCopyWithNoTag
();
protected
abstract
boolean
shouldCopy
(
String
paramString
);
}
src/java/com/jivesoftware/tools/selector/EditionSelector.java
deleted
100644 → 0
View file @
7190277e
package
com
.
jivesoftware
.
tools
.
selector
;
public
class
EditionSelector
extends
BaseSelector
{
public
static
final
String
EDITION_PRO
=
"professional"
;
public
static
final
String
EDITION_SILVER
=
"silver"
;
public
static
final
String
EDITION_GOLD
=
"gold"
;
String
edition
=
"gold"
;
protected
String
getTagName
()
{
return
"edition"
;
}
protected
boolean
shouldCopyWithNoTag
()
{
return
true
;
}
protected
boolean
shouldCopy
(
String
paramString
)
{
if
(
"gold"
.
equals
(
this
.
edition
))
{
return
true
;
}
if
(
"silver"
.
equals
(
this
.
edition
))
{
return
!
"gold"
.
equals
(
paramString
);
}
if
(
"professional"
.
equals
(
this
.
edition
))
{
if
(
"gold"
.
equals
(
paramString
))
{
return
false
;
}
return
!
"silver"
.
equals
(
paramString
);
}
setError
(
"Unknown selector: "
+
this
.
edition
);
return
false
;
}
public
void
setEdition
(
String
paramString
)
{
this
.
edition
=
paramString
;
}
}
src/java/com/jivesoftware/tools/selector/IncludeSourceSelector.java
deleted
100644 → 0
View file @
7190277e
package
com
.
jivesoftware
.
tools
.
selector
;
public
class
IncludeSourceSelector
extends
BaseSelector
{
protected
String
getTagName
()
{
return
"src.include"
;
}
protected
boolean
shouldCopyWithNoTag
()
{
return
true
;
}
protected
boolean
shouldCopy
(
String
paramString
)
{
return
!
"false"
.
equals
(
paramString
);
}
}
src/java/com/jivesoftware/tools/selector/JavaDocSelector.java
deleted
100644 → 0
View file @
7190277e
package
com
.
jivesoftware
.
tools
.
selector
;
public
class
JavaDocSelector
extends
BaseSelector
{
public
static
final
String
VERSION_API
=
"api"
;
public
static
final
String
VERSION_DEV
=
"dev"
;
public
static
final
String
VERSION_NONE
=
"none"
;
String
version
=
"dev"
;
protected
String
getTagName
()
{
return
"javadoc"
;
}
protected
boolean
shouldCopyWithNoTag
()
{
return
"dev"
.
equals
(
this
.
version
);
}
protected
boolean
shouldCopy
(
String
paramString
)
{
if
(
"none"
.
equals
(
paramString
))
{
return
false
;
}
if
(
"dev"
.
equals
(
this
.
version
))
{
return
true
;
}
if
(
"api"
.
equals
(
this
.
version
))
{
return
"api"
.
equals
(
paramString
);
}
setError
(
"Unknown selector: "
+
this
.
version
);
return
false
;
}
public
void
setVersion
(
String
paramString
)
{
this
.
version
=
paramString
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment